@Test public void testDefaults() { KMSACLs acls = new KMSACLs(new Configuration(false)); for (KMSACLs.Type type : KMSACLs.Type.values()) { Assert.assertTrue(acls.hasAccess(type, UserGroupInformation.createRemoteUser("foo"))); } }
public boolean hasAccess(Type type, UserGroupInformation ugi) { boolean access = acls.get(type).isUserAllowed(ugi); if (access) { AccessControlList blacklist = blacklistedAcls.get(type); access = (blacklist == null) || !blacklist.isUserInList(ugi); } return access; }
KMSACLs implements Runnable, KeyACLs { public boolean hasAccess(Type type, UserGroupInformation ugi) { boolean access = acls.get(type).isUserAllowed(ugi); if (access) { AccessControlList blacklist = blacklistedAcls.get(type); access = (blacklist == null) || !blacklist.isUserInList(ugi); } return access; } }
KMSACLs implements Runnable, KeyACLs { public boolean hasAccess(Type type, UserGroupInformation ugi) { boolean access = acls.get(type).isUserAllowed(ugi); if (access) { AccessControlList blacklist = blacklistedAcls.get(type); access = (blacklist == null) || !blacklist.isUserInList(ugi); } return access; } KMSACLs(Configuration conf);  KMSACLs(); }
KMSACLs implements Runnable, KeyACLs { public boolean hasAccess(Type type, UserGroupInformation ugi) { boolean access = acls.get(type).isUserAllowed(ugi); if (access) { AccessControlList blacklist = blacklistedAcls.get(type); access = (blacklist == null) || !blacklist.isUserInList(ugi); } return access; } KMSACLs(Configuration conf);  KMSACLs(); @Override void run(); synchronized void startReloader(); synchronized void stopReloader(); boolean hasAccess(Type type, UserGroupInformation ugi); void assertAccess(KMSACLs.Type aclType,
      UserGroupInformation ugi, KMSOp operation, String key); @Override boolean hasAccessToKey(String keyName, UserGroupInformation ugi,
      KeyOpType opType); @Override boolean isACLPresent(String keyName, KeyOpType opType); }
KMSACLs implements Runnable, KeyACLs { public boolean hasAccess(Type type, UserGroupInformation ugi) { boolean access = acls.get(type).isUserAllowed(ugi); if (access) { AccessControlList blacklist = blacklistedAcls.get(type); access = (blacklist == null) || !blacklist.isUserInList(ugi); } return access; } KMSACLs(Configuration conf);  KMSACLs(); @Override void run(); synchronized void startReloader(); synchronized void stopReloader(); boolean hasAccess(Type type, UserGroupInformation ugi); void assertAccess(KMSACLs.Type aclType,
      UserGroupInformation ugi, KMSOp operation, String key); @Override boolean hasAccessToKey(String keyName, UserGroupInformation ugi,
      KeyOpType opType); @Override boolean isACLPresent(String keyName, KeyOpType opType); static final String ACL_DEFAULT; static final int RELOADER_SLEEP_MILLIS; }