Examples of SecuredServiceRemote


Examples of org.jboss.test.security.interfaces.SecuredServiceRemote

      InitialContext ctx = new InitialContext(env);
      Object obj = ctx.lookup("jacc/Secured");
      obj = PortableRemoteObject.narrow(obj, SecuredServiceRemoteHome.class);
      SecuredServiceRemoteHome home = (SecuredServiceRemoteHome) obj;
      log.debug("Found SecuredServiceRemoteHome");
      SecuredServiceRemote bean = home.create();
      log.debug("Created SecuredServiceRemote");

      Principal callerIdentity = new SimplePrincipal("jduke");
      Principal runAsIdentity = new SimplePrincipal("runAsUser");
      HashSet expectedCallerRoles = new HashSet();
      expectedCallerRoles.add("groupMemberCaller");
      expectedCallerRoles.add("userCaller");
      expectedCallerRoles.add("allAuthCaller");
      expectedCallerRoles.add("webUser");
      HashSet expectedRunAsRoles = new HashSet();
      expectedRunAsRoles.add("identitySubstitutionCaller");
      expectedRunAsRoles.add("extraRunAsRole");
      CallerInfo info = new CallerInfo(callerIdentity, runAsIdentity,
         expectedCallerRoles, expectedRunAsRoles);
      bean.publicMethod(info);
      bean.remove();
   }
View Full Code Here

Examples of org.jboss.test.security.interfaces.SecuredServiceRemote

      InitialContext ctx = new InitialContext(env);
      Object obj = ctx.lookup("jacc/Secured");
      obj = PortableRemoteObject.narrow(obj, SecuredServiceRemoteHome.class);
      SecuredServiceRemoteHome home = (SecuredServiceRemoteHome) obj;
      log.debug("Found SecuredServiceRemoteHome");
      SecuredServiceRemote bean = home.create();
      log.debug("Created SecuredServiceRemote");

      Principal callerIdentity = new SimplePrincipal("jduke");
      Principal runAsIdentity = new SimplePrincipal("runAsUser");
      HashSet expectedCallerRoles = new HashSet();
      expectedCallerRoles.add("groupMemberCaller");
      expectedCallerRoles.add("userCaller");
      expectedCallerRoles.add("allAuthCaller");
      expectedCallerRoles.add("webUser");
      HashSet expectedRunAsRoles = new HashSet();
      expectedRunAsRoles.add("identitySubstitutionCaller");
      expectedRunAsRoles.add("extraRunAsRole");
      CallerInfo info = new CallerInfo(callerIdentity, runAsIdentity,
         expectedCallerRoles, expectedRunAsRoles);
      bean.allAuthMethod(info);
      bean.remove();
   }
View Full Code Here

Examples of org.jboss.test.security.interfaces.SecuredServiceRemote

      InitialContext ctx = new InitialContext(env);
      Object obj = ctx.lookup("jacc/Secured");
      obj = PortableRemoteObject.narrow(obj, SecuredServiceRemoteHome.class);
      SecuredServiceRemoteHome home = (SecuredServiceRemoteHome) obj;
      log.debug("Found SecuredServiceRemoteHome");
      SecuredServiceRemote bean = home.create();
      log.debug("Created SecuredServiceRemote");

      Principal callerIdentity = new SimplePrincipal("jduke");
      Principal runAsIdentity = new SimplePrincipal("runAsUser");
      HashSet expectedCallerRoles = new HashSet();
      expectedCallerRoles.add("groupMemberCaller");
      expectedCallerRoles.add("userCaller");
      expectedCallerRoles.add("allAuthCaller");
      expectedCallerRoles.add("webUser");
      HashSet expectedRunAsRoles = new HashSet();
      expectedRunAsRoles.add("identitySubstitutionCaller");
      expectedRunAsRoles.add("extraRunAsRole");
      CallerInfo info = new CallerInfo(callerIdentity, runAsIdentity,
         expectedCallerRoles, expectedRunAsRoles);
      bean.userMethod(info);
      bean.remove();
   }
View Full Code Here

Examples of org.jboss.test.security.interfaces.SecuredServiceRemote

      InitialContext ctx = new InitialContext(env);
      Object obj = ctx.lookup("jacc/Secured");
      obj = PortableRemoteObject.narrow(obj, SecuredServiceRemoteHome.class);
      SecuredServiceRemoteHome home = (SecuredServiceRemoteHome) obj;
      log.debug("Found SecuredServiceRemoteHome");
      SecuredServiceRemote bean = home.create();
      log.debug("Created SecuredServiceRemote");

      Principal callerIdentity = new SimplePrincipal("jduke");
      Principal runAsIdentity = new SimplePrincipal("runAsUser");
      HashSet expectedCallerRoles = new HashSet();
      expectedCallerRoles.add("groupMemberCaller");
      expectedCallerRoles.add("userCaller");
      expectedCallerRoles.add("allAuthCaller");
      expectedCallerRoles.add("webUser");
      HashSet expectedRunAsRoles = new HashSet();
      expectedRunAsRoles.add("identitySubstitutionCaller");
      expectedRunAsRoles.add("extraRunAsRole");
      CallerInfo info = new CallerInfo(callerIdentity, runAsIdentity,
         expectedCallerRoles, expectedRunAsRoles);
      bean.groupMemberMethod(info);
      bean.remove();
   }
View Full Code Here

Examples of org.jboss.test.security.interfaces.SecuredServiceRemote

      InitialContext ctx = new InitialContext(env);
      Object obj = ctx.lookup("jacc/Secured");
      obj = PortableRemoteObject.narrow(obj, SecuredServiceRemoteHome.class);
      SecuredServiceRemoteHome home = (SecuredServiceRemoteHome) obj;
      log.debug("Found SecuredServiceRemoteHome");
      SecuredServiceRemote bean = home.create();
      log.debug("Created SecuredServiceRemote");

      Principal callerIdentity = new SimplePrincipal("jduke");
      Principal runAsIdentity = new SimplePrincipal("runAsUser");
      HashSet expectedCallerRoles = new HashSet();
      expectedCallerRoles.add("groupMemberCaller");
      expectedCallerRoles.add("userCaller");
      expectedCallerRoles.add("allAuthCaller");
      expectedCallerRoles.add("webUser");
      HashSet expectedRunAsRoles = new HashSet();
      expectedRunAsRoles.add("identitySubstitutionCaller");
      expectedRunAsRoles.add("extraRunAsRole");
      CallerInfo info = new CallerInfo(callerIdentity, runAsIdentity,
         expectedCallerRoles, expectedRunAsRoles);
      bean.runAsMethod(info);
      bean.remove();
   }
View Full Code Here

Examples of org.jboss.test.security.interfaces.SecuredServiceRemote

      InitialContext ctx = new InitialContext();
      Object obj = ctx.lookup("jacc/Secured");
      obj = PortableRemoteObject.narrow(obj, SecuredServiceRemoteHome.class);
      SecuredServiceRemoteHome home = (SecuredServiceRemoteHome) obj;
      log.debug("Found SecuredServiceRemoteHome");
      SecuredServiceRemote bean = home.create();
      log.debug("Created SecuredServiceRemote");

      Principal callerIdentity = new SimplePrincipal("guest");
      Principal runAsIdentity = new SimplePrincipal("runAsUser");
      HashSet expectedCallerRoles = new HashSet();
      HashSet expectedRunAsRoles = new HashSet();
      expectedRunAsRoles.add("identitySubstitutionCaller");
      expectedRunAsRoles.add("extraRunAsRole");
      CallerInfo info = new CallerInfo(callerIdentity, runAsIdentity,
         expectedCallerRoles, expectedRunAsRoles);
      bean.unprotectedEjbMethod(info);
      bean.remove();
   }
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.