-
Notifications
You must be signed in to change notification settings - Fork 25.5k
Handling access tokens #133106
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
Handling access tokens #133106
Conversation
Pinging @elastic/es-security (Team:Security) |
…ture/session-tokens
…ture/session-tokens
...gin/security/src/main/java/org/elasticsearch/xpack/security/authc/AuthenticationService.java
Outdated
Show resolved
Hide resolved
…om-authenticator-chain
…ture/session-tokens
…' into feature/session-tokens # Conflicts: # x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/apikey/CustomTokenAuthenticator.java # x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/AuthenticationService.java
...ck/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/Authentication.java
Outdated
Show resolved
Hide resolved
|
||
public class PluggableAuthenticatorChain implements Authenticator { | ||
|
||
public static final PluggableAuthenticatorChain EMPTY = new PluggableAuthenticatorChain(List.of()); |
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 is only used in test classes. Initially I had different idea, but went with other logic and checking if there are any custom authenticators in the chain. We can remove it.
...curity/src/main/java/org/elasticsearch/xpack/security/authc/PluggableAuthenticatorChain.java
Outdated
Show resolved
Hide resolved
...curity/src/main/java/org/elasticsearch/xpack/security/authc/PluggableAuthenticatorChain.java
Show resolved
Hide resolved
…ture/session-tokens
…ture/session-tokens
x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/Security.java
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.
LGTM 👍
The PR description needs updating to reflect the current changes.
Introduce the notion of
PluggableAuthenticatorChain
that allows a series of custom authenticators to be plugged in, each extending theCustomAuthenticator
interface. Consequently we no longer needPluggableApiKeyAuthenticator
.