forked from opensearch-project/security
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Example backend of Security for Extensions for Integration Testing #6
Open
cwperks
wants to merge
16
commits into
main
Choose a base branch
from
extension-obo
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
cwperks
requested review from
stephen-crawford,
reta and
willyborankin
as code owners
July 21, 2023 18:32
cwperks
changed the title
Extension obo
Example backend of Security for Extensions for Integration Testing
Jul 21, 2023
Signed-off-by: Craig Perkins <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains an example of Service Account Token and On-Behalf-Of Token implementations that can be used for integrating and testing with extensions. This PR defines a few security settings for extensions in the
OpenSearchSecurityPlugin.getExtensionSettings()
that can be used on an extension initialization request. An example initialization request looks like:Where
reserved_indices
,permissions.*
andsend_backend_roles
are security settings for the extension.reserved_indices
- This settings let's an extension reserve indices that would grant them system index protection from the security plugin. The service account token generated on this PR is an ID Token and does not contain any authz information in the token, unlike on-behalf-of tokens.This token is narrowly scoped to only permit an extension to meddle with the indices that its reserved and nothing else. This token has a narrow scope to allow for system index use-cases that plugins rely on today and limit the blast radius in the event one is compromised.
permissions.*
- These can be ignored, but they are a proof of concept to show what it could look like to grant more permissions to a service account token then the narrow use-case of only requests on a reserved (system) index. Theoretically, this would allow for "daemon" extensions that operate in the background with a known set of permissions. This would provide an alternative to setting up a microservice utilizing an opensearch client with a username + password combo.send_backend_roles
- This flag indicates that an on-behalf-of token should include the user's backend roles as a claim in the payload of the token. This is necessary for extension's, like anomaly-detection, that provide additional attribute-based security of detector's based on user's backend roles. By default, backend roles would not be included as a claim in the payload of the on-behalf-of JWT that is ferried to an extension.