Package org.jboss.security.authorization

Examples of org.jboss.security.authorization.PolicyRegistration


/*     */
/* 375 */       AuthorizationManager authzmgr = (AuthorizationManager)ic.lookup(amCtx);
/*     */
/* 378 */       if ((authzmgr instanceof PolicyRegistration))
/*     */       {
/* 380 */         PolicyRegistration xam = (PolicyRegistration)authzmgr;
/* 381 */         xam.deRegisterPolicy(contextID);
/*     */       }
/*     */     }
/*     */   }
View Full Code Here


/*      */         try
/*      */         {
/*  427 */           AuthorizationManager authzmgr = (AuthorizationManager)ic.lookup(amCtx);
/*  428 */           if ((authzmgr instanceof PolicyRegistration))
/*      */           {
/*  430 */             PolicyRegistration xam = (PolicyRegistration)authzmgr;
/*  431 */             xam.registerPolicy(contextID, xacmlFile.toURL());
/*      */           }
/*      */         }
/*      */         catch (ClassCastException cce)
/*      */         {
/*  436 */           log.trace("CCE encountered while looking up authorizationmgr for " + securityDomain, cce);
View Full Code Here

/*      */       try
/*      */       {
/*  537 */         AuthorizationManager authzmgr = (AuthorizationManager)ic.lookup(amCtx);
/*  538 */         if ((authzmgr instanceof PolicyRegistration))
/*      */         {
/*  540 */           PolicyRegistration xam = (PolicyRegistration)authzmgr;
/*  541 */           xam.deRegisterPolicy(contextID);
/*      */         }
/*      */       }
/*      */       catch (ClassCastException cce)
/*      */       {
/*  546 */         log.trace("CCE experienced in looking up authorization manager for " + securityDomain, cce);
View Full Code Here

   public void testValidEJBPolicyContextHandler() throws Exception
   {
      EJBXACMLPolicyModuleDelegate pc = new EJBXACMLPolicyModuleDelegate();

      PolicyRegistration policyRegistration = new JBossPolicyRegistration();
      registerPolicy(policyRegistration);
      EJBResource er = getEJBResource(policyRegistration);
     
      er.setPolicyContextID(contextID);
      int res = pc.authorize(er, new Subject(), getRoleGroup());
View Full Code Here

  
   public void testInvalidEJBPolicyContextHandler() throws Exception
   {
      EJBXACMLPolicyModuleDelegate pc = new EJBXACMLPolicyModuleDelegate();
     
      PolicyRegistration policyRegistration = new JBossPolicyRegistration();
      registerPolicy(policyRegistration);
      EJBResource er = getEJBResource(policyRegistration);
     
      er.setPolicyContextID(contextID);
      er.setPrincipal(new SimplePrincipal("baduser"));
View Full Code Here

  
   public void testEJBContextIsCallerInRoleValid() throws Exception
   {
      EJBXACMLPolicyModuleDelegate pc = new EJBXACMLPolicyModuleDelegate();
     
      PolicyRegistration policyRegistration = new JBossPolicyRegistration();
      registerPolicy(policyRegistration);
      EJBResource er = getEJBResource(policyRegistration);
     
      er.setPolicyContextID(contextID);
      er.setPrincipal(new SimplePrincipal("baduser"));
View Full Code Here

  
   public void testEJBContextIsCallerInRoleInvalid() throws Exception
   {
      EJBXACMLPolicyModuleDelegate pc = new EJBXACMLPolicyModuleDelegate();
     
      PolicyRegistration policyRegistration = new JBossPolicyRegistration();
      registerPolicy(policyRegistration);
      EJBResource er = getEJBResource(policyRegistration);
     
      er.setPolicyContextID(contextID);
      er.setPrincipal(new SimplePrincipal("baduser"));
View Full Code Here

    */
   @Override
   public void initialize(Map<String, Object> sharedState, Map<String, Object> options)
   {
      // test implementation: create an instance of PolicyRegistrationStrategy and sets the PolicyRegistration.
      PolicyRegistration registration = (PolicyRegistration) options.get("policyRegistration");
      this.setPersistenceStrategy(new PolicyRegistrationStrategy(registration));
   }
View Full Code Here

   public void testValidWebPolicyContextHandler() throws Exception
   {
      WebXACMLPolicyModuleDelegate pc = new WebXACMLPolicyModuleDelegate();

      PolicyRegistration policyRegistration = new JBossPolicyRegistration();
      registerPolicy(policyRegistration);
      WebResource er = getResource(policyRegistration);
      er.setPolicyContextID(this.contextID);
     
      er.setServletRequest(new TestHttpServletRequest(p, uri, "GET"));
View Full Code Here

  
   public void testInvalidWebPolicyContextHandler() throws Exception
   {
      WebXACMLPolicyModuleDelegate pc = new WebXACMLPolicyModuleDelegate();
     
      PolicyRegistration policyRegistration = new JBossPolicyRegistration();
      registerPolicy(policyRegistration);
      WebResource er = getResource(policyRegistration);
      er.setPolicyContextID(this.contextID);
     
      Principal principal = new SimplePrincipal("Notjduke");
View Full Code Here

TOP

Related Classes of org.jboss.security.authorization.PolicyRegistration

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.