-
Notifications
You must be signed in to change notification settings - Fork 293
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
Api token authc/z implementation with Cache #4992
Merged
derek-ho
merged 31 commits into
opensearch-project:feature/api-tokens
from
derek-ho:auth
Feb 4, 2025
Merged
Changes from all commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
9f695fa
Naive cluster permission authz and authc based on token validity
derek-ho d3fcc4a
Crude index permissions authz
derek-ho 6904317
Fix tests
derek-ho 17bca93
Revert mis-merge in abstractauditlog
derek-ho 92d4e60
Add allowlist for authc, add basic test showing it works
derek-ho 22cfbe8
Add more extensive tests for authenticator, switch to list of indexPe…
derek-ho 665b9e9
Directly store permissions in the cache
derek-ho e39df0d
Remove permissions from jti
derek-ho ad63974
Onboard onto clusterPrivileges
derek-ho 73eb2ab
Add index permissions api token eval
derek-ho 6418226
Add testing for cluster and index priv
derek-ho bc8aacf
Use transport action
derek-ho b90bae9
Cleanup tests and constants
derek-ho 552aeda
Fix test
derek-ho aa506e7
Remove unecessary id to jti map since we are reloading every time and…
derek-ho d9cf78d
PR review
derek-ho d7b7e47
Spotless
derek-ho 6571d9d
Fix tests
derek-ho 9fcb720
PR review
derek-ho e44072c
Inject
derek-ho 0927d99
Fix
derek-ho fb79014
Fix tests
derek-ho 0f60569
Final cleanup
derek-ho 6634896
Merge branch 'feature/api-tokens' of github.com:opensearch-project/se…
derek-ho 83769b1
Fix tests
derek-ho 685dcfc
PR feedback
derek-ho 6ffc060
Mock api tokenrepository behavior
derek-ho 763a9ff
Refactor to abstract class
derek-ho a685951
Fix test and cleanup
derek-ho 77ad6c3
Separate the calls out based on type
derek-ho 7a20de3
PR comments
derek-ho File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can the name
ctxWithUserName()
be somehow refined? Considering thatctxForApiToken()
also accepts auserName
param, it is unclear by the name what the difference toctxWithUserName()
is.