Class TokenProvider
java.lang.Object
org.apache.hadoop.hbase.security.token.TokenProvider
- All Implemented Interfaces:
Coprocessor
,RegionCoprocessor
,org.apache.hadoop.hbase.protobuf.generated.AuthenticationProtos.AuthenticationService.Interface
@Private
public class TokenProvider
extends Object
implements org.apache.hadoop.hbase.protobuf.generated.AuthenticationProtos.AuthenticationService.Interface, RegionCoprocessor
Provides a service for obtaining authentication tokens via the
AuthenticationProtos
AuthenticationService coprocessor service.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.hadoop.hbase.Coprocessor
Coprocessor.State
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final org.slf4j.Logger
private AuthenticationTokenSecretManager
Fields inherited from interface org.apache.hadoop.hbase.Coprocessor
PRIORITY_HIGHEST, PRIORITY_LOWEST, PRIORITY_SYSTEM, PRIORITY_USER, VERSION
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
getAuthenticationToken
(com.google.protobuf.RpcController controller, org.apache.hadoop.hbase.protobuf.generated.AuthenticationProtos.GetAuthenticationTokenRequest request, com.google.protobuf.RpcCallback<org.apache.hadoop.hbase.protobuf.generated.AuthenticationProtos.GetAuthenticationTokenResponse> done) Iterable<com.google.protobuf.Service>
Coprocessor endpoints providing protobuf services should override this method.private boolean
isAllowedDelegationTokenOp
(org.apache.hadoop.security.UserGroupInformation ugi) void
Called by theCoprocessorEnvironment
during it's own startup to initialize the coprocessor.void
Called by theCoprocessorEnvironment
during it's own shutdown to stop the coprocessor.void
whoAmI
(com.google.protobuf.RpcController controller, org.apache.hadoop.hbase.protobuf.generated.AuthenticationProtos.WhoAmIRequest request, com.google.protobuf.RpcCallback<org.apache.hadoop.hbase.protobuf.generated.AuthenticationProtos.WhoAmIResponse> done) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.hadoop.hbase.coprocessor.RegionCoprocessor
getBulkLoadObserver, getEndpointObserver, getRegionObserver
-
Field Details
-
LOG
-
secretManager
-
-
Constructor Details
-
TokenProvider
public TokenProvider()
-
-
Method Details
-
start
Description copied from interface:Coprocessor
Called by theCoprocessorEnvironment
during it's own startup to initialize the coprocessor.- Specified by:
start
in interfaceCoprocessor
-
stop
Description copied from interface:Coprocessor
Called by theCoprocessorEnvironment
during it's own shutdown to stop the coprocessor.- Specified by:
stop
in interfaceCoprocessor
- Throws:
IOException
-
isAllowedDelegationTokenOp
private boolean isAllowedDelegationTokenOp(org.apache.hadoop.security.UserGroupInformation ugi) throws IOException - Parameters:
ugi
- A user group information.- Returns:
- true if delegation token operation is allowed
- Throws:
IOException
-
getServices
Description copied from interface:Coprocessor
Coprocessor endpoints providing protobuf services should override this method.- Specified by:
getServices
in interfaceCoprocessor
- Returns:
- Iterable of
Service
s or empty collection. Implementations should never return null.
-
getAuthenticationToken
public void getAuthenticationToken(com.google.protobuf.RpcController controller, org.apache.hadoop.hbase.protobuf.generated.AuthenticationProtos.GetAuthenticationTokenRequest request, com.google.protobuf.RpcCallback<org.apache.hadoop.hbase.protobuf.generated.AuthenticationProtos.GetAuthenticationTokenResponse> done) - Specified by:
getAuthenticationToken
in interfaceorg.apache.hadoop.hbase.protobuf.generated.AuthenticationProtos.AuthenticationService.Interface
-
whoAmI
public void whoAmI(com.google.protobuf.RpcController controller, org.apache.hadoop.hbase.protobuf.generated.AuthenticationProtos.WhoAmIRequest request, com.google.protobuf.RpcCallback<org.apache.hadoop.hbase.protobuf.generated.AuthenticationProtos.WhoAmIResponse> done) - Specified by:
whoAmI
in interfaceorg.apache.hadoop.hbase.protobuf.generated.AuthenticationProtos.AuthenticationService.Interface
-