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
FieldsModifier and TypeFieldDescriptionprivate static final org.slf4j.Loggerprivate AuthenticationTokenSecretManagerFields inherited from interface org.apache.hadoop.hbase.Coprocessor
PRIORITY_HIGHEST, PRIORITY_LOWEST, PRIORITY_SYSTEM, PRIORITY_USER, VERSION -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidgetAuthenticationToken(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 booleanisAllowedDelegationTokenOp(org.apache.hadoop.security.UserGroupInformation ugi) voidCalled by theCoprocessorEnvironmentduring it's own startup to initialize the coprocessor.voidCalled by theCoprocessorEnvironmentduring it's own shutdown to stop the coprocessor.voidwhoAmI(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, waitMethods 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:CoprocessorCalled by theCoprocessorEnvironmentduring it's own startup to initialize the coprocessor.- Specified by:
startin interfaceCoprocessor
-
stop
Description copied from interface:CoprocessorCalled by theCoprocessorEnvironmentduring it's own shutdown to stop the coprocessor.- Specified by:
stopin 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:CoprocessorCoprocessor endpoints providing protobuf services should override this method.- Specified by:
getServicesin interfaceCoprocessor- Returns:
- Iterable of
Services 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:
getAuthenticationTokenin 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:
whoAmIin interfaceorg.apache.hadoop.hbase.protobuf.generated.AuthenticationProtos.AuthenticationService.Interface
-