Package org.apache.bookkeeper.tls
Class BookieAuthZFactory
java.lang.Object
org.apache.bookkeeper.tls.BookieAuthZFactory
- All Implemented Interfaces:
BookieAuthProvider.Factory
Authorization factory class.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet Auth provider plugin name.voidinit(ServerConfiguration conf) Initialize the factory with the server configuration and protobuf message registry.newProvider(BookieConnectionPeer addr, AuthCallbacks.GenericCallback<Void> completeCb) Create a new instance of a bookie auth provider.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.bookkeeper.auth.BookieAuthProvider.Factory
close
-
Field Details
-
allowedRoles
-
-
Constructor Details
-
BookieAuthZFactory
public BookieAuthZFactory()
-
-
Method Details
-
getPluginName
Description copied from interface:BookieAuthProvider.FactoryGet Auth provider plugin name. Used as a sanity check to ensure that the bookie and the client. are using the same auth provider.- Specified by:
getPluginNamein interfaceBookieAuthProvider.Factory
-
init
Description copied from interface:BookieAuthProvider.FactoryInitialize the factory with the server configuration and protobuf message registry. Implementors must add any extension messages which contain the auth payload, so that the server can decode auth messages it receives from the client.- Specified by:
initin interfaceBookieAuthProvider.Factory- Throws:
IOException
-
newProvider
public BookieAuthProvider newProvider(BookieConnectionPeer addr, AuthCallbacks.GenericCallback<Void> completeCb) Description copied from interface:BookieAuthProvider.FactoryCreate a new instance of a bookie auth provider. Each connection should get its own instance, as they can hold connection specific state. The completeCb is used to notify the server that the authentication handshake is complete. CompleteCb should be called only once. If the authentication was successful, BKException.Code.OK should be passed as the return code. Otherwise, another error code should be passed. If authentication fails, the server will close the connection.- Specified by:
newProviderin interfaceBookieAuthProvider.Factory- Parameters:
addr- an handle to the connectioncompleteCb- callback to be notified when authentication is complete.
-