Examples of TestTokenSecretManager


Examples of org.apache.hadoop.ipc.TestSaslRPC.TestTokenSecretManager

   *  user.
   */
  @Test
  public void testProxyWithToken() throws Exception {
    final Configuration conf = new Configuration();
    TestTokenSecretManager sm = new TestTokenSecretManager();
    conf
        .set(CommonConfigurationKeys.HADOOP_SECURITY_AUTHENTICATION, "kerberos");
    UserGroupInformation.setConfiguration(conf);
    final Server server = RPC.getServer(TestProtocol.class, new TestImpl(),
        ADDRESS, 0, 5, true, conf, sm);
View Full Code Here

Examples of org.apache.hadoop.ipc.TestSaslRPC.TestTokenSecretManager

   * The user gets the token via a superuser. Server should authenticate
   * this user.
   */
  @Test
  public void testTokenBySuperUser() throws Exception {
    TestTokenSecretManager sm = new TestTokenSecretManager();
    final Configuration newConf = new Configuration();
    newConf.set(CommonConfigurationKeys.HADOOP_SECURITY_AUTHENTICATION,
        "kerberos");
    UserGroupInformation.setConfiguration(newConf);
    final Server server = RPC.getServer(TestProtocol.class, new TestImpl(),
View Full Code Here

Examples of org.apache.hadoop.ipc.TestSaslRPC.TestTokenSecretManager

   *  user.
   */
  @Test
  public void testProxyWithToken() throws Exception {
    final Configuration conf = new Configuration(masterConf);
    TestTokenSecretManager sm = new TestTokenSecretManager();
    SecurityUtil.setAuthenticationMethod(AuthenticationMethod.KERBEROS, conf);
    UserGroupInformation.setConfiguration(conf);
    final Server server = new RPC.Builder(conf).setProtocol(TestProtocol.class)
        .setInstance(new TestImpl()).setBindAddress(ADDRESS).setPort(0)
        .setNumHandlers(5).setVerbose(true).setSecretManager(sm).build();
View Full Code Here

Examples of org.apache.hadoop.ipc.TestSaslRPC.TestTokenSecretManager

   * The user gets the token via a superuser. Server should authenticate
   * this user.
   */
  @Test
  public void testTokenBySuperUser() throws Exception {
    TestTokenSecretManager sm = new TestTokenSecretManager();
    final Configuration newConf = new Configuration(masterConf);
    SecurityUtil.setAuthenticationMethod(AuthenticationMethod.KERBEROS, newConf);
    UserGroupInformation.setConfiguration(newConf);
    final Server server = new RPC.Builder(newConf)
        .setProtocol(TestProtocol.class).setInstance(new TestImpl())
View Full Code Here

Examples of org.apache.hadoop.ipc.TestSaslRPC.TestTokenSecretManager

   *  user.
   */
  @Test
  public void testProxyWithToken() throws Exception {
    final Configuration conf = new Configuration(masterConf);
    TestTokenSecretManager sm = new TestTokenSecretManager();
    SecurityUtil.setAuthenticationMethod(AuthenticationMethod.KERBEROS, conf);
    UserGroupInformation.setConfiguration(conf);
    final Server server = new RPC.Builder(conf).setProtocol(TestProtocol.class)
        .setInstance(new TestImpl()).setBindAddress(ADDRESS).setPort(0)
        .setNumHandlers(5).setVerbose(true).setSecretManager(sm).build();
View Full Code Here

Examples of org.apache.hadoop.ipc.TestSaslRPC.TestTokenSecretManager

   * The user gets the token via a superuser. Server should authenticate
   * this user.
   */
  @Test
  public void testTokenBySuperUser() throws Exception {
    TestTokenSecretManager sm = new TestTokenSecretManager();
    final Configuration newConf = new Configuration(masterConf);
    SecurityUtil.setAuthenticationMethod(AuthenticationMethod.KERBEROS, newConf);
    UserGroupInformation.setConfiguration(newConf);
    final Server server = new RPC.Builder(newConf)
        .setProtocol(TestProtocol.class).setInstance(new TestImpl())
View Full Code Here

Examples of org.apache.hadoop.ipc.TestSaslRPC.TestTokenSecretManager

   *  user.
   */
  @Test
  public void testProxyWithToken() throws Exception {
    final Configuration conf = new Configuration(masterConf);
    TestTokenSecretManager sm = new TestTokenSecretManager();
    conf
        .set(CommonConfigurationKeys.HADOOP_SECURITY_AUTHENTICATION, "kerberos");
    UserGroupInformation.setConfiguration(conf);
    final Server server = RPC.getServer(TestProtocol.class, new TestImpl(),
        ADDRESS, 0, 5, true, conf, sm);
View Full Code Here

Examples of org.apache.hadoop.ipc.TestSaslRPC.TestTokenSecretManager

   * The user gets the token via a superuser. Server should authenticate
   * this user.
   */
  @Test
  public void testTokenBySuperUser() throws Exception {
    TestTokenSecretManager sm = new TestTokenSecretManager();
    final Configuration newConf = new Configuration(masterConf);
    newConf.set(CommonConfigurationKeys.HADOOP_SECURITY_AUTHENTICATION,
        "kerberos");
    UserGroupInformation.setConfiguration(newConf);
    final Server server = RPC.getServer(TestProtocol.class, new TestImpl(),
View Full Code Here

Examples of org.apache.hadoop.ipc.TestSaslRPC.TestTokenSecretManager

    testSpecific(true);
  }

  private void testReflect(boolean secure) throws Exception {
    Configuration conf = new Configuration();
    TestTokenSecretManager sm = null;
    if (secure) {
      makeSecure(conf);
      sm = new TestTokenSecretManager();
    }
    UserGroupInformation.setConfiguration(conf);
    RPC.setProtocolEngine(conf, AvroTestProtocol.class, AvroRpcEngine.class);
    Server server = RPC.getServer(AvroTestProtocol.class,
                                  new TestImpl(), ADDRESS, 0, 5, true,
View Full Code Here

Examples of org.apache.hadoop.ipc.TestSaslRPC.TestTokenSecretManager

    current.addToken(token);
  }

  private void testSpecific(boolean secure) throws Exception {
    Configuration conf = new Configuration();
    TestTokenSecretManager sm = null;
    if (secure) {
      makeSecure(conf);
      sm = new TestTokenSecretManager();
    }
    UserGroupInformation.setConfiguration(conf);
    RPC.setProtocolEngine(conf, AvroSpecificTestProtocol.class,
        AvroSpecificRpcEngine.class);
    Server server = RPC.getServer(AvroSpecificTestProtocol.class,
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.