Class MaprZKAuthProvider

  • All Implemented Interfaces:
    org.apache.zookeeper.server.auth.AuthenticationProvider

    public class MaprZKAuthProvider
    extends java.lang.Object
    implements org.apache.zookeeper.server.auth.AuthenticationProvider
    Mapr Zookeeper Authentication and Authorization provider authenticates incoming requests based on their userticket + epoch since it is only server authentication
    • Constructor Summary

      Constructors 
      Constructor Description
      MaprZKAuthProvider()
      As this is called once during ProviderRegistry init this is a good place to init my own ticket and set Security needed data
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getScheme()  
      org.apache.zookeeper.KeeperException.Code handleAuthentication​(org.apache.zookeeper.server.ServerCnxn cnxn, byte[] authData)  
      boolean isAuthenticated()  
      boolean isValid​(java.lang.String id)  
      boolean matches​(java.lang.String id, java.lang.String aclExpr)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • MAPR_ZK_AUTH_PROVIDER_SCHEME

        public static final java.lang.String MAPR_ZK_AUTH_PROVIDER_SCHEME
        See Also:
        Constant Field Values
    • Constructor Detail

      • MaprZKAuthProvider

        public MaprZKAuthProvider()
                           throws java.lang.InstantiationException
        As this is called once during ProviderRegistry init this is a good place to init my own ticket and set Security needed data
        Throws:
        java.lang.InstantiationException
    • Method Detail

      • getScheme

        public java.lang.String getScheme()
        Specified by:
        getScheme in interface org.apache.zookeeper.server.auth.AuthenticationProvider
      • handleAuthentication

        public org.apache.zookeeper.KeeperException.Code handleAuthentication​(org.apache.zookeeper.server.ServerCnxn cnxn,
                                                                              byte[] authData)
        Specified by:
        handleAuthentication in interface org.apache.zookeeper.server.auth.AuthenticationProvider
      • isAuthenticated

        public boolean isAuthenticated()
        Specified by:
        isAuthenticated in interface org.apache.zookeeper.server.auth.AuthenticationProvider
      • isValid

        public boolean isValid​(java.lang.String id)
        Specified by:
        isValid in interface org.apache.zookeeper.server.auth.AuthenticationProvider
      • matches

        public boolean matches​(java.lang.String id,
                               java.lang.String aclExpr)
        Specified by:
        matches in interface org.apache.zookeeper.server.auth.AuthenticationProvider