Package org.jboss.security.config

Examples of org.jboss.security.config.IdentityTrustInfo


      //Get the Configuration
      ApplicationPolicy aPolicy = SecurityConfiguration.getApplicationPolicy( securityDomain);
      if(aPolicy == null)
         throw new IllegalStateException("ApplicationPolicy not found for "+ securityDomain);
     
      IdentityTrustInfo iti = aPolicy.getIdentityTrustInfo();
      IdentityTrustModuleEntry[] itmearr = iti.getIdentityTrustModuleEntry();
      for(IdentityTrustModuleEntry itme: itmearr)
      {
         ControlFlag cf = itme.getControlFlag();
         if(cf == null)
            cf = ControlFlag.REQUIRED;
View Full Code Here


    private boolean processIdentityTrust(String securityDomain, ModelNode node, ApplicationPolicy applicationPolicy) {
        node = peek(node, IDENTITY_TRUST, CLASSIC);
        if (node == null)
            return false;

        IdentityTrustInfo identityTrustInfo = new IdentityTrustInfo(securityDomain);
        List<ModelNode> modules = node.get(TRUST_MODULES).asList();
        for (ModelNode module : modules) {
            String codeName = module.require(CODE).asString();
            ControlFlag controlFlag = ControlFlag.valueOf(module.require(FLAG).asString());
            Map<String, Object> options = extractOptions(module);
            IdentityTrustModuleEntry entry = new IdentityTrustModuleEntry(codeName, options);
            entry.setControlFlag(controlFlag);
            identityTrustInfo.add(entry);

            String moduleName = module.get(MODULE).asString();
            if(module.hasDefined(MODULE) && moduleName != null &&  moduleName.length() > 0 ) {
                identityTrustInfo.setJBossModuleName(moduleName);
            }
        }
        applicationPolicy.setIdentityTrustInfo(identityTrustInfo);
        return true;
    }
View Full Code Here

    private boolean processIdentityTrust(String securityDomain, ModelNode node, ApplicationPolicy applicationPolicy) {
        node = peek(node, IDENTITY_TRUST, CLASSIC);
        if (node == null)
            return false;

        IdentityTrustInfo identityTrustInfo = new IdentityTrustInfo(securityDomain);
        List<ModelNode> modules = node.get(TRUST_MODULES).asList();
        for (ModelNode module : modules) {
            String codeName = module.require(CODE).asString();
            ControlFlag controlFlag = ControlFlag.valueOf(module.require(FLAG).asString());
            Map<String, Object> options = extractOptions(module);
            IdentityTrustModuleEntry entry = new IdentityTrustModuleEntry(codeName, options);
            entry.setControlFlag(controlFlag);
            identityTrustInfo.add(entry);

            String moduleName = module.get(MODULE).asString();
            if(module.hasDefined(MODULE) && moduleName != null &&  moduleName.length() > 0 ) {
                identityTrustInfo.setJBossModuleName(moduleName);
            }
        }
        applicationPolicy.setIdentityTrustInfo(identityTrustInfo);
        return true;
    }
View Full Code Here

      assertEquals("Number of options = 2", 2, auditOptions.size());
      assertEquals("name=auditprovider", "auditprovider", auditOptions.get("name"));
      assertEquals("succeed=false", "false", auditOptions.get("succeed"));

      // Identity Trust
      IdentityTrustInfo iti = completeConfig.getIdentityTrustInfo();
      assertNotNull("IdentityTrustInfo", iti);
      IdentityTrustModuleEntry[] itilist = iti.getIdentityTrustModuleEntry();
      assertEquals("IdentityTrustModuleEntry length=1", 1, itilist.length);
      IdentityTrustModuleEntry itie = itilist[0];
      assertEquals("TestMappingModule", "org.jboss.test.TestMappingModule", mme.getMappingModuleName());
      Map<String, ?> itieOptions = itie.getOptions();
      assertEquals("Number of options = 3", 3, itieOptions.size());
View Full Code Here

      assertNotNull("AuditInfo", ai);
      AuditProviderEntry[] apelist = ai.getAuditProviderEntry();
      assertEquals("Audit entry length=1", 1, apelist.length);

      // Identity Trust
      IdentityTrustInfo iti = completeConfig.getIdentityTrustInfo();
      assertNotNull("IdentityTrustInfo", iti);
      IdentityTrustModuleEntry[] itilist = iti.getIdentityTrustModuleEntry();
      assertEquals("IdentityTrustModuleEntry length=1", 1, itilist.length);

      // JASPI authentication policy extension
      ApplicationPolicy jaspiPolicy = config.get("conf-jaspi-extend");
      assertNotNull("Unexpected null conf-jaspi-extend application policy", jaspiPolicy);
View Full Code Here

      //Get the Configuration
      ApplicationPolicy aPolicy = SecurityConfiguration.getApplicationPolicy( securityDomain);
      if(aPolicy == null)
         throw new IllegalStateException("ApplicationPolicy not found for "+ securityDomain);
     
      IdentityTrustInfo iti = aPolicy.getIdentityTrustInfo();
      if(iti == null)
         return;
      IdentityTrustModuleEntry[] itmearr = iti.getIdentityTrustModuleEntry();
      for(IdentityTrustModuleEntry itme: itmearr)
      {
         ControlFlag cf = itme.getControlFlag();
         if(cf == null)
            cf = ControlFlag.REQUIRED;
View Full Code Here

        }

        // 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());
                    }
                }
                IdentityTrustModuleEntry entry = new IdentityTrustModuleEntry(codeName, options);
                entry.setControlFlag(controlFlag);
                identityTrustInfo.add(entry);

            }
            applicationPolicy.setIdentityTrustInfo(identityTrustInfo);
        }
View Full Code Here

               child = ai;
            }
            else
               if(child == null && "identity-trust".equals(localName))
               {
                  IdentityTrustInfo ai = new IdentityTrustInfo(aPolicy.getName());
                  child = ai;
               }
      return child;
   }
View Full Code Here

        // identity trust
        node = operation.get(IDENTITY_TRUST);
        if (node.isDefined()) {
            if (applicationPolicy == null)
                applicationPolicy = new ApplicationPolicy(securityDomain);
            IdentityTrustInfo identityTrustInfo = new IdentityTrustInfo(securityDomain);
            modules = node.asList();
            for (ModelNode module : modules) {
                String codeName = module.require(CODE).asString();
                ControlFlag controlFlag = ControlFlag.valueOf(module.require(FLAG).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());
                    }
                }
                IdentityTrustModuleEntry entry = new IdentityTrustModuleEntry(codeName, options);
                entry.setControlFlag(controlFlag);
                identityTrustInfo.add(entry);

            }
            applicationPolicy.setIdentityTrustInfo(identityTrustInfo);
        }
View Full Code Here

        }

        // 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());
                    }
                }
                IdentityTrustModuleEntry entry = new IdentityTrustModuleEntry(codeName, options);
                entry.setControlFlag(controlFlag);
                identityTrustInfo.add(entry);

            }
            applicationPolicy.setIdentityTrustInfo(identityTrustInfo);
        }
View Full Code Here

TOP

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

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.