Package alluxio.security.authentication
Interface AuthenticationServer
-
- All Superinterfaces:
java.lang.AutoCloseable
,io.grpc.BindableService
,java.io.Closeable
- All Known Implementing Classes:
DefaultAuthenticationServer
public interface AuthenticationServer extends io.grpc.BindableService, java.io.Closeable
Interface for authentication server implementations.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
close()
Closes the server, releases all authentication sessions.SaslServerHandler
createSaslHandler(alluxio.grpc.ChannelAuthenticationScheme scheme)
Creates server-side Sasl handler for given scheme.AuthenticatedUserInfo
getUserInfoForChannel(java.util.UUID channelId)
void
registerChannel(java.util.UUID channelId, AuthenticatedUserInfo userInfo, AuthenticatedChannelServerDriver saslDriver)
Registers new user against given channel.void
unregisterChannel(java.util.UUID channelId)
Unregisters given channel.
-
-
-
Method Detail
-
registerChannel
void registerChannel(java.util.UUID channelId, AuthenticatedUserInfo userInfo, AuthenticatedChannelServerDriver saslDriver)
Registers new user against given channel.- Parameters:
channelId
- channel iduserInfo
- authanticated user infosaslDriver
- sasl server driver
-
getUserInfoForChannel
AuthenticatedUserInfo getUserInfoForChannel(java.util.UUID channelId) throws UnauthenticatedException
- Parameters:
channelId
- channel id- Returns:
- info of user that is authenticated with the given channel
- Throws:
UnauthenticatedException
- if given channel is not registered
-
unregisterChannel
void unregisterChannel(java.util.UUID channelId)
Unregisters given channel.- Parameters:
channelId
- channel id
-
createSaslHandler
SaslServerHandler createSaslHandler(alluxio.grpc.ChannelAuthenticationScheme scheme) throws javax.security.sasl.SaslException
Creates server-side Sasl handler for given scheme.- Parameters:
scheme
- the authentication scheme- Returns:
- the created
SaslServerHandler
instance - Throws:
javax.security.sasl.SaslException
-
close
void close() throws java.io.IOException
Closes the server, releases all authentication sessions.- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Throws:
java.io.IOException
-
-