Example backend of Security for Extensions for Integration Testing#6
Open
Example backend of Security for Extensions for Integration Testing#6
Conversation
Signed-off-by: Craig Perkins <cwperx@amazon.com>
Signed-off-by: Craig Perkins <cwperx@amazon.com>
Signed-off-by: Craig Perkins <cwperx@amazon.com>
Signed-off-by: Craig Perkins <cwperx@amazon.com>
Signed-off-by: Craig Perkins <cwperx@amazon.com>
Signed-off-by: Craig Perkins <cwperx@amazon.com>
Signed-off-by: Craig Perkins <cwperx@amazon.com>
Signed-off-by: Craig Perkins <cwperx@amazon.com>
Signed-off-by: Craig Perkins <cwperx@amazon.com>
Signed-off-by: Craig Perkins <cwperx@amazon.com>
Signed-off-by: Craig Perkins <cwperx@amazon.com>
Signed-off-by: Craig Perkins <cwperx@amazon.com>
Signed-off-by: Craig Perkins <cwperx@amazon.com>
Signed-off-by: Craig Perkins <cwperx@amazon.com>
This file contains hidden or 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
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_rolesare 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.