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.
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}"
}
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?
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:
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.dynamicportion ofconfig.yml?Design
Implementation
Integration
extensions/extensions.ymlsetting to enable backward compatible plugin mode for extensions #2616Release Criteria
Follow-up