Package org.apache.hadoop.security.authorize

Examples of org.apache.hadoop.security.authorize.AuthorizationException


     @Override
     public String getDelegationToken(final String owner, final String renewer)
     throws IOException, InterruptedException {
       if (!authenticationMethod.get().equals(AuthenticationMethod.KERBEROS)) {
         throw new AuthorizationException(
         "Delegation Token can be issued only with kerberos authentication");
       }
       //if the user asking the token is same as the 'owner' then don't do
       //any proxy authorization checks. For cases like oozie, where it gets
       //a delegation token for another user, we need to make sure oozie is
View Full Code Here


     }

     @Override
     public long renewDelegationToken(String tokenStrForm) throws IOException {
       if (!authenticationMethod.get().equals(AuthenticationMethod.KERBEROS)) {
         throw new AuthorizationException(
         "Delegation Token can be issued only with kerberos authentication");
       }
       return secretManager.renewDelegationToken(tokenStrForm);
     }
View Full Code Here

    if (authorize) {
      Class<?> protocol = null;
      try {
        protocol = getProtocolClass(connection.getProtocol(), getConf());
      } catch (ClassNotFoundException cfne) {
        throw new AuthorizationException("Unknown protocol: " +
                                         connection.getProtocol());
      }
      authManager.authorize(user != null ? user.getUGI() : null,
          protocol, getConf(), addr);
    }
View Full Code Here

   */
  private void authorize(UserGroupInformation user, String protocolName,
      InetAddress addr) throws AuthorizationException {
    if (authorize) {
      if (protocolName == null) {
        throw new AuthorizationException("Null protocol not authorized");
      }
      Class<?> protocol = null;
      try {
        protocol = getProtocolClass(protocolName, getConf());
      } catch (ClassNotFoundException cfne) {
        throw new AuthorizationException("Unknown protocol: " +
                                         protocolName);
      }
      serviceAuthorizationManager.authorize(user, protocol, getConf(), addr);
    }
  }
View Full Code Here

  }

  @Override
  public void refreshServiceAcl() throws IOException {
    if (!serviceAuthEnabled) {
      throw new AuthorizationException("Service Level Authorization not enabled!");
    }

    ServiceAuthorizationManager.refresh(
      new Configuration(), new HDFSPolicyProvider());
  }
View Full Code Here

   

  @Override // RefreshAuthorizationPolicyProtocol
  public void refreshServiceAcl() throws IOException {
    if (!serviceAuthEnabled) {
      throw new AuthorizationException("Service Level Authorization not enabled!");
    }

    this.server.refreshServiceAcl(new Configuration(), new HDFSPolicyProvider());
    if (this.serviceRpcServer != null) {
      this.serviceRpcServer.refreshServiceAcl(new Configuration(), new HDFSPolicyProvider());
View Full Code Here

    if (authorize) {
      Class<?> protocol = null;
      try {
        protocol = getProtocolClass(connection.getProtocol(), getConf());
      } catch (ClassNotFoundException cfne) {
        throw new AuthorizationException("Unknown protocol: " +
                                         connection.getProtocol());
      }
      serviceAuthorizationManager.authorize(user, protocol, getConf(), addr);
    }
  }
View Full Code Here

    if (authorize) {
      Class<?> protocol = null;
      try {
        protocol = getProtocolClass(connection.getProtocol(), getConf());
      } catch (ClassNotFoundException cfne) {
        throw new AuthorizationException("Unknown protocol: " +
                                         connection.getProtocol());
      }
      authManager.authorize(user != null ? user.getUGI() : null,
          protocol, getConf(), addr);
    }
View Full Code Here

    if (authorize) {
      Class<?> protocol = null;
      try {
        protocol = getProtocolClass(connection.getProtocol(), getConf());
      } catch (ClassNotFoundException cfne) {
        throw new AuthorizationException("Unknown protocol: " +
                                         connection.getProtocol());
      }
      serviceAuthorizationManager.authorize(user, protocol, getConf(), addr);
    }
  }
View Full Code Here

 
  @Override
  public void refreshServiceAcl() throws IOException {
    if (!conf.getBoolean(
        CommonConfigurationKeys.HADOOP_SECURITY_AUTHORIZATION, false)) {
      throw new AuthorizationException("Service Level Authorization not enabled!");
    }
    this.interTrackerServer.refreshServiceAcl(conf, new MapReducePolicyProvider());
  }
View Full Code Here

TOP

Related Classes of org.apache.hadoop.security.authorize.AuthorizationException

Copyright © 2018 www.massapicom. 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.