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

Create a permissions check API for extensions to us with custom resources #40

Open
6 tasks
peternied opened this issue Jul 11, 2022 · 2 comments
Open
6 tasks
Labels
enhancement New feature or request

Comments

@peternied
Copy link
Member

OpenSearch should be responsible for inspecting the user, roles, resources to ensure standard practices are used. A permissions check API should be designed and implemented to offload this work from extensions creators.

  • Design an API for extensions to use to check users permissions on a resource
    • First examine and consider the model used by Anomaly Detection plugin
    • Examine other plugins for permissions additional model that might need to be supported.
    • Consider any other permissions implementations that should be covered.
  • Implement in OpenSearch
  • Implement in the SDK, allowing for drop in replacement of anomaly detection.
@minalsha minalsha added the enhancement New feature or request label Aug 2, 2022
@peternied
Copy link
Member Author

For additional context checkout some anti-patterns, a pluginside permission check in AD, link. Read up more at for how detectors are configured and expressed as user stories https://opensearch.org/docs/latest/monitoring-plugins/ad/index/

@peternied
Copy link
Member Author

peternied commented Aug 2, 2022

Off the top of my head, it could look like this:

GET /security/checkResourcePermission
{
   // User is embedden in the requset
   "permissions": "NAME OF THE PERMISSION FOR THE RESOURCE",
   "resourceId": "The identifier of the resource",
   "additionalData": { "other information that can be used to process the request for allowing/disallowing"}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants