Class XrootdAuthenticationHandler

  • All Implemented Interfaces:
    io.netty.channel.ChannelHandler, io.netty.channel.ChannelInboundHandler

    public class XrootdAuthenticationHandler
    extends io.netty.channel.ChannelInboundHandlerAdapter
    Netty handler implementing Xrootd kXR_login, kXR_auth, and kXR_endsess. Delegates the authentication steps to an AuthenticationHandler. Rejects all other messages until login has completed. Note the difference between this class and AuthenticationHandler. The latter is part of a plugin implementing the core authentication logic whereas this class is a Netty handler. The class may be subclassed to override the authenticated method to add additional operations after authentication.
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler

        io.netty.channel.ChannelHandler.Sharable
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void channelInactive​(io.netty.channel.ChannelHandlerContext ctx)  
      void channelRead​(io.netty.channel.ChannelHandlerContext ctx, java.lang.Object msg)  
      ProxyDelegationClient getCredentialStoreClient()  
      void handlerRemoved​(io.netty.channel.ChannelHandlerContext ctx)  
      protected javax.security.auth.Subject login​(io.netty.channel.ChannelHandlerContext context, javax.security.auth.Subject subject)
      Called at the end of successful login/authentication.
      void setSigningPolicy​(SigningPolicy signingPolicy)  
      void setTlsSessionInfo​(TLSSessionInfo tlsSessionInfo)  
      • Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter

        channelActive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggered
      • Methods inherited from class io.netty.channel.ChannelHandlerAdapter

        ensureNotSharable, handlerAdded, isSharable
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface io.netty.channel.ChannelHandler

        handlerAdded
    • Method Detail

      • channelInactive

        public void channelInactive​(io.netty.channel.ChannelHandlerContext ctx)
                             throws java.lang.Exception
        Specified by:
        channelInactive in interface io.netty.channel.ChannelInboundHandler
        Overrides:
        channelInactive in class io.netty.channel.ChannelInboundHandlerAdapter
        Throws:
        java.lang.Exception
      • channelRead

        public void channelRead​(io.netty.channel.ChannelHandlerContext ctx,
                                java.lang.Object msg)
                         throws java.lang.Exception
        Specified by:
        channelRead in interface io.netty.channel.ChannelInboundHandler
        Overrides:
        channelRead in class io.netty.channel.ChannelInboundHandlerAdapter
        Throws:
        java.lang.Exception
      • handlerRemoved

        public void handlerRemoved​(io.netty.channel.ChannelHandlerContext ctx)
        Specified by:
        handlerRemoved in interface io.netty.channel.ChannelHandler
        Overrides:
        handlerRemoved in class io.netty.channel.ChannelHandlerAdapter
      • setSigningPolicy

        public void setSigningPolicy​(SigningPolicy signingPolicy)
      • setTlsSessionInfo

        public void setTlsSessionInfo​(TLSSessionInfo tlsSessionInfo)
      • login

        protected javax.security.auth.Subject login​(io.netty.channel.ChannelHandlerContext context,
                                                    javax.security.auth.Subject subject)
                                             throws XrootdException
        Called at the end of successful login/authentication. Subclasses may override this method to add additional processing and internal mapping of the Subject. If the subclass throws XrootdException then the login is aborted.
        Parameters:
        context - the Netty context
        subject - the subject that logged in
        Throws:
        XrootdException