Package org.jboss.security.mapping

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


    * @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

      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

       * 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

        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

       * 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

      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

       * 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(MappingType.ROLE.name());
       
         RoleGroup mappedUserRoles = userRoles;
         if(mc != null && mc.hasModules())
         {
            Map<String,Object> contextMap = new HashMap<String,Object>();
View Full Code Here

      assertEquals("Invalid AuthorizationManager implementation found", MockAuthorizationManager.class,
            authorizationManager.getClass());
      assertEquals("TestPolicy1", authorizationManager.getSecurityDomain());

      // check the mapping manager injection.
      MappingManager mappingManager = testBean.getMappingManager();
      assertNotNull("Invalid null MappingManager found", mappingManager);
      assertEquals("Invalid MappingManager implementation found", MockMappingManager.class, mappingManager.getClass());
      assertEquals("TestPolicy1", mappingManager.getSecurityDomain());

      // check the audit manager injection.
      AuditManager auditManager = testBean.getAuditManager();
      assertNotNull("Invalid null AuditManager found", auditManager);
      assertEquals("Invalid AuditManager implementation found", MockAuditManager.class, auditManager.getClass());
View Full Code Here

     

      Principal x509 = new SimplePrincipal("CN=Fedora, OU=JBoss, O=Red Hat, C=DE");
     
      SecurityContext sc = SecurityContextFactory.createSecurityContext("test");
      MappingManager mm = sc.getMappingManager();
      assertNotNull("MappingManager != null", mm);
      MappingContext<Principal> mc = mm.getMappingContext(Principal.class);
      assertNotNull("MappingContext != null", mc);
      HashMap<String,Object> map = new HashMap<String,Object>();
    
      X509Certificate cert = getX509Certificate(issuerDN,subjectDN);
      X509Certificate[] certs = new X509Certificate[]{cert};
View Full Code Here

TOP

Related Classes of org.jboss.security.mapping.MappingManager

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.