Package org.jboss.security.config

Examples of org.jboss.security.config.ControlFlag


        if (node.isDefined()) {
            ACLInfo aclInfo = new ACLInfo(securityDomain);
            modules = node.asList();
            for (ModelNode module : modules) {
                String codeName = module.require(Attribute.CODE.getLocalName()).asString();
                ControlFlag controlFlag = ControlFlag.valueOf(module.require(Attribute.FLAG.getLocalName()).asString());
                Map<String, Object> options = new HashMap<String, Object>();
                if (module.hasDefined(MODULE_OPTIONS)) {
                    for (Property prop : module.get(MODULE_OPTIONS).asPropertyList()) {
                        options.put(prop.getName(), prop.getValue().asString());
                    }
                }
                ACLProviderEntry entry = new ACLProviderEntry(codeName, options);
                entry.setControlFlag(controlFlag);
                aclInfo.add(entry);

            }
            applicationPolicy.setAclInfo(aclInfo);
        }

        // audit
        node = operation.get(Element.AUDIT.getLocalName());
        if (node.isDefined()) {
            AuditInfo auditInfo = new AuditInfo(securityDomain);
            modules = node.asList();
            for (ModelNode module : modules) {
                String codeName = module.require(Attribute.CODE.getLocalName()).asString();
                Map<String, Object> options = new HashMap<String, Object>();
                if (module.hasDefined(MODULE_OPTIONS)) {
                    for (Property prop : module.get(MODULE_OPTIONS).asPropertyList()) {
                        options.put(prop.getName(), prop.getValue().asString());
                    }
                }
                AuditProviderEntry entry = new AuditProviderEntry(codeName, options);
                auditInfo.add(entry);

            }
            applicationPolicy.setAuditInfo(auditInfo);
        }

        // authorization
        node = operation.get(Element.AUTHORIZATION.getLocalName());
        if (node.isDefined()) {
            AuthorizationInfo authorizationInfo = new AuthorizationInfo(securityDomain);
            modules = node.asList();
            for (ModelNode module : modules) {
                String codeName = module.require(Attribute.CODE.getLocalName()).asString();
                ControlFlag controlFlag = ControlFlag.valueOf(module.require(Attribute.FLAG.getLocalName()).asString());
                Map<String, Object> options = new HashMap<String, Object>();
                if (module.hasDefined(MODULE_OPTIONS)) {
                    for (Property prop : module.get(MODULE_OPTIONS).asPropertyList()) {
                        options.put(prop.getName(), prop.getValue().asString());
                    }
                }
                AuthorizationModuleEntry entry = new AuthorizationModuleEntry(codeName, options);
                entry.setControlFlag(controlFlag);
                authorizationInfo.add(entry);

            }
            applicationPolicy.setAuthorizationInfo(authorizationInfo);
        }

        // identity trust
        node = operation.get(Element.IDENTITY_TRUST.getLocalName());
        if (node.isDefined()) {
            IdentityTrustInfo identityTrustInfo = new IdentityTrustInfo(securityDomain);
            modules = node.asList();
            for (ModelNode module : modules) {
                String codeName = module.require(Attribute.CODE.getLocalName()).asString();
                ControlFlag controlFlag = ControlFlag.valueOf(module.require(Attribute.FLAG.getLocalName()).asString());
                Map<String, Object> options = new HashMap<String, Object>();
                if (module.hasDefined(MODULE_OPTIONS)) {
                    for (Property prop : module.get(MODULE_OPTIONS).asPropertyList()) {
                        options.put(prop.getName(), prop.getValue().asString());
                    }
View Full Code Here


      if(iti == null)
         return;
      IdentityTrustModuleEntry[] itmearr = iti.getIdentityTrustModuleEntry();
      for(IdentityTrustModuleEntry itme: itmearr)
      {
         ControlFlag cf = itme.getControlFlag();
         if(cf == null)
            cf = ControlFlag.REQUIRED;
        
         this.controlFlags.add(cf);
         modules.add(instantiateModule(itme.getName(), itme.getOptions()));
View Full Code Here

         return decision;
     
      for(int i = 0; i < length; i++)
      {
         IdentityTrustModule module = (IdentityTrustModule)modules.get(i);
         ControlFlag flag = (ControlFlag)this.controlFlags.get(i);
         try
         {
            decision = module.isTrusted();
         }
         catch(Exception ae)
View Full Code Here

      AuthorizationModuleEntry[] entries = authzInfo.getAuthorizationModuleEntry();
      int len = entries != null ? entries.length : 0;
      for(int i = 0 ; i < len; i++)
      {
         AuthorizationModuleEntry entry = entries[i];
         ControlFlag flag = entry.getControlFlag();
         if(flag == null)
         {
            if(trace)
               log.trace("Null Control flag for entry:"+entry+". Defaults to REQUIRED!");
            flag = ControlFlag.REQUIRED;
View Full Code Here

     
      int length = modules.size();
      for(int i = 0; i < length; i++)
      {
         AuthorizationModule module = (AuthorizationModule)modules.get(i);
         ControlFlag flag = (ControlFlag)this.controlFlags.get(i);
         int decision = DENY;
         try
         {
            decision = module.authorize(resource);
         }
View Full Code Here

         return decision;
     
      for(int i = 0; i < length; i++)
      {
         IdentityTrustModule module = (IdentityTrustModule)modules.get(i);
         ControlFlag flag = (ControlFlag)this.controlFlags.get(i);
         try
         {
            decision = module.isTrusted();
         }
         catch(Exception ae)
View Full Code Here

      if(iti == null)
         return;
      IdentityTrustModuleEntry[] itmearr = iti.getIdentityTrustModuleEntry();
      for(IdentityTrustModuleEntry itme: itmearr)
      {
         ControlFlag cf = itme.getControlFlag();
         if(cf == null)
            cf = ControlFlag.REQUIRED;
        
         this.controlFlags.add(cf);
         modules.add(instantiateModule(itme.getName(), itme.getOptions()));
View Full Code Here

/* 153 */     AuthorizationModuleEntry[] entries = authzInfo.getAuthorizationModuleEntry();
/* 154 */     int len = entries != null ? entries.length : 0;
/* 155 */     for (int i = 0; i < len; i++)
/*     */     {
/* 157 */       AuthorizationModuleEntry entry = entries[i];
/* 158 */       ControlFlag flag = entry.getControlFlag();
/* 159 */       if (flag == null)
/*     */       {
/* 161 */         if (this.trace)
/* 162 */           log.trace("Null Control flag for entry:" + entry + ". Defaults to REQUIRED!");
/* 163 */         flag = ControlFlag.REQUIRED;
View Full Code Here

/*     */
/* 183 */     int length = this.modules.size();
/* 184 */     for (int i = 0; i < length; i++)
/*     */     {
/* 186 */       AuthorizationModule module = (AuthorizationModule)this.modules.get(i);
/* 187 */       ControlFlag flag = (ControlFlag)this.controlFlags.get(i);
/* 188 */       int decision = -1;
/*     */       try
/*     */       {
/* 191 */         decision = module.authorize(resource);
/*     */       }
View Full Code Here

/* 107 */     if (iti == null)
/* 108 */       return;
/* 109 */     IdentityTrustModuleEntry[] itmearr = iti.getIdentityTrustModuleEntry();
/* 110 */     for (IdentityTrustModuleEntry itme : itmearr)
/*     */     {
/* 112 */       ControlFlag cf = itme.getControlFlag();
/* 113 */       if (cf == null) {
/* 114 */         cf = ControlFlag.REQUIRED;
/*     */       }
/* 116 */       this.controlFlags.add(cf);
/* 117 */       this.modules.add(instantiateModule(itme.getName(), itme.getOptions()));
View Full Code Here

TOP

Related Classes of org.jboss.security.config.ControlFlag

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.