public static void BeforeSecureRegistryTestClass() { registrySecurity = new RegistrySecurity("registrySecurity"); registrySecurity.Init(Conf); SetupKDCAndPrincipals(); RegistrySecurity.ClearJaasSystemProperties(); RegistrySecurity.BindJVMtoJAASFile(jaasFile); InitHadoopSecurity(); }
public static void SetupTestRegistrySecurityHelper() { Configuration conf = new Configuration(); conf.SetBoolean(KeyRegistrySecure, true); conf.Set(KeyRegistryKerberosRealm, "KERBEROS"); registrySecurity = new RegistrySecurity(string.Empty); // init the ACLs OUTSIDE A KERBEROS CLUSTER registrySecurity.Init(conf); }
public virtual void TestSecurityImpliesKerberos() { Configuration conf = new Configuration(); conf.SetBoolean("hadoop.security.authentication", true); conf.SetBoolean(KeyRegistrySecure, true); conf.Set(KeyRegistryKerberosRealm, "KERBEROS"); RegistrySecurity security = new RegistrySecurity("registry security"); try { security.Init(conf); } catch (Exception e) { NUnit.Framework.Assert.IsTrue("did not find " + RegistrySecurity.ENoKerberos + " in " + e, e.ToString().Contains(RegistrySecurity.ENoKerberos)); } }