|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.hadoop.minikdc.MiniKdc
public class MiniKdc
Mini KDC based on Apache Directory Server that can be embedded in testcases or used from command line as a standalone KDC.
From within testcases: MiniKdc sets 2 System properties when started and un-sets them when stopped:
| Field Summary | |
|---|---|
static String |
DEBUG
|
static String |
INSTANCE
|
static String |
KDC_BIND_ADDRESS
|
static String |
KDC_PORT
|
static String |
MAX_RENEWABLE_LIFETIME
|
static String |
MAX_TICKET_LIFETIME
|
static String |
ORG_DOMAIN
|
static String |
ORG_NAME
|
static String |
TRANSPORT
|
| Constructor Summary | |
|---|---|
MiniKdc(Properties conf,
File workDir)
Creates a MiniKdc. |
|
| Method Summary | |
|---|---|
static Properties |
createConf()
Convenience method that returns MiniKdc default configuration. |
void |
createPrincipal(File keytabFile,
String... principals)
Creates multiple principals in the KDC and adds them to a keytab file. |
void |
createPrincipal(String principal,
String password)
Creates a principal in the KDC with the specified user and password. |
String |
getHost()
Returns the host of the MiniKdc. |
File |
getKrb5conf()
|
int |
getPort()
Returns the port of the MiniKdc. |
String |
getRealm()
Returns the realm of the MiniKdc. |
static void |
main(String[] args)
|
void |
start()
Starts the MiniKdc. |
void |
stop()
Stops the MiniKdc |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String ORG_NAME
public static final String ORG_DOMAIN
public static final String KDC_BIND_ADDRESS
public static final String KDC_PORT
public static final String INSTANCE
public static final String MAX_TICKET_LIFETIME
public static final String MAX_RENEWABLE_LIFETIME
public static final String TRANSPORT
public static final String DEBUG
| Constructor Detail |
|---|
public MiniKdc(Properties conf,
File workDir)
throws Exception
conf - MiniKdc configuration.workDir - working directory, it should be the build directory. Under
this directory an ApacheDS working directory will be created, this
directory will be deleted when the MiniKdc stops.
Exception - thrown if the MiniKdc could not be created.| Method Detail |
|---|
public static void main(String[] args)
throws Exception
Exceptionpublic static Properties createConf()
public int getPort()
public String getHost()
public String getRealm()
public File getKrb5conf()
public void start()
throws Exception
Exception - thrown if the MiniKdc could not be started.public void stop()
Exception
public void createPrincipal(String principal,
String password)
throws Exception
principal - principal name, do not include the domain.password - password.
Exception - thrown if the principal could not be created.
public void createPrincipal(File keytabFile,
String... principals)
throws Exception
keytabFile - keytab file to add the created principal.sprincipals - principals to add to the KDC, do not include the domain.
Exception - thrown if the principals or the keytab file could not be
created.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||