Examples of SecurityStore


Examples of org.apache.slide.store.SecurityStore

                    (SECURITY_STORE,
                     referenceDefinition.getAttribute("store"));
                getLogger().log("Security store references " + referenceDefinition.getAttribute("store"),LOG_CHANNEL,Logger.INFO);
            } catch (ConfigurationException ex) {
                getLogger().log("Security store: " + securityStoreDefinition.getAttribute("classname"),LOG_CHANNEL,Logger.INFO);
                SecurityStore securityStore =
                    (SecurityStore) loadChildStore(securityStoreDefinition,
                                                   storeParameters);
                if (securityStore != null) {
                    currentStoreChildStores.put(SECURITY_STORE, securityStore);
                }
View Full Code Here

Examples of org.apache.slide.store.SecurityStore

                    (NodeStore) dereferenceStore (NODE_STORE, childStores);
               
                store.setNodeStore (nodeStore);
               
                // assign SecurityStore
                SecurityStore securityStore =
                    (SecurityStore) dereferenceStore (SECURITY_STORE, childStores);
               
                store.setSecurityStore (securityStore);
               
                // assign LockStore
View Full Code Here

Examples of org.apache.slide.store.SecurityStore

                    (SECURITY_STORE,
                     referenceDefinition.getAttribute("store"));
                getLogger().log("Security store references " + referenceDefinition.getAttribute("store"),LOG_CHANNEL,Logger.INFO);
            } catch (ConfigurationException ex) {
                getLogger().log("Security store: " + securityStoreDefinition.getAttribute("classname"),LOG_CHANNEL,Logger.INFO);
                SecurityStore securityStore =
                    (SecurityStore) loadChildStore(securityStoreDefinition,
                                                   storeParameters);
                if (securityStore != null) {
                    currentStoreChildStores.put(SECURITY_STORE, securityStore);
                }
View Full Code Here

Examples of org.jboss.jms.server.SecurityStore

      }

      boolean isQueue = jbd.isQueue();
      String name = jbd.getName();

      SecurityStore sm = conn.getSecurityManager();
      SecurityMetadata securityMetadata = sm.getSecurityMetadata(isQueue, name);

      if (securityMetadata == null)
      {
         throw new JMSSecurityException("No security configuration avaliable for " + name);
      }

      // Authenticate. Successful autentication will place a new SubjectContext on thread local,
      // which will be used in the authorization process. However, we need to make sure we clean up
      // thread local immediately after we used the information, otherwise some other people
      // security my be screwed up, on account of thread local security stack being corrupted.
     
      sm.authenticate(conn.getUsername(), conn.getPassword());

      // Authorize
      Set principals = checkType == CheckType.READ ? securityMetadata.getReadPrincipals() :
                       checkType == CheckType.WRITE ? securityMetadata.getWritePrincipals() :
                       securityMetadata.getCreatePrincipals();
      try
      {
         if (!sm.authorize(conn.getUsername(), principals, checkType))
         {
            String msg = "User: " + conn.getUsername() +
               " is not authorized to " +
               (checkType == CheckType.READ ? "read from" :
                  checkType == CheckType.WRITE ? "write to" : "create durable sub on") +
View Full Code Here

Examples of org.jboss.jms.server.SecurityStore

      }

      final boolean isQueue = jbd.isQueue();
      final String name = jbd.getName();

      final SecurityStore sm = conn.getSecurityManager();

      SecurityMetadata securityMetadata = SecurityActions.getSecurityMetadata(sm, isQueue, name);

      if (securityMetadata == null)
      {
View Full Code Here

Examples of org.jboss.jms.server.SecurityStore

      }

      boolean isQueue = jbd.isQueue();
      String name = jbd.getName();

      SecurityStore sm = conn.getSecurityManager();
      SecurityMetadata securityMetadata = sm.getSecurityMetadata(isQueue, name);

      if (securityMetadata == null)
      {
         throw new JMSSecurityException("No security configuration avaliable for " + name);
      }

      // Authenticate. Successful autentication will place a new SubjectContext on thread local,
      // which will be used in the authorization process. However, we need to make sure we clean up
      // thread local immediately after we used the information, otherwise some other people
      // security my be screwed up, on account of thread local security stack being corrupted.
     
      sm.authenticate(conn.getUsername(), conn.getPassword());

      // Authorize
      Set principals = checkType == CheckType.READ ? securityMetadata.getReadPrincipals() :
                       checkType == CheckType.WRITE ? securityMetadata.getWritePrincipals() :
                       securityMetadata.getCreatePrincipals();
      try
      {
         if (!sm.authorize(conn.getUsername(), principals, checkType))
         {
            String msg = "User: " + conn.getUsername() +
               " is not authorized to " +
               (checkType == CheckType.READ ? "read from" :
                  checkType == CheckType.WRITE ? "write to" : "create durable sub on") +
View Full Code Here

Examples of org.jboss.jms.server.SecurityStore

      }

      boolean isQueue = jbd.isQueue();
      String name = jbd.getName();

      SecurityStore sm = conn.getSecurityManager();
      SecurityMetadata securityMetadata = sm.getSecurityMetadata(isQueue, name);

      if (securityMetadata == null)
      {
         throw new JMSSecurityException("No security configuration avaliable for " + name);
      }

      // Authenticate. Need to save current SecurityContext
      SecurityContext previousSCtx = SecurityActions.getSecurityContext();
     
      sm.authenticate(conn.getUsername(), conn.getPassword());

      // Authorize
      Set principals = checkType == CheckType.READ ? securityMetadata.getReadPrincipals() :
                       checkType == CheckType.WRITE ? securityMetadata.getWritePrincipals() :
                       securityMetadata.getCreatePrincipals();
      try
      {
         if (!sm.authorize(conn.getUsername(), principals, checkType))
         {
            String msg = "User: " + conn.getUsername() +
               " is not authorized to " +
               (checkType == CheckType.READ ? "read from" :
                  checkType == CheckType.WRITE ? "write to" : "create durable sub on") +
View Full Code Here

Examples of org.jboss.jms.server.SecurityStore

/*     */     }
/*     */
/* 280 */     boolean isQueue = jbd.isQueue();
/* 281 */     String name = jbd.getName();
/*     */
/* 283 */     SecurityStore sm = conn.getSecurityManager();
/* 284 */     SecurityMetadata securityMetadata = sm.getSecurityMetadata(isQueue, name);
/*     */
/* 286 */     if (securityMetadata == null)
/*     */     {
/* 288 */       throw new JMSSecurityException("No security configuration avaliable for " + name);
/*     */     }
/*     */
/* 296 */     sm.authenticate(conn.getUsername(), conn.getPassword());
/*     */
/* 299 */     Set principals = checkType == CheckType.WRITE ? securityMetadata.getWritePrincipals() : checkType == CheckType.READ ? securityMetadata.getReadPrincipals() : securityMetadata.getCreatePrincipals();
/*     */     try
/*     */     {
/* 304 */       if (!sm.authorize(conn.getUsername(), principals, checkType))
/*     */       {
/* 306 */         String msg = "User: " + conn.getUsername() + " is not authorized to " + (checkType == CheckType.WRITE ? "write to" : checkType == CheckType.READ ? "read from" : "create durable sub on") + " destination " + name;
/*     */
/* 312 */         throw new JMSSecurityException(msg);
/*     */       }
View Full Code Here

Examples of org.jboss.ws.extensions.security.SecurityStore

      SOAPEnvelope env = soapMsg.getSOAPPart().getEnvelope();
      Document doc = env.getOwnerDocument();

      String inputString = DOMWriter.printNode(soapMsg.getSOAPPart(), true);

      SecurityEncoder encoder = new SecurityEncoder(buildOperations(), new SecurityStore());
      encoder.encode(doc);

      log.debug("Encoded message:" + DOMWriter.printNode(doc, true));

      ByteArrayOutputStream stream = new ByteArrayOutputStream();
      soapMsg.writeTo(stream);

      ByteArrayInputStream instream = new ByteArrayInputStream(stream.toByteArray());
      soapMsg = factory.createMessage(null, instream);
      env = soapMsg.getSOAPPart().getEnvelope();
      doc = env.getOwnerDocument();

      SecurityDecoder decoder = new SecurityDecoder(new SecurityStore(), null, null, null);

      decoder.decode(doc);
      decoder.verify(buildRequireOperations());
      decoder.complete();
View Full Code Here

Examples of org.jboss.ws.extensions.security.SecurityStore

      cal.set(Calendar.YEAR, 2005);
      cal.set(Calendar.HOUR_OF_DAY, 5);
      cal.set(Calendar.MINUTE, 32);
      cal.set(Calendar.SECOND, 25);

      SecurityDecoder decoder = new SecurityDecoder(new SecurityStore(), cal, null, null, null);

      decoder.decode(doc);
      decoder.complete();

      cleanupWsuIds(doc.getDocumentElement());
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.