use of org.apache.accumulo.harness.TestingKdc in project accumulo by apache.
the class KerberosIT method startKdc.
@BeforeClass
public static void startKdc() throws Exception {
kdc = new TestingKdc();
kdc.start();
krbEnabledForITs = System.getProperty(MiniClusterHarness.USE_KERBEROS_FOR_IT_OPTION);
if (null == krbEnabledForITs || !Boolean.parseBoolean(krbEnabledForITs)) {
System.setProperty(MiniClusterHarness.USE_KERBEROS_FOR_IT_OPTION, "true");
}
rootUser = kdc.getRootUser();
}
use of org.apache.accumulo.harness.TestingKdc in project accumulo by apache.
the class KerberosProxyIT method startKdc.
@BeforeClass
public static void startKdc() throws Exception {
kdc = new TestingKdc();
kdc.start();
krbEnabledForITs = System.getProperty(MiniClusterHarness.USE_KERBEROS_FOR_IT_OPTION);
if (null == krbEnabledForITs || !Boolean.parseBoolean(krbEnabledForITs)) {
System.setProperty(MiniClusterHarness.USE_KERBEROS_FOR_IT_OPTION, "true");
}
// Create a principal+keytab for the proxy
proxyKeytab = new File(kdc.getKeytabDir(), "proxy.keytab");
hostname = InetAddress.getLocalHost().getCanonicalHostName();
// Set the primary because the client needs to know it
proxyPrimary = "proxy";
// Qualify with an instance
proxyPrincipal = proxyPrimary + "/" + hostname;
kdc.createPrincipal(proxyKeytab, proxyPrincipal);
// Tack on the realm too
proxyPrincipal = kdc.qualifyUser(proxyPrincipal);
}
use of org.apache.accumulo.harness.TestingKdc in project accumulo by apache.
the class KerberosRenewalIT method startKdc.
@BeforeClass
public static void startKdc() throws Exception {
// 30s renewal time window
kdc = new TestingKdc(TestingKdc.computeKdcDir(), TestingKdc.computeKeytabDir(), TICKET_LIFETIME);
kdc.start();
krbEnabledForITs = System.getProperty(MiniClusterHarness.USE_KERBEROS_FOR_IT_OPTION);
if (null == krbEnabledForITs || !Boolean.parseBoolean(krbEnabledForITs)) {
System.setProperty(MiniClusterHarness.USE_KERBEROS_FOR_IT_OPTION, "true");
}
rootUser = kdc.getRootUser();
}
Aggregations