Package org.jboss.security.config

Examples of org.jboss.security.config.ACLInfo


        // acl
        node = operation.get(ACL);
        if (node.isDefined()) {
            if (applicationPolicy == null)
                applicationPolicy = new ApplicationPolicy(securityDomain);
            ACLInfo aclInfo = new ACLInfo(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());
                    }
                }
                ACLProviderEntry entry = new ACLProviderEntry(codeName, options);
                entry.setControlFlag(controlFlag);
                aclInfo.add(entry);

            }
            applicationPolicy.setAclInfo(aclInfo);
        }
View Full Code Here


        }

        // acl
        node = operation.get(Element.ACL.getLocalName());
        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);
        }
View Full Code Here

   }
  
   private void initializeModules(Resource resource, Identity identity)
   throws PrivilegedActionException
   {
      ACLInfo aclInfo = getACLInfo(securityDomainName, resource);
      if(aclInfo == null)
         throw new IllegalStateException("ACL Info is null");
      ACLProviderEntry[] entries = aclInfo.getACLProviderEntry();
      int len = entries != null ? entries.length : 0;
      for(int i = 0 ; i < len; i++)
      {
         ACLProviderEntry entry = entries[i];
         modules.add(instantiateModule(entry.getAclProviderName(),
View Full Code Here

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

        ACLInfo aclInfo = new ACLInfo(securityDomain);
        for (Property moduleProperty : node.asPropertyList()) {
            ModelNode module = moduleProperty.getValue();
            String codeName = LoginModuleResourceDefinition.CODE.resolveModelAttribute(context, module).asString();
            String flag = LoginModuleResourceDefinition.FLAG.resolveModelAttribute(context, module).asString();
            ControlFlag controlFlag = ControlFlag.valueOf(flag);
            Map<String, Object> options = extractOptions(context, module);
            ACLProviderEntry entry = new ACLProviderEntry(codeName, options);
            entry.setControlFlag(controlFlag);
            aclInfo.add(entry);

            ModelNode moduleName = LoginModuleResourceDefinition.MODULE.resolveModelAttribute(context, module);
            if (moduleName.isDefined() && moduleName.asString().length() > 0) {
                aclInfo.setJBossModuleName(moduleName.asString());
            }

        }
        applicationPolicy.setAclInfo(aclInfo);
        return true;
View Full Code Here

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

        ACLInfo aclInfo = new ACLInfo(securityDomain);
        for (Property moduleProperty : node.asPropertyList()) {
            ModelNode module = moduleProperty.getValue();
            String codeName = LoginModuleResourceDefinition.CODE.resolveModelAttribute(context, module).asString();
            String flag = LoginModuleResourceDefinition.FLAG.resolveModelAttribute(context, module).asString();
            ControlFlag controlFlag = ControlFlag.valueOf(flag);
            Map<String, Object> options = extractOptions(context, module);
            ACLProviderEntry entry = new ACLProviderEntry(codeName, options);
            entry.setControlFlag(controlFlag);
            aclInfo.add(entry);

            ModelNode moduleName = LoginModuleResourceDefinition.MODULE.resolveModelAttribute(context, module);
            if (moduleName.isDefined() && moduleName.asString().length() > 0) {
                aclInfo.setJBossModuleName(moduleName.asString());
            }

        }
        applicationPolicy.setAclInfo(aclInfo);
        return true;
View Full Code Here

    *
    * @see org.jboss.xb.binding.GenericValueContainer#instantiate()
    */
   public Object instantiate()
   {
      ACLInfo info = new ACLInfo("dummy");
      info.add(providerEntries);
      return info;
   }
View Full Code Here

    * @see org.jboss.security.microcontainer.beans.BasePolicyBean#getPolicyInfo(java.lang.String)
    */
   @Override
   public ACLInfo getPolicyInfo(String domainName)
   {
      ACLInfo info = new ACLInfo(domainName);
      for (FlaggedPolicyModule module : super.modules)
      {
         ACLProviderEntry entry = new ACLProviderEntry(module.getCode(), module.getOptions());
         entry.setControlFlag(Util.getControlFlag(module.getFlag()));
         info.add(entry);
      }
      return info;
   }
View Full Code Here

   }

   private void initializeModules(Resource resource, Identity identity) throws PrivilegedActionException
   {
      super.modules.clear();
      ACLInfo aclInfo = getACLInfo(securityDomainName, resource);
      if (aclInfo == null)
         throw new IllegalStateException("ACL Info is null");
      ACLProviderEntry[] entries = aclInfo.getACLProviderEntry();
      int len = entries != null ? entries.length : 0;
      for (int i = 0; i < len; i++)
      {
         ACLProviderEntry entry = entries[i];
         super.modules.add(instantiateModule(entry.getAclProviderName(), entry.getOptions()));
View Full Code Here

      {
         child = new AuthorizationInfo(aPolicy.getName());
      }
      else if (child == null && "acl".equals(localName))
      {
         child = new ACLInfo(aPolicy.getName());
      }
      else if (child == null && "mapping".equals(localName))
      {
         child = new MappingInfo(aPolicy.getName());
      }
View Full Code Here

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

        ACLInfo aclInfo = new ACLInfo(securityDomain);
        List<ModelNode> modules = node.get(ACL_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);
            ACLProviderEntry entry = new ACLProviderEntry(codeName, options);
            entry.setControlFlag(controlFlag);
            aclInfo.add(entry);

            String moduleName = module.get(MODULE).asString();
            if(module.hasDefined(MODULE) && moduleName != null &&  moduleName.length() > 0 ) {
                aclInfo.setJBossModuleName(moduleName);
            }

        }
        applicationPolicy.setAclInfo(aclInfo);
        return true;
View Full Code Here

TOP

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

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.