private static List<ACL> mkTopoAcls(Map<String, Object> topoConf, int perms) { List<ACL> aclList = null; String payload = (String) topoConf.get(Config.STORM_ZOOKEEPER_TOPOLOGY_AUTH_PAYLOAD); if (Utils.isZkAuthenticationConfiguredTopology(topoConf)) { aclList = new ArrayList<>(); ACL acl1 = ZooDefs.Ids.CREATOR_ALL_ACL.get(0); aclList.add(acl1); try { ACL acl2 = new ACL(perms, new Id("digest", DigestAuthenticationProvider.generateDigest(payload))); aclList.add(acl2); } catch (NoSuchAlgorithmException e) { //Should only happen on a badly configured system throw new RuntimeException(e); } } return aclList; }
String payload = (String) topoConf.get(Config.STORM_ZOOKEEPER_TOPOLOGY_AUTH_PAYLOAD); try { topoToZkCreds.put(topoId, new Id("digest", DigestAuthenticationProvider.generateDigest(payload))); } catch (NoSuchAlgorithmException e) { throw new RuntimeException(e);
private static List<ACL> mkTopoAcls(Map<String, Object> topoConf, int perms) { List<ACL> aclList = null; String payload = (String) topoConf.get(Config.STORM_ZOOKEEPER_TOPOLOGY_AUTH_PAYLOAD); if (Utils.isZkAuthenticationConfiguredTopology(topoConf)) { aclList = new ArrayList<>(); ACL acl1 = ZooDefs.Ids.CREATOR_ALL_ACL.get(0); aclList.add(acl1); try { ACL acl2 = new ACL(perms, new Id("digest", DigestAuthenticationProvider.generateDigest(payload))); aclList.add(acl2); } catch (NoSuchAlgorithmException e) { //Should only happen on a badly configured system throw new RuntimeException(e); } } return aclList; }
String payload = (String) topoConf.get(Config.STORM_ZOOKEEPER_TOPOLOGY_AUTH_PAYLOAD); try { topoToZkCreds.put(topoId, new Id("digest", DigestAuthenticationProvider.generateDigest(payload))); } catch (NoSuchAlgorithmException e) { throw new RuntimeException(e);