Skip to content
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

Adds JTI and expiration field support for API Tokens #4967

Merged
merged 35 commits into from
Dec 20, 2024

Conversation

derek-ho
Copy link
Collaborator

@derek-ho derek-ho commented Dec 13, 2024

Description

This change adds support for expiration field (to be used to determine validity of api tokens), as well as support for generating the JTI that represents the token. To generate the JTI the existing securityTokenManager's jwtvendor logic was re-used, and new Api tokens specific dynamic config model settings were added.

  • Category (Enhancement, New feature, Bug fix, Test fix, Refactoring, Maintenance, Documentation)
    Enhancement
  • Why these changes are required?
    Support vending the token itself and expiration
  • What is the old behavior before changes and new behavior after changes?
    Return dummy jti, no support for expiration

Issues Resolved

[List any issues this PR will resolve]

Is this a backport? If so, please add backport PR # and/or commits #, and remove backport-failed label from the original PR.

Do these changes introduce new permission(s) to be displayed in the static dropdown on the front-end? If so, please open a draft PR in the security dashboards plugin and link the draft PR here

Testing

[Please provide details of testing done: unit testing, integration testing and manual testing]

Check List

  • New functionality includes testing
  • New functionality has been documented
  • New Roles/Permissions have a corresponding security dashboards plugin PR
  • API changes companion pull request created
  • Commits are signed per the DCO using --signoff

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.

Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
@derek-ho derek-ho changed the title Adds Authcz suport for api tokens Adds JTI and expiration field support for API Tokens Dec 17, 2024
Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
@derek-ho derek-ho merged commit dacdae5 into opensearch-project:feature/api-tokens Dec 20, 2024
38 checks passed
@derek-ho derek-ho deleted the authcz branch December 20, 2024 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants