Package org.apache.hadoop.security.authorize

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


      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);
      }
    }
View Full Code Here


  }

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

    SecurityUtil.getPolicy().refresh();
  }
View Full Code Here

     @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

    init();
    UserGroupInformation callerUGI = getCallerUserGroupInformation(hsr, true);
    if (callerUGI == null) {
      String msg = "Unable to obtain user name, user not authenticated";
      throw new AuthorizationException(msg);
    }

    if (UserGroupInformation.isSecurityEnabled() && isStaticUser(callerUGI)) {
      String msg = "The default static user cannot carry out this operation.";
      return Response.status(Status.FORBIDDEN).entity(msg).build();
View Full Code Here

  public Response createNewApplication(@Context HttpServletRequest hsr)
      throws AuthorizationException, IOException, InterruptedException {
    init();
    UserGroupInformation callerUGI = getCallerUserGroupInformation(hsr, true);
    if (callerUGI == null) {
      throw new AuthorizationException("Unable to obtain user name, "
          + "user not authenticated");
    }
    if (UserGroupInformation.isSecurityEnabled() && isStaticUser(callerUGI)) {
      String msg = "The default static user cannot carry out this operation.";
      return Response.status(Status.FORBIDDEN).entity(msg).build();
View Full Code Here

      IOException, InterruptedException {

    init();
    UserGroupInformation callerUGI = getCallerUserGroupInformation(hsr, true);
    if (callerUGI == null) {
      throw new AuthorizationException("Unable to obtain user name, "
          + "user not authenticated");
    }

    if (UserGroupInformation.isSecurityEnabled() && isStaticUser(callerUGI)) {
      String msg = "The default static user cannot carry out this operation.";
View Full Code Here

      HttpServletRequest hsr) throws AuthorizationException, YarnException {

    UserGroupInformation callerUGI = getCallerUserGroupInformation(hsr, true);
    if (callerUGI == null) {
      String msg = "Unable to obtain user name, user not authenticated";
      throw new AuthorizationException(msg);
    }

    String authType = hsr.getAuthType();
    if (!KerberosAuthenticationHandler.TYPE.equals(authType)) {
      String msg =
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

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.