Interface JwtRetriever
- All Superinterfaces:
AutoCloseable
,Closeable
,org.apache.kafka.common.security.oauthbearer.internals.secured.OAuthBearerConfigurable
- All Known Implementing Classes:
ClientCredentialsJwtRetriever
,DefaultJwtRetriever
,FileJwtRetriever
,JwtBearerJwtRetriever
public interface JwtRetriever
extends org.apache.kafka.common.security.oauthbearer.internals.secured.OAuthBearerConfigurable
A
JwtRetriever
is the internal API by which the login module will
retrieve an access token for use in authorization by the broker. The implementation may
involve authentication to a remote system, or it can be as simple as loading the contents
of a file or configuration setting.
Retrieval is a separate concern from validation, so it isn't necessary for
the JwtRetriever
implementation to validate the integrity of the JWT
access token.- See Also:
-
HttpJwtRetriever
FileJwtRetriever
-
Method Summary
Methods inherited from interface org.apache.kafka.common.security.oauthbearer.internals.secured.OAuthBearerConfigurable
close, configure
-
Method Details
-
retrieve
Retrieves a JWT access token in its serialized three-part form. The implementation is free to determine how it should be retrieved but should not perform validation on the result. Note: This is a blocking function and callers should be aware that the implementation may be communicating over a network, with the file system, coordinating threads, etc. The facility in theLoginModule
from which this is ultimately called does not provide an asynchronous approach.- Returns:
- Non-
null
JWT access token string - Throws:
JwtRetrieverException
- Thrown on errors related to IO during retrieval
-