Class SecureClientHandler

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

    @Sharable
    public class SecureClientHandler
    extends io.netty.channel.ChannelInboundHandlerAdapter
    This is a port of the com.linkedin.security.netty.ssl.access.control.SecureClientHandler class as a netty 4 implementation. Created by acurtis on 9/7/17.
    • Nested Class Summary

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

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

      Fields 
      Modifier and Type Field Description
      static io.netty.util.AttributeKey<java.security.cert.X509Certificate> CLIENT_CERTIFICATE_ATTRIBUTE_KEY  
    • Constructor Summary

      Constructors 
      Constructor Description
      SecureClientHandler()  
      SecureClientHandler​(java.util.function.BiPredicate<io.netty.channel.ChannelHandlerContext,​java.security.cert.X509Certificate> clientCertificateValidation)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void sslHandshakeComplete​(io.netty.channel.ChannelHandlerContext ctx, io.netty.handler.ssl.SslHandshakeCompletionEvent evt)  
      void userEventTriggered​(io.netty.channel.ChannelHandlerContext ctx, java.lang.Object evt)  
      • Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter

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

        ensureNotSharable, handlerAdded, handlerRemoved, 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, handlerRemoved
    • Field Detail

      • CLIENT_CERTIFICATE_ATTRIBUTE_KEY

        public static final io.netty.util.AttributeKey<java.security.cert.X509Certificate> CLIENT_CERTIFICATE_ATTRIBUTE_KEY
    • Constructor Detail

      • SecureClientHandler

        public SecureClientHandler()
      • SecureClientHandler

        public SecureClientHandler​(java.util.function.BiPredicate<io.netty.channel.ChannelHandlerContext,​java.security.cert.X509Certificate> clientCertificateValidation)
    • Method Detail

      • sslHandshakeComplete

        protected void sslHandshakeComplete​(io.netty.channel.ChannelHandlerContext ctx,
                                            io.netty.handler.ssl.SslHandshakeCompletionEvent evt)
      • userEventTriggered

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