-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Principal for plugins and extensions #5913
Comments
Hi @peternied , Could you share your thoughts on the type of permissions extensions require? Are we talking about permissions to data or permissions to host or something else? Thanks |
Permissions are granted to users such as "User Bob can create indexes". Plugins and extensions should have the same permissions grants such as "Extension LogScanner can create indexes". |
Thanks @peternied . So you are referring to permissions to data stored in indices and permissions to cluster level actions (eg: check health of a cluster etc). Currently these actions are tied to a user/backend_role. Are there other actions that are specific only to extensions? |
The identity designs do not leverage existing features or architecture in from the security plugin - clearly there will need to be migration path but during this phase we are designing towards an end state.
There are no actions that are specific to extensions. |
Just to make sure I understand this clearly. We are going to require users to migrate to identity if they want to use extensions. We won't support extensions through our current security plugin. Are these statements correct @peternied? How would having both security models running at the same time impact the acceptance criteria you have above? Does an admin need to completely disable the security plugin to use identity and extensions? I'm still failing to understand how identity and the security plugin will work together because they will need to since the security plugin supports other use cases outside of extensions which identity won't support. |
I have a handwavy answer. I don't think "migrate" would be my preferred term here. I think we will need both to work together, and provide a path where security in core performs functions currently implemented by the security plugin. Thus we can just delete much of the security plugin implementation without any changes to the end user. |
@DarshitChanpura I know you were asking about the kinds of workflows, found diagrams for some different workflows on this issue #4485 |
Securing Extension Request Flow via IdentitySteps: 0,1. Register User and Extensions.
These steps work under the assumption that identity is enabled and InternalAuthenticationManager is setup. PS: Tokens would be JWT (unless decided otherwise) ** Question ** How do we handle NoopAuth? Proposed solution: Extension will always be evaluated for their permissions for the corresponding action. (Extensions evaluation should never be a NoopAuthorization) @cwperks @peternied @dblock Would you please review this? |
|
Nice diagram!
I think we should change this name to 'allowed_capabilities' and the list is not the same as the kinds of permissions user accounts have. For example during step 3 interact_on_behalf_of_user would be checked if it was supported and only if it was allowed would the user delegated auth token be added to the request to the extension. However, I think there should be another concept, Service Account? that is an identity that an extension uses whenever it making calls on its own behalf that is nearly identical to a normal user. Maybe we can link between this issue and opensearch-project/security#2502 to work on the specific design?
Consideration for what is inside that token (single token) that can be via Bearer Authentication with claims:
I don't think adding a token id for managing revocation will scale well - as dblock mentioned for us to focus on stateless scenarios. But this would be good to call out when considering the lower level designs.
When the token is received in step 4 by OpenSearch if the issuer, or audience doesn't match it should be rejected. If NoopAuth isn't providing subjects I think these requests should fail on the principal that extensions require identity information. |
@DarshitChanpura I like the idea of the token that's passed to the extension as being scoped to the actions it needs to fulfill the request. The admin should be able to set policies for an extension restricting how requests that originate from an extension could interact with a cluster. i.e. A policy for an extension that could only read index pattern
In addition, the user that's performing the REST request has permissions to interact with the OpenSearch cluster given through roles. Imagine that a user in this scenario has:
Would it be possible to calculate the intersection of these policies and scope the token accordingly? I know that DLS/FLS can complicate things as well, so it may not be possible to do this with FLS/DLS rules on a role. There will need to be a mechanism to identify if a REST request comes from an extension. A TLS channel between the cluster and the extension could be a way to identify the origin of the request. A simple approach to identifying the origin of a extension could be to embed
|
Use Case
As a user, when I interact with an extension its access is limited by its permissions and my permissions.
Acceptance Criteria
The text was updated successfully, but these errors were encountered: