-
Notifications
You must be signed in to change notification settings - Fork 347
Description
Description
When security is installed, extensions will need an auth token in order to interact with the OpenSearch cluster. This auth token will be in the form of a JWT. Extensions are a replacement for plugins, so any information from a user that plugins utilize today should be contained as a claim in the JWT sent to an extension.
Example header + payload:
Header:
{"alg":"HS512"}
Payload:
{
"iss": "<cluster_name>",
"iat":1676908684,
"exp":1676908744,
"sub":"<principal_identifier_token>",
"er":"<encrypted_mapped_roles>", # r for roles
"br": "<encrypted_backend_roles>", # br for backend_roles
"aud": "extension/{extensionUniqueId}"
}
Useful reference class to see how JWTs are generated within the security plugin on successful SAML authentication: https://github.com/opensearch-project/security/blob/main/src/main/java/com/amazon/dlic/auth/http/saml/AuthTokenProcessorHandler.java
For the initial extensions design, these tokens will allow the extension to interact with the OpenSearch cluster using the same privileges as the initiating user.
For the initial implementation, the JWTs can be signed with an HMAC 512 hash by default. If any encryption is performed, then the extension will require a mechanism for decrypting the JWE to view the payload of the JWT. The signing key should be configured in the security configuration. Maybe in the config.dynamic portion of config.yml?
Design
- JWT vs JWE: [Question] What capabilities should a token that is passed to an extension have? Should it be a JWT? #2545
- [Security/Extension] JWT Vendor for extensions #2567
- [Security/Extension] Role encryption/decryption #2620
- [Extension] Authentication Backend for JIT Token Validation #2619
- [Extensions] Create dynamic configuration section in config.yml for extensions #2615
- [Question] Host Mapping of Create OBO Token Endpoint #3000
- [Feature/Extensions] Include backend roles in on-behalf-of token in CreateOnBehalfOfTokenAction #2865
- Determine how auth tokens are forwarded to Extensions #2764
Implementation
- [Feature/Extension] Add configuration of disable OBO #3047
- [FEATURE] Handle the edge cases of On-behalf-of Authentication #2891
- [Feature/Extension] OBO Authenticator should inspect the issuer field and make sure it matches the current cluster #3102
- [Extension] Extend the Integration Test Cases of On-Behalf-Of Authentication Backend #2707
Integration
- [Spike] Work pending to merge Feature/Extensions into Main #2945
- Issue and ferry a Service Account Token to an Extension on bootstrap #3176
- [Extensions] Add
extensions/extensions.ymlsetting to enable backward compatible plugin mode for extensions #2616
Release Criteria
- OnBehalfOf tokens internal security review process + App Sec signoff #3162
- [Documentation] Documentation guidance for Service Accounts + OnBehalfOf Authentication #3290
- Switch JWT library implementations #3267
- [Extension] Extend the Integration Test Cases of On-Behalf-Of Authentication Backend #2707
- [Feature/Extension] Add permission for access create OBO Token endpoint. #3177
- [Feature/Extension] 100% Code coverage of OBO Authenticator and Jwt Vendor #3101
- Review documentation needs (including Extensions dev guide) #3225
- [Enhancement] Generate On-Behalf-Of Token endpoint should have input check for request body #3558
- Backport On-Behalf-Of Authentication into 2.x branch #3555
Follow-up
- [Security for Extensions] Consume access tokens passed from core and utilize in REST Clients opensearch-sdk-java#887
- [FEATURE/Extension] Audit log entry for OBO token generation #3098
- Audit log entry requirements for OBO tokens #3202
- [Enhancement] Set up a Util class for OBO Authenticator for key checks and endpoints checks #3238
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Status