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

Add a clear example of the REST api call to update a role [DOC] #7234

Closed
1 of 4 tasks
AntonEliatra opened this issue May 22, 2024 · 0 comments · Fixed by #7254
Closed
1 of 4 tasks

Add a clear example of the REST api call to update a role [DOC] #7234

AntonEliatra opened this issue May 22, 2024 · 0 comments · Fixed by #7254
Assignees
Labels
3 - Done Issue is done/complete security

Comments

@AntonEliatra
Copy link
Contributor

Current documentation is incorrect on rest API calls to patch roles.
current docs here https://opensearch.org/docs/latest/security/access-control/api/#patch-role

  • Request a change to existing documentation
  • Add new documentation
  • Report a technical problem with the documentation
  • Other

Current PATCH method specified below is incorrect and returns 500 error, with details below:
java.lang.UnsupportedOperationException: JsonNode not of type ObjectNode (but com.fasterxml.jackson.databind.node.TextNode), cannot call withArray() on it

To test, try to run the example in the docs:
PATCH _plugins/_security/api/roles [ { "op": "replace", "path": "/role1/index_permissions/0/fls", "value": ["test1", "test2"] }, { "op": "remove", "path": "/role1/index_permissions/0/dls" }, { "op": "add", "path": "/role2/cluster_permissions", "value": ["manage_snapshots"] } ]

AntonEliatra added a commit to AntonEliatra/documentation-website that referenced this issue May 27, 2024
@hdhalter hdhalter added 2 - In progress Issue/PR: The issue or PR is in progress. and removed 1 - Backlog - CON labels May 28, 2024
Naarcha-AWS added a commit that referenced this issue Jun 3, 2024
* adding details to rest API calls for role updates #7234

Signed-off-by: AntonEliatra <[email protected]>

* Update _security/access-control/api.md

Signed-off-by: Naarcha-AWS <[email protected]>

---------

Signed-off-by: AntonEliatra <[email protected]>
Signed-off-by: Naarcha-AWS <[email protected]>
Co-authored-by: Naarcha-AWS <[email protected]>
opensearch-trigger-bot bot pushed a commit that referenced this issue Jun 3, 2024
* adding details to rest API calls for role updates #7234

Signed-off-by: AntonEliatra <[email protected]>

* Update _security/access-control/api.md

Signed-off-by: Naarcha-AWS <[email protected]>

---------

Signed-off-by: AntonEliatra <[email protected]>
Signed-off-by: Naarcha-AWS <[email protected]>
Co-authored-by: Naarcha-AWS <[email protected]>
(cherry picked from commit e20114b)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@hdhalter hdhalter added 3 - Done Issue is done/complete and removed 2 - In progress Issue/PR: The issue or PR is in progress. labels Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 - Done Issue is done/complete security
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants