Examples of MappingManager


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(MappingType.ROLE.name());
       
         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

      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

Examples of org.jboss.security.mapping.MappingManager

     

      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

Examples of org.jboss.security.mapping.MappingManager

      MappingInfo attributeMappingInfo = new MappingInfo();
      attributeMappingInfo.add(mme);
      ap.setMappingInfo(MappingType.ATTRIBUTE.name(),attributeMappingInfo);
     
      SecurityContext sc = SecurityContextFactory.createSecurityContext("test");
      MappingManager mm = sc.getMappingManager();
      assertNotNull("MappingManager != null", mm);
     
      MappingContext<List<Attribute<String>>> mc = mm.getMappingContext(MappingType.ATTRIBUTE.name());
      assertNotNull("MappingContext != null", mc);
      HashMap<String,Object> map = new HashMap<String,Object>();
    
      map.put(SecurityConstants.PRINCIPAL_IDENTIFIER, new SimplePrincipal("jduke"));
     
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<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

       * 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);
         if(mc != null)
         {
            Map contextMap = new HashMap();
            contextMap.put(SecurityConstants.ROLES_IDENTIFIER, userRoles);
            contextMap.put(SecurityConstants.PRINCIPAL_IDENTIFIER, principal);
View Full Code Here

Examples of org.jboss.security.mapping.MappingManager

/* 175 */     return am;
/*     */   }
/*     */
/*     */   public MappingManager getMappingManager(String securityDomain)
/*     */   {
/* 180 */     MappingManager am = null;
/*     */     try
/*     */     {
/* 183 */       am = (MappingManager)this.mappingMgrMap.get(securityDomain);
/* 184 */       if (am == null)
/*     */       {
View Full Code Here

Examples of org.jboss.security.mapping.MappingManager

/* 346 */       emptyContextRoles = true;
/* 347 */     userRoles = copyGroups(userRoles, subjectRoles);
/*     */
/* 354 */     if ((subjectRoles != userRoles) || (emptyContextRoles))
/*     */     {
/* 356 */       MappingManager mm = sc.getMappingManager();
/* 357 */       MappingContext mc = mm.getMappingContext(Group.class);
/* 358 */       Group mappedUserRoles = userRoles;
/* 359 */       if (mc != null)
/*     */       {
/* 361 */         Map contextMap = new HashMap();
/* 362 */         contextMap.put("Roles", 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.