Examples of MappingManager


Examples of org.jboss.security.mapping.MappingManager

       * allow mapping rules be applied only if the SC roles
       * and the subject roles are not the same
       */
      if(subjectRoles != userRoles || emptyContextRoles)
      {
         MappingManager mm = sc.getMappingManager();
         MappingContext<RoleGroup> mc = mm.getMappingContext(RoleGroup.class);
       
         RoleGroup mappedUserRoles = userRoles;
         if(mc != null && mc.hasModules())
         {
            Map<String,Object> contextMap = new HashMap<String,Object>();
View Full Code Here

Examples of org.jboss.security.mapping.MappingManager

            if(exchange != null) {
                exchange.putAttachment(UndertowSecurityAttachments.SECURITY_CONTEXT_ATTACHMENT, sc);
            }
        }
        SecurityActions.setSecurityContextOnAssociation(sc);
        final MappingManager mappingManager = securityDomainContext.getMappingManager();

        if (mappingManager != null) {
            if(WildFlySecurityManager.isChecking()) {
                WildFlySecurityManager.doUnchecked(new PrivilegedAction<Object>() {
                    @Override
                    public Object run() {
                        // if there are mapping modules let them handle the role mapping
                        MappingContext<RoleGroup> mc = mappingManager.getMappingContext(MappingType.ROLE.name());
                        if (mc != null && mc.hasModules()) {
                            SecurityRolesAssociation.setSecurityRoles(principleVsRoleMap);
                        }
                        return null;
                    }
                });
            } else {
                // if there are mapping modules let them handle the role mapping
                MappingContext<RoleGroup> mc = mappingManager.getMappingContext(MappingType.ROLE.name());
                if (mc != null && mc.hasModules()) {
                    SecurityRolesAssociation.setSecurityRoles(principleVsRoleMap);
                }
            }
        }
View Full Code Here

Examples of org.jboss.security.mapping.MappingManager

        return itm;
    }

    /** {@inheritDoc} */
    public MappingManager getMappingManager(String securityDomain) {
        MappingManager mm = null;
        try {
            mm = mappingMgrMap.get(securityDomain);
            if (mm == null) {
                mm = (MappingManager) lookUpJNDI(securityDomain + "/mappingMgr");
                mappingMgrMap.put(securityDomain, mm);
View Full Code Here

Examples of org.jboss.security.mapping.MappingManager

     
      SecurityContext sc = SecurityContextAssociation.getSecurityContext();
      if(sc != null)
      {
         String mappingType = MappingType.ATTRIBUTE.name();
         MappingManager mm = sc.getMappingManager();
         MappingContext<List<Attribute<Object>>> mc = mm.getMappingContext(mappingType) ;
        
         if(mc == null)
         {
            log.error("Mapping Context returned is null");
            return attributeMap;
View Full Code Here

Examples of org.jboss.security.mapping.MappingManager

       * allow mapping rules be applied only if the SC roles
       * and the subject roles are not the same
       */
      if(subjectRoles != userRoles || emptyContextRoles)
      {
         MappingManager mm = sc.getMappingManager();
         MappingContext<Group> mc = mm.getMappingContext(Group.class);
         Group mappedUserRoles = userRoles;
         if(mc != null && mc.hasModules())
         {
            Map<String,Object> contextMap = new HashMap<String,Object>();
            contextMap.put(SecurityConstants.ROLES_IDENTIFIER, userRoles);
View Full Code Here

Examples of org.jboss.security.mapping.MappingManager

    * @return the {@code MappingManager} that maps roles and identities according to the specified policy, or
    *         {@code null} if no {@code MappingManager} is available.
    */
   public MappingManager getMappingManager()
   {
      MappingManager manager = null;
      if (this.securityManagement != null)
         manager = this.securityManagement.getMappingManager(this.name);
      return manager;
   }
View Full Code Here

Examples of org.jboss.security.mapping.MappingManager

      String lookupURL = null;
      if (securityDomain.startsWith(baseContext))
         lookupURL = securityDomain + mappingManagerURL;
      else
         lookupURL = baseContext + "/" + securityDomain + mappingManagerURL;
      MappingManager am = null;
      try
      {
         InitialContext ic = new InitialContext();
         am = (MappingManager) ic.lookup(lookupURL);
      }
View Full Code Here

Examples of org.jboss.security.mapping.MappingManager

       * allow mapping rules be applied only if the SC roles
       * and the subject roles are not the same
       */
      if(subjectRoles != userRoles || emptyContextRoles)
      {
         MappingManager mm = sc.getMappingManager();
         MappingContext<RoleGroup> mc = mm.getMappingContext(RoleGroup.class);
       
         RoleGroup mappedUserRoles = userRoles;
         if(mc != null && mc.hasModules())
         {
            Map<String,Object> contextMap = new HashMap<String,Object>();
View Full Code Here

Examples of org.jboss.security.mapping.MappingManager

        return itm;
    }

    /** {@inheritDoc} */
    public MappingManager getMappingManager(String securityDomain) {
        MappingManager mm = null;
        try {
            mm = mappingMgrMap.get(securityDomain);
            if (mm == null) {
                mm = (MappingManager) lookUpJNDI(securityDomain + "/mappingMgr");
                mappingMgrMap.put(securityDomain, mm);
View Full Code Here

Examples of org.jboss.security.mapping.MappingManager

       * allow mapping rules be applied only if the SC roles
       * and the subject roles are not the same
       */
      if(subjectRoles != userRoles || emptyContextRoles)
      {
         MappingManager mm = sc.getMappingManager();
         MappingContext mc = mm.getMappingContext(Group.class);
         Group mappedUserRoles = userRoles;
         if(mc != null)
         {
            Map contextMap = new HashMap();
            contextMap.put(SecurityConstants.ROLES_IDENTIFIER, userRoles);
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.