Class DefaultAuthenticationServer

  • All Implemented Interfaces:
    alluxio.grpc.SaslAuthenticationServiceGrpc.AsyncService, AuthenticationServer, io.grpc.BindableService, java.io.Closeable, java.lang.AutoCloseable

    @ThreadSafe
    public class DefaultAuthenticationServer
    extends alluxio.grpc.SaslAuthenticationServiceGrpc.SaslAuthenticationServiceImplBase
    implements AuthenticationServer
    Default implementation of AuthenticationServer. Its functions include: -> Authentication server against which client channels could get authenticated -> Registry of identities for known channels during RPC calls.
    • Field Detail

      • mChannels

        protected final java.util.concurrent.ConcurrentHashMap<java.util.UUID,​alluxio.security.authentication.DefaultAuthenticationServer.AuthenticatedChannelInfo> mChannels
        List of channels authenticated against this server.
      • mScheduler

        protected final java.util.concurrent.ScheduledExecutorService mScheduler
        Scheduler for periodic cleaning of channels registry.
      • mHostName

        protected final java.lang.String mHostName
        Address of the authentication host.
      • mCleanupIntervalMs

        protected final long mCleanupIntervalMs
        Interval for clean-up task to fire.
    • Constructor Detail

      • DefaultAuthenticationServer

        public DefaultAuthenticationServer​(java.lang.String hostName,
                                           AlluxioConfiguration conf)
        Creates DefaultAuthenticationServer instance.
        Parameters:
        hostName - host name of the server
        conf - Alluxio client configuration
    • Method Detail

      • getImpersonationAuthenticator

        protected ImpersonationAuthenticator getImpersonationAuthenticator()
        Returns:
        the impersonation authenticator
      • authenticate

        public io.grpc.stub.StreamObserver<alluxio.grpc.SaslMessage> authenticate​(io.grpc.stub.StreamObserver<alluxio.grpc.SaslMessage> responseObserver)
        Specified by:
        authenticate in interface alluxio.grpc.SaslAuthenticationServiceGrpc.AsyncService
      • createSaslHandler

        public SaslServerHandler createSaslHandler​(alluxio.grpc.ChannelAuthenticationScheme authScheme)
                                            throws javax.security.sasl.SaslException
        Description copied from interface: AuthenticationServer
        Creates server-side Sasl handler for given scheme.
        Specified by:
        createSaslHandler in interface AuthenticationServer
        Parameters:
        authScheme - the authentication scheme
        Returns:
        the created SaslServerHandler instance
        Throws:
        javax.security.sasl.SaslException
      • close

        public void close()
        Description copied from interface: AuthenticationServer
        Closes the server, releases all authentication sessions.
        Specified by:
        close in interface AuthenticationServer
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
      • checkSupported

        protected void checkSupported​(AuthType authType)
        Used to check if given authentication is supported by the server.
        Parameters:
        authType - authentication type
        Throws:
        java.lang.RuntimeException - if not supported