Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Few SecurityClient actions require "request body", whereas spec says "body" is optional. #144

Closed
saimedhi opened this issue Aug 21, 2023 · 8 comments
Labels
bug Something isn't working

Comments

@saimedhi
Copy link
Contributor

What is the bug?

  • The below SecurityClient APIs require "request body", whereas spec says "body" is optional.
  • create_action_group, patch_action_group, patch_action_groups, create_tenant, update_distinguished_names
  • When making requests without a body, I am getting an error as seen in the screenshot

What is the expected behavior?

This issue aims to update the API specifications to indicate that a request body is mandatory for these APIs.

Do you have any screenshots?

Screenshot 2023-08-21 at 3 23 08 PM
@saimedhi saimedhi added bug Something isn't working untriaged labels Aug 21, 2023
@saimedhi
Copy link
Contributor Author

I verified for create_action_group, patch_action_group, patch_action_groups, create_tenant.
But I couldn't verify for update_distinguished_names.
Getting no handler found for uri [/_plugins/_security/api/nodesdn] when using get_distinguished_names

@Xtansia
Copy link
Collaborator

Xtansia commented Aug 21, 2023

I verified for create_action_group, patch_action_group, patch_action_groups, create_tenant. But I couldn't verify for update_distinguished_names. Getting no handler found for uri [/_plugins/_security/api/nodesdn] when using get_distinguished_names

The distinguished names api requires enabling in config: https://opensearch.org/docs/latest/security/access-control/api/#distinguished-names

@saimedhi
Copy link
Contributor Author

saimedhi commented Aug 23, 2023

I verified for create_action_group, patch_action_group, patch_action_groups, create_tenant. But I couldn't verify for update_distinguished_names. Getting no handler found for uri [/_plugins/_security/api/nodesdn] when using get_distinguished_names

The distinguished names api requires enabling in config: https://opensearch.org/docs/latest/security/access-control/api/#distinguished-names

I did it then getting

{
   "status": "FORBIDDEN",
   "message": "API allowed only for admin."
}

I may have to make few other changes to config file.

Please confirm if spec needs to be changed or not?

@Xtansia
Copy link
Collaborator

Xtansia commented Aug 23, 2023

I verified for create_action_group, patch_action_group, patch_action_groups, create_tenant. But I couldn't verify for update_distinguished_names. Getting no handler found for uri [/_plugins/_security/api/nodesdn] when using get_distinguished_names

The distinguished names api requires enabling in config: https://opensearch.org/docs/latest/security/access-control/api/#distinguished-names

I did it then getting

{
   "status": "FORBIDDEN",
   "message": "API allowed only for admin."
}

I may have to make few other changes to config file.

Please confirm if spec needs to be changed or not?

I believe the API is only accessible to the "super-admin" or users which have been granted the correct permission. The super-admin in the demo config is authenticated via certificates, it's different to the admin:admin user.

@nhtruong
Copy link
Collaborator

@Tokesh @aabeshov Would you mind taking a look at this?

@Tokesh
Copy link
Collaborator

Tokesh commented Aug 25, 2023

@Tokesh @aabeshov Would you mind taking a look at this?

If all goes well, we'll check it out over the weekend.

@Tokesh
Copy link
Collaborator

Tokesh commented Aug 29, 2023

I have now tried to run this update_distinguished_names API. I got the same answer.
I can suggest that I update the rest of the specs that you have already checked (create_action_group, patch_action_group, patch_action_groups, create_tenant)

@nhtruong
Copy link
Collaborator

nhtruong commented Apr 2, 2024

closed by #149

@nhtruong nhtruong closed this as completed Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants