Class TestingKdc


  • public class TestingKdc
    extends Object
    Creates a MiniKdc for tests to use to exercise secure Accumulo
    • Method Detail

      • computeKdcDir

        public static File computeKdcDir()
      • computeKeytabDir

        public static File computeKeytabDir()
      • start

        public void start()
                   throws Exception
        Starts the KDC and creates the principals and their keytabs
        Throws:
        Exception
      • getKeytabDir

        public File getKeytabDir()
        A directory where the automatically-created keytab files are written
      • getAccumuloServerUser

        public ClusterUser getAccumuloServerUser()
        A ClusterUser for Accumulo server processes to use
      • getClientPrincipal

        public ClusterUser getClientPrincipal​(int offset)
        The ClusterUser corresponding to the given offset. Represents an unprivileged user.
        Parameters:
        offset - The offset to fetch credentials for, valid through NUM_USERS
      • createPrincipal

        public void createPrincipal​(File keytabFile,
                                    String... principals)
                             throws Exception
        Throws:
        Exception
        See Also:
        MiniKdc.createPrincipal(File, String...)
      • getOrgName

        public String getOrgName()
        Returns:
        the name for the realm
      • getOrgDomain

        public String getOrgDomain()
        Returns:
        the domain for the realm
      • qualifyUser

        public String qualifyUser​(String primary)
        Qualify a username (only the primary from the kerberos principal) with the proper realm
        Parameters:
        primary - The primary or primary and instance