Examples of JAASSecurityManager


Examples of org.hornetq.spi.core.security.JAASSecurityManager

   public void testJaasCreateSessionSucceeds() throws Exception
   {
      String domainName = SimpleLogingModule.class.getName();
      Configuration configuration = createDefaultConfig(false);
      configuration.setSecurityEnabled(true);
      JAASSecurityManager securityManager = new JAASSecurityManager();
      HornetQServer server = createServer(false, configuration, securityManager);

      securityManager.setConfigurationName(domainName);
      securityManager.setCallbackHandler(new CallbackHandler()
      {
         public void handle(final Callback[] callbacks) throws IOException, UnsupportedCallbackException
         {
            // empty callback, auth info are directly passed as options to the login module
         }
      });
      Map<String, Object> options = new HashMap<String, Object>();
      options.put("authenticated", Boolean.TRUE);
      securityManager.setConfiguration(new SimpleConfiguration(domainName, options));
      try
      {
         server.start();
         ClientSessionFactory cf = createInVMFactory();
View Full Code Here

Examples of org.hornetq.spi.core.security.JAASSecurityManager

   public void testJaasCreateSessionFails() throws Exception
   {
      String domainName = SimpleLogingModule.class.getName();
      Configuration configuration = createDefaultConfig(false);
      configuration.setSecurityEnabled(true);
      JAASSecurityManager securityManager = new JAASSecurityManager();
      HornetQServer server = createServer(false, configuration, securityManager);

      securityManager.setConfigurationName(domainName);
      securityManager.setCallbackHandler(new CallbackHandler()
      {
         public void handle(final Callback[] callbacks) throws IOException, UnsupportedCallbackException
         {
            // empty callback, auth info are directly passed as options to the login module
         }
      });
      Map<String, Object> options = new HashMap<String, Object>();
      options.put("authenticated", Boolean.FALSE);
      securityManager.setConfiguration(new SimpleConfiguration(domainName, options));
      try
      {
         server.start();
         ClientSessionFactory cf = createInVMFactory();
View Full Code Here

Examples of org.hornetq.spi.core.security.JAASSecurityManager

   @Override
   protected void setUp() throws Exception
   {
      super.setUp();

      securityManager = new JAASSecurityManager();

      final String domainName = SimpleLogingModule.class.getName();
      // pass the correct user/pass and a role as options to the login module
      final Map<String, String> options = new HashMap<String, String>();
      options.put("user", JAASSecurityManagerTest.USER);
View Full Code Here

Examples of org.hornetq.spi.core.security.JAASSecurityManager

   public void testJaasCreateSessionSucceeds() throws Exception
   {
      String domainName = SimpleLogingModule.class.getName();
      Configuration configuration = createDefaultConfig(false);
      configuration.setSecurityEnabled(true);
      JAASSecurityManager securityManager = new JAASSecurityManager();
      HornetQServer server = createServer(false, configuration, securityManager);

      securityManager.setConfigurationName(domainName);
      securityManager.setCallbackHandler(new CallbackHandler()
      {
         public void handle(final Callback[] callbacks) throws IOException, UnsupportedCallbackException
         {
            // empty callback, auth info are directly passed as options to the login module
         }
      });
      Map<String, Object> options = new HashMap<String, Object>();
      options.put("authenticated", Boolean.TRUE);
      securityManager.setConfiguration(new SimpleConfiguration(domainName, options));
      try
      {
         server.start();
         ClientSessionFactory cf = locator.createSessionFactory();
View Full Code Here

Examples of org.hornetq.spi.core.security.JAASSecurityManager

   public void testJaasCreateSessionFails() throws Exception
   {
      String domainName = SimpleLogingModule.class.getName();
      Configuration configuration = createDefaultConfig(false);
      configuration.setSecurityEnabled(true);
      JAASSecurityManager securityManager = new JAASSecurityManager();
      HornetQServer server = createServer(false, configuration, securityManager);

      securityManager.setConfigurationName(domainName);
      securityManager.setCallbackHandler(new CallbackHandler()
      {
         public void handle(final Callback[] callbacks) throws IOException, UnsupportedCallbackException
         {
            // empty callback, auth info are directly passed as options to the login module
         }
      });
      Map<String, Object> options = new HashMap<String, Object>();
      options.put("authenticated", Boolean.FALSE);
      securityManager.setConfiguration(new SimpleConfiguration(domainName, options));
      try
      {
         server.start();
         ClientSessionFactory cf = locator.createSessionFactory();
View Full Code Here

Examples of org.hornetq.spi.core.security.JAASSecurityManager

   public void testJaasCreateSessionSucceeds() throws Exception
   {
      String domainName = SimpleLogingModule.class.getName();
      Configuration configuration = createDefaultConfig(false);
      configuration.setSecurityEnabled(true);
      JAASSecurityManager securityManager = new JAASSecurityManager();
      HornetQServer server = createServer(false, configuration, securityManager);

      securityManager.setConfigurationName(domainName);
      securityManager.setCallbackHandler(new CallbackHandler()
      {
         public void handle(final Callback[] callbacks) throws IOException, UnsupportedCallbackException
         {
            // empty callback, auth info are directly passed as options to the login module
         }
      });
      Map<String, Object> options = new HashMap<String, Object>();
      options.put("authenticated", Boolean.TRUE);
      securityManager.setConfiguration(new SimpleConfiguration(domainName, options));
      try
      {
         server.start();
         ClientSessionFactory cf = locator.createSessionFactory();
View Full Code Here

Examples of org.hornetq.spi.core.security.JAASSecurityManager

   public void testJaasCreateSessionFails() throws Exception
   {
      String domainName = SimpleLogingModule.class.getName();
      Configuration configuration = createDefaultConfig(false);
      configuration.setSecurityEnabled(true);
      JAASSecurityManager securityManager = new JAASSecurityManager();
      HornetQServer server = createServer(false, configuration, securityManager);

      securityManager.setConfigurationName(domainName);
      securityManager.setCallbackHandler(new CallbackHandler()
      {
         public void handle(final Callback[] callbacks) throws IOException, UnsupportedCallbackException
         {
            // empty callback, auth info are directly passed as options to the login module
         }
      });
      Map<String, Object> options = new HashMap<String, Object>();
      options.put("authenticated", Boolean.FALSE);
      securityManager.setConfiguration(new SimpleConfiguration(domainName, options));
      try
      {
         server.start();
         ClientSessionFactory cf = locator.createSessionFactory();
View Full Code Here

Examples of org.hornetq.spi.core.security.JAASSecurityManager

   public void testJaasCreateSessionSucceeds() throws Exception
   {
      String domainName = SimpleLogingModule.class.getName();
      Configuration configuration = createDefaultConfig(false);
      configuration.setSecurityEnabled(true);
      JAASSecurityManager securityManager = new JAASSecurityManager();
      HornetQServer server = createServer(false, configuration, securityManager);

      securityManager.setConfigurationName(domainName);
      securityManager.setCallbackHandler(new CallbackHandler()
      {
         public void handle(final Callback[] callbacks) throws IOException, UnsupportedCallbackException
         {
            // empty callback, auth info are directly passed as options to the login module
         }
      });
      Map<String, Object> options = new HashMap<String, Object>();
      options.put("authenticated", Boolean.TRUE);
      securityManager.setConfiguration(new SimpleConfiguration(domainName, options));
      try
      {
         server.start();
         ClientSessionFactory cf = locator.createSessionFactory();
View Full Code Here

Examples of org.hornetq.spi.core.security.JAASSecurityManager

   public void testJaasCreateSessionFails() throws Exception
   {
      String domainName = SimpleLogingModule.class.getName();
      Configuration configuration = createDefaultConfig(false);
      configuration.setSecurityEnabled(true);
      JAASSecurityManager securityManager = new JAASSecurityManager();
      HornetQServer server = createServer(false, configuration, securityManager);

      securityManager.setConfigurationName(domainName);
      securityManager.setCallbackHandler(new CallbackHandler()
      {
         public void handle(final Callback[] callbacks) throws IOException, UnsupportedCallbackException
         {
            // empty callback, auth info are directly passed as options to the login module
         }
      });
      Map<String, Object> options = new HashMap<String, Object>();
      options.put("authenticated", Boolean.FALSE);
      securityManager.setConfiguration(new SimpleConfiguration(domainName, options));
      try
      {
         server.start();
         ClientSessionFactory cf = locator.createSessionFactory();
View Full Code Here

Examples of org.jboss.security.plugins.JaasSecurityManager

      int iterations = Integer.getInteger("jbosstest.iterationcount", 5000).intValue();
      log.info("Creating "+count+" threads doing "+iterations+" iterations");
      PolicyContext.registerHandler(SecurityConstants.SUBJECT_CONTEXT_KEY,
          new SubjectPolicyContextHandler(), false);
      AuthorizationManager am = new JBossAuthorizationManager("testIdentity");
      JaasSecurityManager secMgr = new JaasSecurityManager("testIdentity", new SecurityAssociationHandler());
      TimedCachePolicy cache = new TimedCachePolicy(3, false, 100);
      cache.create();
      cache.start();
      secMgr.setCachePolicy(cache);
      Thread[] testThreads = new Thread[count];
      AuthTester[] testers = new AuthTester[count];
      for(int t = 0; t < count; t ++)
      {
         int userID = t % Nusers;
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.