Skip to content

Conversation

@palashhedau
Copy link
Contributor

@palashhedau palashhedau commented Jan 29, 2021

opendistro-for-elasticsearch/security pull request intake form

Please provide as much details as possible to get feedback/acceptance on your PR quickly

  1. Category: (Enhancement, New feature, Bug fix, Test fix, Refactoring, Maintenance, Documentation)
    New feature - Auth Token Authenticator and AuthenticationBackend

  2. Github Issue # or road-map entry, if available:

  3. 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

  4. Why these changes are required?
    New Functionality

  5. What is the old behavior before changes and new behavior after changes? (Please add any example/logs/screen-shot if available)

  6. 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

  7. TO-DOs, if any: (Please describe pending items and provide Github issues# for each of them)

  8. 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.

@palashhedau palashhedau requested a review from a team as a code owner January 29, 2021 02:17
@codecov
Copy link

codecov bot commented Jan 29, 2021

Codecov Report

Merging #1000 (3fc065f) into main (68e7e08) will decrease coverage by 0.35%.
The diff coverage is 38.15%.

Impacted file tree graph

@@             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     
Impacted Files Coverage Δ Complexity Δ
...ic/auth/http/jwt/AbstractHTTPJwtAuthenticator.java 47.25% <0.00%> (-2.75%) 11.00 <0.00> (ø)
...c/auth/ldap/backend/LDAPAuthenticationBackend.java 79.27% <ø> (ø) 23.00 <0.00> (ø)
...on/dlic/auth/ldap2/LDAPAuthenticationBackend2.java 66.01% <ø> (ø) 16.00 <0.00> (ø)
...ticsearch/security/auth/AuthenticationBackend.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
...earch/security/auth/SyncAuthenticationBackend.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
...search/security/auth/SyncAuthorizationBackend.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
...urity/auth/internal/NoOpAuthenticationBackend.java 80.00% <ø> (ø) 3.00 <0.00> (ø)
...forelasticsearch/security/authtoken/AuthToken.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
.../authenticator/AuthTokenAuthenticationBackend.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
...n/authenticator/AuthTokenHttpJwtAuthenticator.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
... and 21 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 68e7e08...3fc065f. Read the comment docs.

@cliu123 cliu123 changed the base branch from master to main February 6, 2021 00:08
Copy link
Contributor

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

Copy link
Contributor Author

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;
}

Copy link
Contributor

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?

Copy link
Contributor Author

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

Copy link
Contributor Author

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 :)

Copy link
Contributor

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?

Copy link
Contributor Author

@palashhedau palashhedau Feb 12, 2021

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

@peternied
Copy link
Member

@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.

@peternied peternied closed this Jun 7, 2022
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