Package org.jboss.security.config

Examples of org.jboss.security.config.AuditInfo


        // audit
        node = operation.get(AUDIT);
        if (node.isDefined()) {
            if (applicationPolicy == null)
                applicationPolicy = new ApplicationPolicy(securityDomain);
            AuditInfo auditInfo = new AuditInfo(securityDomain);
            modules = node.asList();
            for (ModelNode module : modules) {
                String codeName = module.require(CODE).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);
        }
View Full Code Here


        }

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

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

    private boolean processAudit(OperationContext context, String securityDomain, ModelNode node, ApplicationPolicy applicationPolicy)
            throws OperationFailedException {
        node = peek(node, AUDIT, CLASSIC, PROVIDER_MODULE);
        if (node == null) { return false; }

        AuditInfo auditInfo = new AuditInfo(securityDomain);
        for (Property moduleProperty : node.asPropertyList()) {
            ModelNode module = moduleProperty.getValue();
            String codeName = LoginModuleResourceDefinition.CODE.resolveModelAttribute(context, module).asString();
            Map<String, Object> options = extractOptions(context, module);
            AuditProviderEntry entry = new AuditProviderEntry(codeName, options);
            auditInfo.add(entry);

            ModelNode moduleName = LoginModuleResourceDefinition.MODULE.resolveModelAttribute(context, module);
            if (moduleName.isDefined() && moduleName.asString().length() > 0) {
                auditInfo.setJBossModuleName(moduleName.asString());
            }
        }
        applicationPolicy.setAuditInfo(auditInfo);
        return true;
    }
View Full Code Here

    private boolean processAudit(OperationContext context, String securityDomain, ModelNode node, ApplicationPolicy applicationPolicy)
            throws OperationFailedException {
        node = peek(node, AUDIT, CLASSIC, PROVIDER_MODULE);
        if (node == null) { return false; }

        AuditInfo auditInfo = new AuditInfo(securityDomain);
        for (Property moduleProperty : node.asPropertyList()) {
            ModelNode module = moduleProperty.getValue();
            String codeName = LoginModuleResourceDefinition.CODE.resolveModelAttribute(context, module).asString();
            Map<String, Object> options = extractOptions(context, module);
            AuditProviderEntry entry = new AuditProviderEntry(codeName, options);
            auditInfo.add(entry);

            ModelNode moduleName = LoginModuleResourceDefinition.MODULE.resolveModelAttribute(context, module);
            if (moduleName.isDefined() && moduleName.asString().length() > 0) {
                auditInfo.setJBossModuleName(moduleName.asString());
            }
        }
        applicationPolicy.setAuditInfo(auditInfo);
        return true;
    }
View Full Code Here

      {
         ac = new JBossAuditContext(securityDomain);
         ApplicationPolicy ap = SecurityConfiguration.getApplicationPolicy(securityDomain);
         if(ap != null)
         {
            AuditInfo ai = ap.getAuditInfo();
            if(ai != null)
            { 
               AuditProviderEntry[] apeArr = ai.getAuditProviderEntry();
               List<AuditProviderEntry> list = Arrays.asList(apeArr);
               for(AuditProviderEntry ape:list)
               {
                  String pname = ape.getName();
                  try
View Full Code Here

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

    * @see org.jboss.security.microcontainer.beans.BasePolicyBean#getPolicyInfo(java.lang.String)
    */
   @Override
   public AuditInfo getPolicyInfo(String domainName)
   {
      AuditInfo info = new AuditInfo(domainName);
      for (BasePolicyModule module : this.modules)
      {
         AuditProviderEntry entry = new AuditProviderEntry(module.getCode(), module.getOptions());
         info.add(entry);
      }
      return info;
   }
View Full Code Here

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

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

        AuditInfo auditInfo = new AuditInfo(securityDomain);
        List<ModelNode> modules = node.get(PROVIDER_MODULES).asList();
        for (ModelNode module : modules) {
            String codeName = module.require(CODE).asString();
            Map<String, Object> options = extractOptions(module);
            AuditProviderEntry entry = new AuditProviderEntry(codeName, options);
            auditInfo.add(entry);

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

TOP

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

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.