-
Notifications
You must be signed in to change notification settings - Fork 341
Introduction of AuthToken Authenticator and AuthenticationBackend #1000
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
Introduction of AuthToken Authenticator and AuthenticationBackend #1000
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1000 +/- ##
============================================
- Coverage 64.47% 64.12% -0.36%
- Complexity 3168 3178 +10
============================================
Files 244 252 +8
Lines 17034 17274 +240
Branches 3022 3042 +20
============================================
+ Hits 10983 11077 +94
- Misses 4517 4653 +136
- Partials 1534 1544 +10
Continue to review full report at Codecov.
|
...test/java/com/amazon/opendistroforelasticsearch/security/authtoken/AuthTokenServiceTest.java
Outdated
Show resolved
Hide resolved
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.
How will this be class be initialized? It does not have setters and uses empty constructor
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.
This class is not fully written as a part of this CR. It will be initialized in the upcoming one. This class is just introduced as other class has dependency.
public AuthToken getTokenByClaims(Map<String, Object> claims) {
return null;
}
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.
do we need to initialize settings and configPath?
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.
Actually we dont require it. The HTTPAuthenticator initializer expect the class to have this constructor with "final Settings settings, final Path configPath" params and hence its mandatory
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.
But now changing the implementator requires it to pass it to superclass, so now in use :)
...endistroforelasticsearch/security/authtoken/authenticator/AuthTokenHttpJwtAuthenticator.java
Outdated
Show resolved
Hide resolved
...endistroforelasticsearch/security/authtoken/authenticator/AuthTokenHttpJwtAuthenticator.java
Outdated
Show resolved
Hide resolved
...endistroforelasticsearch/security/authtoken/authenticator/AuthTokenHttpJwtAuthenticator.java
Outdated
Show resolved
Hide resolved
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.
what does this object store?
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.
It is a builder class for AuthCredentials. Its supposed to have similar class element structure as that of a AuthCredentials class
|
@palashhedau this pull request has been sitting for a considerable time now, I am going to close this out. Let me know if you'd like to reopen it and work towards getting this merged. |
opendistro-for-elasticsearch/security pull request intake form
Please provide as much details as possible to get feedback/acceptance on your PR quickly
Category: (Enhancement, New feature, Bug fix, Test fix, Refactoring, Maintenance, Documentation)
New feature - Auth Token Authenticator and AuthenticationBackend
Github Issue # or road-map entry, if available:
Description of changes:
CR Handle PerformanceAnalyzer transport channel. #1 for AuthToken - Intoduction of Auth Token Authenticator and AuthenticationBackend
Asynchronous operation for AuthToken Authentication Backend
Addition of new Field in security for auth token jwt configuration - auth_token_provider
Why these changes are required?
New Functionality
What is the old behavior before changes and new behavior after changes? (Please add any example/logs/screen-shot if available)
Testing done: (Please provide details of testing done: Unit testing, integration testing and manual testing)
Tested manually for old DI
Added unit test for auth_token_provider field
Tested Serialization and Deserialization of User class
TO-DOs, if any: (Please describe pending items and provide Github issues# for each of them)
Is it backport from master branch? (If yes, please add backport PR # and commits #)
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.