-
Notifications
You must be signed in to change notification settings - Fork 279
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
[2.x] Adds On-Behalf-Of authentication mechanism and service account capability #3416
[2.x] Adds On-Behalf-Of authentication mechanism and service account capability #3416
Conversation
Signed-off-by: Stephen Crawford <steecraw@amazon.com>
Signed-off-by: Stephen Crawford <steecraw@amazon.com>
Signed-off-by: Stephen Crawford <steecraw@amazon.com>
Signed-off-by: Stephen Crawford <steecraw@amazon.com>
Signed-off-by: Stephen Crawford <steecraw@amazon.com>
Signed-off-by: Darshit Chanpura <dchanp@amazon.com>
Signed-off-by: Darshit Chanpura <dchanp@amazon.com>
b8c33c8
to
5db55ea
Compare
Signed-off-by: Darshit Chanpura <dchanp@amazon.com>
Signed-off-by: Darshit Chanpura <dchanp@amazon.com>
The manual testing with the build of opensearch-project/OpenSearch#10258 succeed:
|
d29ab0f
to
54de852
Compare
54de852
to
d29ab0f
Compare
I would recommend splitting this into two PRs: one that does OBO changes and one that does service account changes. I am not as familiar with the OBO changes since I did not write them originally but here is what is required for service accounts:
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left comments on the original changes to give some direction.
@@ -1110,6 +1144,15 @@ public Settings additionalSettings() { | |||
return builder.build(); | |||
} | |||
|
|||
@Override |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the way Craig set this up, the idea is to register a set of extension security settings when an extension is installed/registered as part of the core initialization process. To make this work with service accounts the general idea would be to make sure that a service account is only able to operate on the indices listed in the reserved_indices list and affiliated with themselves--this should use a mapping or some other mechanism.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have removed BACKEND_ROLES setting for now. In SecurityIndexAccessEvaluator we check by looking up extension settings by username (should match extension name), and then matching the requested index with extension's reserved index to determine whether access should be granted
src/main/java/org/opensearch/security/OpenSearchSecurityPlugin.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opensearch/security/action/onbehalf/CreateOnBehalfOfTokenAction.java
Outdated
Show resolved
Hide resolved
channel.sendResponse( | ||
new BytesRestResponse( | ||
RestStatus.SERVICE_UNAVAILABLE, | ||
"The OnBehalfOf token generating API has been disabled, see {link to doc} for more information on this feature." /* TODO: Update the link to the documentation website */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think @RyanL1997 is doing this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This link will only go live after it has been published. I would recommend just redirecting them to website. @RyanL1997 thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine to redirect that to the homepage of our documentation website, at least for now. So it will be https://opensearch.org/docs/latest/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or should we wait until the doc team publish the work so that we can use aa more accurate url?
src/main/java/org/opensearch/security/action/onbehalf/CreateOnBehalfOfTokenAction.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opensearch/security/securityconf/ConfigModelV7.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opensearch/security/securityconf/SecurityRoles.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opensearch/security/securityconf/impl/v7/RoleV7.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Darshit Chanpura <dchanp@amazon.com>
Signed-off-by: Ryan Liang <jiallian@amazon.com>
Signed-off-by: Ryan Liang <jiallian@amazon.com>
Signed-off-by: Ryan Liang <jiallian@amazon.com>
@RyanL1997 @scrawfor99 Should this be closed as there is a separate effort on-going for this? |
I'll be closing this out in lieu of ongoing efforts to merge Service accounts and OBO related changes separately. Please re-open if this is picked back up. |
Description
Backport On-behalf-of Authentication and Service account into the 2.x branch.
Category: New Feature
Issues Resolved
Testing
Integration testing
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.