@Override public HopsSSLCryptoMaterial check(UserGroupInformation ugi, Set<String> proxySuperUsers, Configuration configuration, CertificateLocalization certificateLocalization) throws IOException { String username = ugi.getUserName(); if (username.matches(HopsSSLSocketFactory.USERNAME_PATTERN) || !proxySuperUsers.contains(username)) { if (certificateLocalization != null) { try { String appId = ugi.getApplicationId(); if (appId == null) { throw new IOException("UserGroupInformation does NOT contain the Application ID"); } CryptoMaterial material = certificateLocalization.getMaterialLocation(username, appId); return new HopsSSLCryptoMaterial( material.getKeyStoreLocation().toString(), material.getKeyStorePass(), material.getTrustStoreLocation().toString(), material.getTrustStorePass()); } catch (InterruptedException ex) { throw new IOException(ex); } } } return null; } }