props.put(Sasl.SERVER_AUTH, "true"); String protocol = adminServerContext.getConfig().getProtocol(); String serverName = adminServerContext.getConfig().getServerName(); CallbackHandler callbackHandler = new SaslGssCallbackHandler();
props.put(Sasl.SERVER_AUTH, "true"); String protocol = adminServerContext.getConfig().getProtocol(); String serverName = adminServerContext.getConfig().getServerName(); CallbackHandler callbackHandler = new SaslGssCallbackHandler();
void initKdc(File confDir) throws KrbException { kadmin = new LocalKadminImpl(confDir); try { kadmin.createBuiltinPrincipals(); kadmin.exportKeytab(adminKeytabFile, kadmin.getKadminPrincipal()); System.out.println("The keytab for kadmin principal " + "has been exported to the specified file " + adminKeytabFile.getAbsolutePath() + ", please keep it safe, " + "in order to use kadmin tool later"); // Export protocol keytab file for remote admin tool AdminServer adminServer = new AdminServer(confDir); AdminServerConfig adminServerConfig = adminServer.getAdminServerConfig(); String principal = adminServerConfig.getProtocol() + "/" + adminServerConfig.getAdminHost() + "@" + adminServerConfig.getAdminRealm(); kadmin.addPrincipal(principal); kadmin.exportKeytab(protocolKeytabFile, principal); System.out.println("The keytab for protocol principal " + "has been exported to the specified file " + protocolKeytabFile.getAbsolutePath() + ", please keep it safe, " + "in order to use remote kadmin tool later"); } finally { kadmin.release(); } }
private void saslNegotiation() throws Exception { String principal = adminServerContext.getConfig().getProtocol() + "/" + adminServerContext.getConfig().getAdminHost();
private void saslNegotiation() throws Exception { String principal = adminServerContext.getConfig().getProtocol() + "/" + adminServerContext.getConfig().getAdminHost();