Examples of PAPAuthzException


Examples of org.glite.authz.pap.authz.exceptions.PAPAuthzException

                    "Please provide a value for the 'context' argument! null is not a valid value in this context." );
       
        ACL acl = context.getAcl();
       
        if (acl == null)
            throw new PAPAuthzException("FATAL ERROR: No ACL defined for context '"+context.getName()+"'!");
       
        for(PAPAdmin a: acl.getPermissions().keySet())
            if (a instanceof VOMSFQAN)
                return true;
       
View Full Code Here

Examples of org.glite.authz.pap.authz.exceptions.PAPAuthzException

                    .getAttribute( "javax.servlet.request.X509Certificate" );

        } catch ( Exception e ) {

            logger.error( "Exception during certificate chain retrieval: " + e );
            throw new PAPAuthzException( "No certificate found in request!", e );

        }
       
        if (certChain == null)
            throw new PAPAuthzException( "No certificate found in request!");

        sc.setClientCertChain( certChain );

        String subject = X500NameUtils.getReadableForm(sc.getClientX500Principal());
        String issuer = X500NameUtils.getReadableForm(sc.getIssuerX500Principal());
View Full Code Here

Examples of org.glite.authz.pap.authz.exceptions.PAPAuthzException

                    PermissionFlags newPerm = PermissionFlags.valueOf( s.trim() );
                    perm.permissions.add( newPerm );
                } catch ( IllegalArgumentException e ) {

                    throw new PAPAuthzException(
                            "Unknown permission passed as argument! '" + s
                                    + "'.", e );
                }

            }
View Full Code Here

Examples of org.glite.authz.pap.authz.exceptions.PAPAuthzException

    } else if (principal.getType().equals("voms-fqan")) {
       
        return PAPAdminFactory.getFQAN( principal.getName() );
       
    } else
      throw new PAPAuthzException("Unsupported principal type '"
          + principal.getType() + "'.");

  }
View Full Code Here

Examples of org.glite.authz.pap.authz.exceptions.PAPAuthzException

  }

  protected void checkPAPPrincipal(PAPPrincipal principal) {

    if (principal == null)
      throw new PAPAuthzException("Null principal passed as argument!");

    if (principal.getType().equals("x509-dn")) {

      if (principal.getName() == null || principal.getName().equals(""))
        throw new PAPAuthzException(
            "X509 Principal with NULL or empty DN passed as argument!");

    } else if (principal.getType().equals("voms-fqan")) {

      PathNamingScheme.checkSyntax(principal.getName());
View Full Code Here

Examples of org.glite.authz.pap.authz.exceptions.PAPAuthzException

    checkPAPPrincipal(principal);

    PAPAdmin admin = principalToAdmin(principal);

    if (permissions == null || permissions.length == 0)
      throw new PAPAuthzException(
          "Cannot set NULL permissions for principal '" + admin
              + "'.");

    if (context == null || context.equals("")
        || context.equals("global-context"))
      papContext = AuthorizationEngine.instance().getGlobalContext();
    else
      throw new PAPAuthzException(
          "Only the context 'global-context' is currently supported!");

    PAPPermission perms = PAPPermission.fromStringArray(permissions);

    AddACEOperation.instance(org.glite.authz.pap.authz.PAPACE.instance(papContext, admin, perms))
View Full Code Here

Examples of org.glite.authz.pap.authz.exceptions.PAPAuthzException

    if (context == null || context.equals("")
        || context.equals("global-context"))
      papContext = AuthorizationEngine.instance().getGlobalContext();
    else
      throw new PAPAuthzException(
          "Only the context 'global-context' is currently supported!");

    RemoveACEOperation.instance(org.glite.authz.pap.authz.PAPACE.instance(papContext, admin))
        .execute();
   
View Full Code Here

Examples of org.glite.authz.pap.authz.exceptions.PAPAuthzException

       
        if (context == null || context.equals("")
                || context.equals("global-context"))
            papContext = AuthorizationEngine.instance().getGlobalContext();
        else
            throw new PAPAuthzException(
                    "Only the context 'global-context' is currently supported!");
       
        ACL globalACL = papContext.getAcl();
       
        SetACLOperation.instance( context, convertACL( acl )).execute();
View Full Code Here

Examples of org.glite.authz.pap.authz.exceptions.PAPAuthzException

       
        if (context == null || context.equals("")
                || context.equals("global-context"))
            papContext = AuthorizationEngine.instance().getGlobalContext();
        else
            throw new PAPAuthzException(
                    "Only the context 'global-context' is currently supported!");
       
       
        Map<PAPAdmin, PAPPermission> permissions = GetACLOperation.instance( context ).execute();
        int permsSize = permissions.size();
View Full Code Here

Examples of org.glite.authz.pap.authz.exceptions.PAPAuthzException

        if ( !isAllowed() ) {

            log.info( "Insufficient privileges to perform operation '"
                    + getName() + "'" );

            throw new PAPAuthzException(
                    "Insufficient privileges to perform operation '"
                            + getName() + "'." );
        }

        return doExecute();
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.