Package org.jboss.security

Examples of org.jboss.security.RealmMapping


       */
      Principal getCallerPrincipalInternal()
      {
         if( beanPrincipal == null )
         {   
            RealmMapping rm = con.getRealmMapping();
            SecurityContext sc = SecurityActions.getSecurityContext();
            Principal caller = null;
            try
            {
               caller = SecurityHelperFactory.getEJBAuthorizationHelper(sc).getCallerPrincipal();
            }
            catch (Exception e)
            {
               log.error("Error getting callerPrincipal for " + con.getBeanClass(),e);
            }
           
            /* Apply any domain caller mapping. This should really only be
            done for non-run-as callers.
            */
            if (rm != null)
               caller = rm.getPrincipal(caller);
            
            if( caller == null )
            {
               /* Try the incoming request principal. This is needed if a client
               clears the current caller association and and an interceptor calls
               getCallerPrincipal as the call stack unwinds.
               */
               if( principal != null )
               {
                 if( rm != null )
                    caller = rm.getPrincipal(principal);
                 else
                    caller = principal;
               }
               // Check for an unauthenticated principal value
               else
View Full Code Here


            }
            securityDomain = securityMgr.getSecurityDomain();
            SecurityAssociationActions.setPrincipalInfo(principal, certs, subject);

            // Get the CallerPrincipal mapping
            RealmMapping realmMapping = null;
            if(securityMgr instanceof RealmMapping)
               realmMapping = (RealmMapping)securityMgr;
            else
               realmMapping = getRealmMapping();
           
            if(realmMapping == null)
            {
               log.trace("RealmMapping is null for authenticate(x509 params)");
               return null;
            }
            Principal oldPrincipal = principal;
            principal = realmMapping.getPrincipal(oldPrincipal);
            if (trace)
            {
               log.trace("Mapped from input principal: " + oldPrincipal + "to: " + principal);
            }
            // Get the caching principal
View Full Code Here

            log.trace("User: " + username + " is authenticated");
            securityDomain = securityMgr.getSecurityDomain();
            SecurityAssociationActions.setPrincipalInfo(principal, digest, subject);

            // Get the CallerPrincipal mapping
            RealmMapping realmMapping = null;
            if(securityMgr instanceof RealmMapping)
               realmMapping = (RealmMapping)securityMgr;
            else
               realmMapping = getRealmMapping();
           
            if(realmMapping == null)
            {
               log.trace("RealmMapping is null for authenticate(digest params)");
               return null;
            }
            Principal oldPrincipal = principal;
            principal = realmMapping.getPrincipal(oldPrincipal);
            if (trace)
            {
               log.trace("Mapped from input principal: " + oldPrincipal + "to: " + principal);
            }
            // Get the caching principal
View Full Code Here

            log.trace("User: " + username + " is authenticated");
            securityDomain = securityMgr.getSecurityDomain();
            SecurityAssociationActions.setPrincipalInfo(principal, credentials, subject);
           
            // Get the CallerPrincipal mapping
            RealmMapping realmMapping = null;
            if(securityMgr instanceof RealmMapping)
               realmMapping = (RealmMapping)securityMgr;
            else
               realmMapping = getRealmMapping();
           
            if(realmMapping == null)
            {
               log.trace("RealmMapping is null for authenticate(username,cred)");
               return null;
            }
            Principal oldPrincipal = principal;
            principal = realmMapping.getPrincipal(oldPrincipal);
            if (trace)
            {
               log.trace("Mapped from input principal: " + oldPrincipal + "to: " + principal);
            }
            // Get the caching principal
View Full Code Here

    * Naming Context
    * @return
    */
   private RealmMapping getRealmMapping()
   {
      RealmMapping realmMapping = null;
      Context securityCtx = getSecurityNamingContext();
      if (securityCtx == null)
      {
         if (trace)
         {
View Full Code Here

            SecurityDomainContext sdc = (SecurityDomainContext) iniCtx.lookup(domainCtx);
            Object securityMgr = sdc.getSecurityManager();

            // Object securityMgr = iniCtx.lookup(confSecurityDomain);
            AuthenticationManager ejbS = (AuthenticationManager) securityMgr;
            RealmMapping rM = (RealmMapping) securityMgr;
            container.setSecurityManager(ejbS);
            container.setRealmMapping(rM);

            container.setSecurityManagement(securityManagement);
            container.setPolicyRegistration(policyRegistration);
View Full Code Here

   {
      return securityMgr;
   }
   public RealmMapping getRealmMapping()
   {
      RealmMapping realmMapping = null;
      if( securityMgr instanceof RealmMapping )
      {
         realmMapping = (RealmMapping)securityMgr;
      }
      return realmMapping;
View Full Code Here

            }
            securityDomain = securityMgr.getSecurityDomain();
            SecurityAssociationActions.setPrincipalInfo(principal, certs, subject);

            // Get the CallerPrincipal mapping
            RealmMapping realmMapping = null;
            if(securityMgr instanceof RealmMapping)
               realmMapping = (RealmMapping)securityMgr;
            else
               realmMapping = getRealmMapping();
           
            if(realmMapping == null)
            {
               log.trace("RealmMapping is null for authenticate(x509 params)");
               return null;
            }
            Principal oldPrincipal = principal;
            principal = realmMapping.getPrincipal(oldPrincipal);
            if (trace)
            {
               log.trace("Mapped from input principal: " + oldPrincipal + "to: " + principal);
            }
            // Get the caching principal
View Full Code Here

            log.trace("User: " + username + " is authenticated");
            securityDomain = securityMgr.getSecurityDomain();
            SecurityAssociationActions.setPrincipalInfo(principal, digest, subject);

            // Get the CallerPrincipal mapping
            RealmMapping realmMapping = null;
            if(securityMgr instanceof RealmMapping)
               realmMapping = (RealmMapping)securityMgr;
            else
               realmMapping = getRealmMapping();
           
            if(realmMapping == null)
            {
               log.trace("RealmMapping is null for authenticate(digest params)");
               return null;
            }
            Principal oldPrincipal = principal;
            principal = realmMapping.getPrincipal(oldPrincipal);
            if (trace)
            {
               log.trace("Mapped from input principal: " + oldPrincipal + "to: " + principal);
            }
            // Get the caching principal
View Full Code Here

            log.trace("User: " + username + " is authenticated");
            securityDomain = securityMgr.getSecurityDomain();
            SecurityAssociationActions.setPrincipalInfo(principal, credentials, subject);
           
            // Get the CallerPrincipal mapping
            RealmMapping realmMapping = null;
            if(securityMgr instanceof RealmMapping)
               realmMapping = (RealmMapping)securityMgr;
            else
               realmMapping = getRealmMapping();
           
            if(realmMapping == null)
            {
               log.trace("RealmMapping is null for authenticate(username,cred)");
               return null;
            }
            Principal oldPrincipal = principal;
            principal = realmMapping.getPrincipal(oldPrincipal);
            if (trace)
            {
               log.trace("Mapped from input principal: " + oldPrincipal + "to: " + principal);
            }
            // Get the caching principal
View Full Code Here

TOP

Related Classes of org.jboss.security.RealmMapping

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.