Java 类org.apache.zookeeper.server.ZooKeeperSaslServer 实例源码

项目:fuck_zookeeper    文件:SaslServerCallbackHandler.java   
public SaslServerCallbackHandler(Configuration configuration) throws IOException {
    String serverSection = System.getProperty(ZooKeeperSaslServer.LOGIN_CONTEXT_NAME_KEY,
                                              ZooKeeperSaslServer.DEFAULT_LOGIN_CONTEXT_NAME);
    AppConfigurationEntry configurationEntries[] = configuration.getAppConfigurationEntry(serverSection);

    if (configurationEntries == null) {
        String errorMessage = "Could not find a 'Server' entry in this configuration: Server cannot start.";
        LOG.error(errorMessage);
        throw new IOException(errorMessage);
    }
    credentials.clear();
    for(AppConfigurationEntry entry: configurationEntries) {
        Map<String,?> options = entry.getOptions();
        // Populate DIGEST-MD5 user -> password map with JAAS configuration entries from the "Server" section.
        // Usernames are distinguished from other options by prefixing the username with a "user_" prefix.
        for(Map.Entry<String, ?> pair : options.entrySet()) {
            String key = pair.getKey();
            if (key.startsWith(USER_PREFIX)) {
                String userName = key.substring(USER_PREFIX.length());
                credentials.put(userName,(String)pair.getValue());
            }
        }
    }
}
项目:https-github.com-apache-zookeeper    文件:SaslServerCallbackHandler.java   
public SaslServerCallbackHandler(Configuration configuration) throws IOException {
    String serverSection = System.getProperty(ZooKeeperSaslServer.LOGIN_CONTEXT_NAME_KEY,
                                              ZooKeeperSaslServer.DEFAULT_LOGIN_CONTEXT_NAME);
    AppConfigurationEntry configurationEntries[] = configuration.getAppConfigurationEntry(serverSection);

    if (configurationEntries == null) {
        String errorMessage = "Could not find a 'Server' entry in this configuration: Server cannot start.";
        LOG.error(errorMessage);
        throw new IOException(errorMessage);
    }
    credentials.clear();
    for(AppConfigurationEntry entry: configurationEntries) {
        Map<String,?> options = entry.getOptions();
        // Populate DIGEST-MD5 user -> password map with JAAS configuration entries from the "Server" section.
        // Usernames are distinguished from other options by prefixing the username with a "user_" prefix.
        for(Map.Entry<String, ?> pair : options.entrySet()) {
            String key = pair.getKey();
            if (key.startsWith(USER_PREFIX)) {
                String userName = key.substring(USER_PREFIX.length());
                credentials.put(userName,(String)pair.getValue());
            }
        }
    }
}
项目:ZooKeeper    文件:SaslServerCallbackHandler.java   
public SaslServerCallbackHandler(Configuration configuration)
        throws IOException {
    String serverSection = System.getProperty(
            ZooKeeperSaslServer.LOGIN_CONTEXT_NAME_KEY,
            ZooKeeperSaslServer.DEFAULT_LOGIN_CONTEXT_NAME);
    AppConfigurationEntry configurationEntries[] = configuration.getAppConfigurationEntry(serverSection);

    if (configurationEntries == null) {
        String errorMessage = "Could not find a '" + serverSection + "' entry in this configuration: Server cannot start.";
        LOG.error(errorMessage);
        throw new IOException(errorMessage);
    }
    credentials.clear();
    for(AppConfigurationEntry entry: configurationEntries) {
        Map<String,?> options = entry.getOptions();
        // Populate DIGEST-MD5 user -> password map with JAAS configuration entries from the "Server" section.
        // Usernames are distinguished from other options by prefixing the username with a "user_" prefix.
        for(Map.Entry<String, ?> pair : options.entrySet()) {
            String key = pair.getKey();
            if (key.startsWith(USER_PREFIX)) {
                String userName = key.substring(USER_PREFIX.length());
                credentials.put(userName,(String)pair.getValue());
            }
        }
    }
}
项目:StreamProcessingInfrastructure    文件:SaslServerCallbackHandler.java   
public SaslServerCallbackHandler(Configuration configuration) throws IOException {
    String serverSection = System.getProperty(ZooKeeperSaslServer.LOGIN_CONTEXT_NAME_KEY,
                                              ZooKeeperSaslServer.DEFAULT_LOGIN_CONTEXT_NAME);
    AppConfigurationEntry configurationEntries[] = configuration.getAppConfigurationEntry(serverSection);

    if (configurationEntries == null) {
        String errorMessage = "Could not find a 'Server' entry in this configuration: Server cannot start.";
        LOG.error(errorMessage);
        throw new IOException(errorMessage);
    }
    credentials.clear();
    for(AppConfigurationEntry entry: configurationEntries) {
        Map<String,?> options = entry.getOptions();
        // Populate DIGEST-MD5 user -> password map with JAAS configuration entries from the "Server" section.
        // Usernames are distinguished from other options by prefixing the username with a "user_" prefix.
        for(Map.Entry<String, ?> pair : options.entrySet()) {
            String key = pair.getKey();
            if (key.startsWith(USER_PREFIX)) {
                String userName = key.substring(USER_PREFIX.length());
                credentials.put(userName,(String)pair.getValue());
            }
        }
    }
}
项目:bigstreams    文件:SaslServerCallbackHandler.java   
public SaslServerCallbackHandler(Configuration configuration) throws IOException {
    String serverSection = System.getProperty(ZooKeeperSaslServer.LOGIN_CONTEXT_NAME_KEY,
                                              ZooKeeperSaslServer.DEFAULT_LOGIN_CONTEXT_NAME);
    AppConfigurationEntry configurationEntries[] = configuration.getAppConfigurationEntry(serverSection);

    if (configurationEntries == null) {
        String errorMessage = "Could not find a 'Server' entry in this configuration: Server cannot start.";
        LOG.error(errorMessage);
        throw new IOException(errorMessage);
    }
    credentials.clear();
    for(AppConfigurationEntry entry: configurationEntries) {
        Map<String,?> options = entry.getOptions();
        // Populate DIGEST-MD5 user -> password map with JAAS configuration entries from the "Server" section.
        // Usernames are distinguished from other options by prefixing the username with a "user_" prefix.
        for(Map.Entry<String, ?> pair : options.entrySet()) {
            String key = pair.getKey();
            if (key.startsWith(USER_PREFIX)) {
                String userName = key.substring(USER_PREFIX.length());
                credentials.put(userName,(String)pair.getValue());
            }
        }
    }
}
项目:zookeeper-src-learning    文件:SaslServerCallbackHandler.java   
public SaslServerCallbackHandler(Configuration configuration) throws IOException {
    String serverSection = System.getProperty(ZooKeeperSaslServer.LOGIN_CONTEXT_NAME_KEY,
                                              ZooKeeperSaslServer.DEFAULT_LOGIN_CONTEXT_NAME);
    AppConfigurationEntry configurationEntries[] = configuration.getAppConfigurationEntry(serverSection);

    if (configurationEntries == null) {
        String errorMessage = "Could not find a 'Server' entry in this configuration: Server cannot start.";
        LOG.error(errorMessage);
        throw new IOException(errorMessage);
    }
    credentials.clear();
    for(AppConfigurationEntry entry: configurationEntries) {
        Map<String,?> options = entry.getOptions();
        // Populate DIGEST-MD5 user -> password map with JAAS configuration entries from the "Server" section.
        // Usernames are distinguished from other options by prefixing the username with a "user_" prefix.
        for(Map.Entry<String, ?> pair : options.entrySet()) {
            String key = pair.getKey();
            if (key.startsWith(USER_PREFIX)) {
                String userName = key.substring(USER_PREFIX.length());
                credentials.put(userName,(String)pair.getValue());
            }
        }
    }
}
项目:zookeeper    文件:SaslServerCallbackHandler.java   
public SaslServerCallbackHandler(Configuration configuration) throws IOException {
    String serverSection = System.getProperty(ZooKeeperSaslServer.LOGIN_CONTEXT_NAME_KEY,
                                              ZooKeeperSaslServer.DEFAULT_LOGIN_CONTEXT_NAME);
    AppConfigurationEntry configurationEntries[] = configuration.getAppConfigurationEntry(serverSection);

    if (configurationEntries == null) {
        String errorMessage = "Could not find a 'Server' entry in this configuration: Server cannot start.";
        LOG.error(errorMessage);
        throw new IOException(errorMessage);
    }
    credentials.clear();
    for(AppConfigurationEntry entry: configurationEntries) {
        Map<String,?> options = entry.getOptions();
        // Populate DIGEST-MD5 user -> password map with JAAS configuration entries from the "Server" section.
        // Usernames are distinguished from other options by prefixing the username with a "user_" prefix.
        for(Map.Entry<String, ?> pair : options.entrySet()) {
            String key = pair.getKey();
            if (key.startsWith(USER_PREFIX)) {
                String userName = key.substring(USER_PREFIX.length());
                credentials.put(userName,(String)pair.getValue());
            }
        }
    }
}
项目:SecureKeeper    文件:SaslServerCallbackHandler.java   
public SaslServerCallbackHandler(Configuration configuration) throws IOException {
    String serverSection = System.getProperty(ZooKeeperSaslServer.LOGIN_CONTEXT_NAME_KEY,
                                              ZooKeeperSaslServer.DEFAULT_LOGIN_CONTEXT_NAME);
    AppConfigurationEntry configurationEntries[] = configuration.getAppConfigurationEntry(serverSection);

    if (configurationEntries == null) {
        String errorMessage = "Could not find a 'Server' entry in this configuration: Server cannot start.";
        LOG.error(errorMessage);
        throw new IOException(errorMessage);
    }
    credentials.clear();
    for(AppConfigurationEntry entry: configurationEntries) {
        Map<String,?> options = entry.getOptions();
        // Populate DIGEST-MD5 user -> password map with JAAS configuration entries from the "Server" section.
        // Usernames are distinguished from other options by prefixing the username with a "user_" prefix.
        for(Map.Entry<String, ?> pair : options.entrySet()) {
            String key = pair.getKey();
            if (key.startsWith(USER_PREFIX)) {
                String userName = key.substring(USER_PREFIX.length());
                credentials.put(userName,(String)pair.getValue());
            }
        }
    }
}
项目:SecureKeeper    文件:SaslServerCallbackHandler.java   
public SaslServerCallbackHandler(Configuration configuration) throws IOException {
    String serverSection = System.getProperty(ZooKeeperSaslServer.LOGIN_CONTEXT_NAME_KEY,
                                              ZooKeeperSaslServer.DEFAULT_LOGIN_CONTEXT_NAME);
    AppConfigurationEntry configurationEntries[] = configuration.getAppConfigurationEntry(serverSection);

    if (configurationEntries == null) {
        String errorMessage = "Could not find a 'Server' entry in this configuration: Server cannot start.";
        LOG.error(errorMessage);
        throw new IOException(errorMessage);
    }
    credentials.clear();
    for(AppConfigurationEntry entry: configurationEntries) {
        Map<String,?> options = entry.getOptions();
        // Populate DIGEST-MD5 user -> password map with JAAS configuration entries from the "Server" section.
        // Usernames are distinguished from other options by prefixing the username with a "user_" prefix.
        for(Map.Entry<String, ?> pair : options.entrySet()) {
            String key = pair.getKey();
            if (key.startsWith(USER_PREFIX)) {
                String userName = key.substring(USER_PREFIX.length());
                credentials.put(userName,(String)pair.getValue());
            }
        }
    }
}
项目:StreamBench    文件:SaslServerCallbackHandler.java   
public SaslServerCallbackHandler(Configuration configuration) throws IOException {
    String serverSection = System.getProperty(ZooKeeperSaslServer.LOGIN_CONTEXT_NAME_KEY,
                                              ZooKeeperSaslServer.DEFAULT_LOGIN_CONTEXT_NAME);
    AppConfigurationEntry configurationEntries[] = configuration.getAppConfigurationEntry(serverSection);

    if (configurationEntries == null) {
        String errorMessage = "Could not find a 'Server' entry in this configuration: Server cannot start.";
        LOG.error(errorMessage);
        throw new IOException(errorMessage);
    }
    credentials.clear();
    for(AppConfigurationEntry entry: configurationEntries) {
        Map<String,?> options = entry.getOptions();
        // Populate DIGEST-MD5 user -> password map with JAAS configuration entries from the "Server" section.
        // Usernames are distinguished from other options by prefixing the username with a "user_" prefix.
        for(Map.Entry<String, ?> pair : options.entrySet()) {
            String key = pair.getKey();
            if (key.startsWith(USER_PREFIX)) {
                String userName = key.substring(USER_PREFIX.length());
                credentials.put(userName,(String)pair.getValue());
            }
        }
    }
}
项目:ACaZoo    文件:SaslServerCallbackHandler.java   
public SaslServerCallbackHandler(Configuration configuration) throws IOException {
    String serverSection = System.getProperty(ZooKeeperSaslServer.LOGIN_CONTEXT_NAME_KEY,
                                              ZooKeeperSaslServer.DEFAULT_LOGIN_CONTEXT_NAME);
    AppConfigurationEntry configurationEntries[] = configuration.getAppConfigurationEntry(serverSection);

    if (configurationEntries == null) {
        String errorMessage = "Could not find a 'Server' entry in this configuration: Server cannot start.";
        LOG.error(errorMessage);
        throw new IOException(errorMessage);
    }
    credentials.clear();
    for(AppConfigurationEntry entry: configurationEntries) {
        Map<String,?> options = entry.getOptions();
        // Populate DIGEST-MD5 user -> password map with JAAS configuration entries from the "Server" section.
        // Usernames are distinguished from other options by prefixing the username with a "user_" prefix.
        for(Map.Entry<String, ?> pair : options.entrySet()) {
            String key = pair.getKey();
            if (key.startsWith(USER_PREFIX)) {
                String userName = key.substring(USER_PREFIX.length());
                credentials.put(userName,(String)pair.getValue());
            }
        }
    }
}
项目:LoadBalanced_zk    文件:SaslServerCallbackHandler.java   
public SaslServerCallbackHandler(Configuration configuration) throws IOException {
    String serverSection = System.getProperty(ZooKeeperSaslServer.LOGIN_CONTEXT_NAME_KEY,
                                              ZooKeeperSaslServer.DEFAULT_LOGIN_CONTEXT_NAME);
    AppConfigurationEntry configurationEntries[] = configuration.getAppConfigurationEntry(serverSection);

    if (configurationEntries == null) {
        String errorMessage = "Could not find a 'Server' entry in this configuration: Server cannot start.";
        LOG.error(errorMessage);
        throw new IOException(errorMessage);
    }
    credentials.clear();
    for(AppConfigurationEntry entry: configurationEntries) {
        Map<String,?> options = entry.getOptions();
        // Populate DIGEST-MD5 user -> password map with JAAS configuration entries from the "Server" section.
        // Usernames are distinguished from other options by prefixing the username with a "user_" prefix.
        for(Map.Entry<String, ?> pair : options.entrySet()) {
            String key = pair.getKey();
            if (key.startsWith(USER_PREFIX)) {
                String userName = key.substring(USER_PREFIX.length());
                credentials.put(userName,(String)pair.getValue());
            }
        }
    }
}
项目:LoadBalanced_zk    文件:SaslServerCallbackHandler.java   
public SaslServerCallbackHandler(Configuration configuration) throws IOException {
    String serverSection = System.getProperty(ZooKeeperSaslServer.LOGIN_CONTEXT_NAME_KEY,
                                              ZooKeeperSaslServer.DEFAULT_LOGIN_CONTEXT_NAME);
    AppConfigurationEntry configurationEntries[] = configuration.getAppConfigurationEntry(serverSection);

    if (configurationEntries == null) {
        String errorMessage = "Could not find a 'Server' entry in this configuration: Server cannot start.";
        LOG.error(errorMessage);
        throw new IOException(errorMessage);
    }
    credentials.clear();
    for(AppConfigurationEntry entry: configurationEntries) {
        Map<String,?> options = entry.getOptions();
        // Populate DIGEST-MD5 user -> password map with JAAS configuration entries from the "Server" section.
        // Usernames are distinguished from other options by prefixing the username with a "user_" prefix.
        for(Map.Entry<String, ?> pair : options.entrySet()) {
            String key = pair.getKey();
            if (key.startsWith(USER_PREFIX)) {
                String userName = key.substring(USER_PREFIX.length());
                credentials.put(userName,(String)pair.getValue());
            }
        }
    }
}
项目:zookeeper-pkg    文件:SaslServerCallbackHandler.java   
public SaslServerCallbackHandler(Configuration configuration) throws IOException {
    String serverSection = System.getProperty(ZooKeeperSaslServer.LOGIN_CONTEXT_NAME_KEY,
                                              ZooKeeperSaslServer.DEFAULT_LOGIN_CONTEXT_NAME);
    AppConfigurationEntry configurationEntries[] = configuration.getAppConfigurationEntry(serverSection);

    if (configurationEntries == null) {
        String errorMessage = "Could not find a 'Server' entry in this configuration: Server cannot start.";
        LOG.error(errorMessage);
        throw new IOException(errorMessage);
    }
    credentials.clear();
    for(AppConfigurationEntry entry: configurationEntries) {
        Map<String,?> options = entry.getOptions();
        // Populate DIGEST-MD5 user -> password map with JAAS configuration entries from the "Server" section.
        // Usernames are distinguished from other options by prefixing the username with a "user_" prefix.
        for(Map.Entry<String, ?> pair : options.entrySet()) {
            String key = pair.getKey();
            if (key.startsWith(USER_PREFIX)) {
                String userName = key.substring(USER_PREFIX.length());
                credentials.put(userName,(String)pair.getValue());
            }
        }
    }
}
项目:https-github.com-apache-zookeeper    文件:Login.java   
private String getLoginContextMessage() {
    if (zkConfig instanceof ZKClientConfig) {
        return ZKClientConfig.LOGIN_CONTEXT_NAME_KEY + "(=" + zkConfig.getProperty(
                ZKClientConfig.LOGIN_CONTEXT_NAME_KEY, ZKClientConfig.LOGIN_CONTEXT_NAME_KEY_DEFAULT) + ")";
    } else {
        return ZooKeeperSaslServer.LOGIN_CONTEXT_NAME_KEY + "(=" + System.getProperty(
                ZooKeeperSaslServer.LOGIN_CONTEXT_NAME_KEY, ZooKeeperSaslServer.DEFAULT_LOGIN_CONTEXT_NAME) + ")";
    }
}
项目:incubator-sentry    文件:SentryServiceIntegrationBase.java   
protected static TestingServer getZKServer() throws Exception {
  if (!kerberos) {
    LOGGER.info("Creating a non-security ZooKeeper Server.");
    return new TestingServer();
  } else {
    LOGGER.info("Creating a security ZooKeeper Server.");
    // Not entirely sure exactly what "javax.security.auth.useSubjectCredsOnly=false" does, but it has something to do with
    // re-authenticating in cases where it otherwise wouldn't.  One of the sections on this page briefly mentions it:
    // http://docs.oracle.com/javase/7/docs/technotes/guides/security/jgss/tutorials/Troubleshooting.html
    System.setProperty("javax.security.auth.useSubjectCredsOnly", "false");

    // Setup KDC and principal
    kdc = getKdc();
    ZKKeytabFile = new File(kdcWorkDir, "test.keytab");
    kdc.createPrincipal(ZKKeytabFile, ZK_SERVER_PRINCIPAL);

    System.setProperty("zookeeper.authProvider.1", "org.apache.zookeeper.server.auth.SASLAuthenticationProvider");
    System.setProperty("zookeeper.kerberos.removeHostFromPrincipal", "true");
    System.setProperty("zookeeper.kerberos.removeRealmFromPrincipal", "true");

    JaasConfiguration.addEntryForKeytab("Server", ZK_SERVER_PRINCIPAL, ZKKeytabFile.getAbsolutePath());
    // Here's where we add the "Client" to the jaas configuration, even though we'd like not to
    JaasConfiguration.addEntryForKeytab(HAContext.SENTRY_ZK_JAAS_NAME,
        SERVER_KERBEROS_NAME, serverKeytab.getAbsolutePath());
    javax.security.auth.login.Configuration.setConfiguration(JaasConfiguration.getInstance());

    System.setProperty(ZooKeeperSaslServer.LOGIN_CONTEXT_NAME_KEY, "Server");

    return new TestingServer();
  }

}
项目:drill    文件:ZookeeperTestUtil.java   
/**
 * Sets zookeeper server and client SASL test config properties.
 */
public static void setZookeeperSaslTestConfigProps() {
  System.setProperty(ZooKeeperSaslServer.LOGIN_CONTEXT_NAME_KEY, "DrillTestServerForUnitTests");
  System.setProperty(ZooKeeperSaslClient.LOGIN_CONTEXT_NAME_KEY, "DrillTestClientForUnitTests");
}
项目:ditb    文件:ZKUtil.java   
/**
 * Log in the current zookeeper server process using the given configuration
 * keys for the credential file and login principal.
 *
 * <p><strong>This is only applicable when running on secure hbase</strong>
 * On regular HBase (without security features), this will safely be ignored.
 * </p>
 *
 * @param conf The configuration data to use
 * @param keytabFileKey Property key used to configure the path to the credential file
 * @param userNameKey Property key used to configure the login principal
 * @param hostname Current hostname to use in any credentials
 * @throws IOException underlying exception from SecurityUtil.login() call
 */
public static void loginServer(Configuration conf, String keytabFileKey,
    String userNameKey, String hostname) throws IOException {
  login(conf, keytabFileKey, userNameKey, hostname,
        ZooKeeperSaslServer.LOGIN_CONTEXT_NAME_KEY,
        JaasConfiguration.SERVER_KEYTAB_KERBEROS_CONFIG_NAME);
}
项目:LCIndex-HBase-0.94.16    文件:ZKUtil.java   
/**
 * Log in the current zookeeper server process using the given configuration
 * keys for the credential file and login principal.
 *
 * <p><strong>This is only applicable when running on secure hbase</strong>
 * On regular HBase (without security features), this will safely be ignored.
 * </p>
 *
 * @param conf The configuration data to use
 * @param keytabFileKey Property key used to configure the path to the credential file
 * @param userNameKey Property key used to configure the login principal
 * @param hostname Current hostname to use in any credentials
 * @throws IOException underlying exception from SecurityUtil.login() call
 */
public static void loginServer(Configuration conf, String keytabFileKey,
    String userNameKey, String hostname) throws IOException {
  login(conf, keytabFileKey, userNameKey, hostname,
        ZooKeeperSaslServer.LOGIN_CONTEXT_NAME_KEY,
        JaasConfiguration.SERVER_KEYTAB_KERBEROS_CONFIG_NAME);
}
项目:pbase    文件:ZKUtil.java   
/**
 * Log in the current zookeeper server process using the given configuration
 * keys for the credential file and login principal.
 *
 * <p><strong>This is only applicable when running on secure hbase</strong>
 * On regular HBase (without security features), this will safely be ignored.
 * </p>
 *
 * @param conf The configuration data to use
 * @param keytabFileKey Property key used to configure the path to the credential file
 * @param userNameKey Property key used to configure the login principal
 * @param hostname Current hostname to use in any credentials
 * @throws IOException underlying exception from SecurityUtil.login() call
 */
public static void loginServer(Configuration conf, String keytabFileKey,
    String userNameKey, String hostname) throws IOException {
  login(conf, keytabFileKey, userNameKey, hostname,
        ZooKeeperSaslServer.LOGIN_CONTEXT_NAME_KEY,
        JaasConfiguration.SERVER_KEYTAB_KERBEROS_CONFIG_NAME);
}
项目:HIndex    文件:ZKUtil.java   
/**
 * Log in the current zookeeper server process using the given configuration
 * keys for the credential file and login principal.
 *
 * <p><strong>This is only applicable when running on secure hbase</strong>
 * On regular HBase (without security features), this will safely be ignored.
 * </p>
 *
 * @param conf The configuration data to use
 * @param keytabFileKey Property key used to configure the path to the credential file
 * @param userNameKey Property key used to configure the login principal
 * @param hostname Current hostname to use in any credentials
 * @throws IOException underlying exception from SecurityUtil.login() call
 */
public static void loginServer(Configuration conf, String keytabFileKey,
    String userNameKey, String hostname) throws IOException {
  login(conf, keytabFileKey, userNameKey, hostname,
        ZooKeeperSaslServer.LOGIN_CONTEXT_NAME_KEY,
        JaasConfiguration.SERVER_KEYTAB_KERBEROS_CONFIG_NAME);
}
项目:IRIndex    文件:ZKUtil.java   
/**
 * Log in the current zookeeper server process using the given configuration
 * keys for the credential file and login principal.
 *
 * <p><strong>This is only applicable when running on secure hbase</strong>
 * On regular HBase (without security features), this will safely be ignored.
 * </p>
 *
 * @param conf The configuration data to use
 * @param keytabFileKey Property key used to configure the path to the credential file
 * @param userNameKey Property key used to configure the login principal
 * @param hostname Current hostname to use in any credentials
 * @throws IOException underlying exception from SecurityUtil.login() call
 */
public static void loginServer(Configuration conf, String keytabFileKey,
    String userNameKey, String hostname) throws IOException {
  login(conf, keytabFileKey, userNameKey, hostname,
        ZooKeeperSaslServer.LOGIN_CONTEXT_NAME_KEY,
        JaasConfiguration.SERVER_KEYTAB_KERBEROS_CONFIG_NAME);
}
项目:hbase    文件:ZKUtil.java   
/**
 * Log in the current zookeeper server process using the given configuration
 * keys for the credential file and login principal.
 *
 * <p><strong>This is only applicable when running on secure hbase</strong>
 * On regular HBase (without security features), this will safely be ignored.
 * </p>
 *
 * @param conf The configuration data to use
 * @param keytabFileKey Property key used to configure the path to the credential file
 * @param userNameKey Property key used to configure the login principal
 * @param hostname Current hostname to use in any credentials
 * @throws IOException underlying exception from SecurityUtil.login() call
 */
public static void loginServer(Configuration conf, String keytabFileKey,
    String userNameKey, String hostname) throws IOException {
  login(conf, keytabFileKey, userNameKey, hostname,
        ZooKeeperSaslServer.LOGIN_CONTEXT_NAME_KEY,
        JaasConfiguration.SERVER_KEYTAB_KERBEROS_CONFIG_NAME);
}
项目:PyroDB    文件:ZKUtil.java   
/**
 * Log in the current zookeeper server process using the given configuration
 * keys for the credential file and login principal.
 *
 * <p><strong>This is only applicable when running on secure hbase</strong>
 * On regular HBase (without security features), this will safely be ignored.
 * </p>
 *
 * @param conf The configuration data to use
 * @param keytabFileKey Property key used to configure the path to the credential file
 * @param userNameKey Property key used to configure the login principal
 * @param hostname Current hostname to use in any credentials
 * @throws IOException underlying exception from SecurityUtil.login() call
 */
public static void loginServer(Configuration conf, String keytabFileKey,
    String userNameKey, String hostname) throws IOException {
  login(conf, keytabFileKey, userNameKey, hostname,
        ZooKeeperSaslServer.LOGIN_CONTEXT_NAME_KEY,
        JaasConfiguration.SERVER_KEYTAB_KERBEROS_CONFIG_NAME);
}
项目:c5    文件:ZKUtil.java   
/**
 * Log in the current zookeeper server process using the given configuration
 * keys for the credential file and login principal.
 *
 * <p><strong>This is only applicable when running on secure hbase</strong>
 * On regular HBase (without security features), this will safely be ignored.
 * </p>
 *
 * @param conf The configuration data to use
 * @param keytabFileKey Property key used to configure the path to the credential file
 * @param userNameKey Property key used to configure the login principal
 * @param hostname Current hostname to use in any credentials
 * @throws IOException underlying exception from SecurityUtil.login() call
 */
public static void loginServer(Configuration conf, String keytabFileKey,
    String userNameKey, String hostname) throws IOException {
  login(conf, keytabFileKey, userNameKey, hostname,
        ZooKeeperSaslServer.LOGIN_CONTEXT_NAME_KEY,
        JaasConfiguration.SERVER_KEYTAB_KERBEROS_CONFIG_NAME);
}
项目:HBase-Research    文件:ZKUtil.java   
/**
 * Log in the current zookeeper server process using the given configuration
 * keys for the credential file and login principal.
 *
 * <p><strong>This is only applicable when running on secure hbase</strong>
 * On regular HBase (without security features), this will safely be ignored.
 * </p>
 *
 * @param conf The configuration data to use
 * @param keytabFileKey Property key used to configure the path to the credential file
 * @param userNameKey Property key used to configure the login principal
 * @param hostname Current hostname to use in any credentials
 * @throws IOException underlying exception from SecurityUtil.login() call
 */
public static void loginServer(Configuration conf, String keytabFileKey,
    String userNameKey, String hostname) throws IOException {
  login(conf, keytabFileKey, userNameKey, hostname,
        ZooKeeperSaslServer.LOGIN_CONTEXT_NAME_KEY,
        JaasConfiguration.SERVER_KEYTAB_KERBEROS_CONFIG_NAME);
}
项目:hbase-0.94.8-qod    文件:ZKUtil.java   
/**
 * Log in the current zookeeper server process using the given configuration
 * keys for the credential file and login principal.
 *
 * <p><strong>This is only applicable when running on secure hbase</strong>
 * On regular HBase (without security features), this will safely be ignored.
 * </p>
 *
 * @param conf The configuration data to use
 * @param keytabFileKey Property key used to configure the path to the credential file
 * @param userNameKey Property key used to configure the login principal
 * @param hostname Current hostname to use in any credentials
 * @throws IOException underlying exception from SecurityUtil.login() call
 */
public static void loginServer(Configuration conf, String keytabFileKey,
    String userNameKey, String hostname) throws IOException {
  login(conf, keytabFileKey, userNameKey, hostname,
        ZooKeeperSaslServer.LOGIN_CONTEXT_NAME_KEY,
        JaasConfiguration.SERVER_KEYTAB_KERBEROS_CONFIG_NAME);
}
项目:hbase-0.94.8-qod    文件:ZKUtil.java   
/**
 * Log in the current zookeeper server process using the given configuration
 * keys for the credential file and login principal.
 *
 * <p><strong>This is only applicable when running on secure hbase</strong>
 * On regular HBase (without security features), this will safely be ignored.
 * </p>
 *
 * @param conf The configuration data to use
 * @param keytabFileKey Property key used to configure the path to the credential file
 * @param userNameKey Property key used to configure the login principal
 * @param hostname Current hostname to use in any credentials
 * @throws IOException underlying exception from SecurityUtil.login() call
 */
public static void loginServer(Configuration conf, String keytabFileKey,
    String userNameKey, String hostname) throws IOException {
  login(conf, keytabFileKey, userNameKey, hostname,
        ZooKeeperSaslServer.LOGIN_CONTEXT_NAME_KEY,
        JaasConfiguration.SERVER_KEYTAB_KERBEROS_CONFIG_NAME);
}
项目:DominoHBase    文件:ZKUtil.java   
/**
 * Log in the current zookeeper server process using the given configuration
 * keys for the credential file and login principal.
 *
 * <p><strong>This is only applicable when running on secure hbase</strong>
 * On regular HBase (without security features), this will safely be ignored.
 * </p>
 *
 * @param conf The configuration data to use
 * @param keytabFileKey Property key used to configure the path to the credential file
 * @param userNameKey Property key used to configure the login principal
 * @param hostname Current hostname to use in any credentials
 * @throws IOException underlying exception from SecurityUtil.login() call
 */
public static void loginServer(Configuration conf, String keytabFileKey,
    String userNameKey, String hostname) throws IOException {
  login(conf, keytabFileKey, userNameKey, hostname,
        ZooKeeperSaslServer.LOGIN_CONTEXT_NAME_KEY,
        JaasConfiguration.SERVER_KEYTAB_KERBEROS_CONFIG_NAME);
}
项目:hindex    文件:ZKUtil.java   
/**
 * Log in the current zookeeper server process using the given configuration
 * keys for the credential file and login principal.
 *
 * <p><strong>This is only applicable when running on secure hbase</strong>
 * On regular HBase (without security features), this will safely be ignored.
 * </p>
 *
 * @param conf The configuration data to use
 * @param keytabFileKey Property key used to configure the path to the credential file
 * @param userNameKey Property key used to configure the login principal
 * @param hostname Current hostname to use in any credentials
 * @throws IOException underlying exception from SecurityUtil.login() call
 */
public static void loginServer(Configuration conf, String keytabFileKey,
    String userNameKey, String hostname) throws IOException {
  login(conf, keytabFileKey, userNameKey, hostname,
        ZooKeeperSaslServer.LOGIN_CONTEXT_NAME_KEY,
        JaasConfiguration.SERVER_KEYTAB_KERBEROS_CONFIG_NAME);
}