Examples of SecurityManager


Examples of org.apache.sandesha2.security.SecurityManager

    SequencePropertyBeanMgr sequencePropMgr = storageManager.getSequencePropertyBeanMgr();
   
    // Check that the sender of this CloseSequence holds the correct token
    SequencePropertyBean tokenBean = sequencePropMgr.retrieve(sequenceId, Sandesha2Constants.SequenceProperties.SECURITY_TOKEN);
    if(tokenBean != null) {
      SecurityManager secManager = SandeshaUtil.getSecurityManager(msgCtx.getConfigurationContext());
      OMElement body = msgCtx.getEnvelope().getBody();
      SecurityToken token = secManager.recoverSecurityToken(tokenBean.getValue());
      secManager.checkProofOfPossession(token, body, msgCtx);
    }

    FaultManager faultManager = new FaultManager();
    SandeshaException fault = faultManager.checkForUnknownSequence(rmMsgCtx, sequenceId, storageManager);
    if (fault != null) {
View Full Code Here

Examples of org.apache.shiro.mgt.SecurityManager

    public void setSecurityManager(SecurityManager securityManager) {
        nullSafePut(SECURITY_MANAGER, securityManager);
    }

    public SecurityManager resolveSecurityManager() {
        SecurityManager securityManager = getSecurityManager();
        if (securityManager == null) {
            if (log.isDebugEnabled()) {
                log.debug("No SecurityManager available in subject context map.  " +
                        "Falling back to SecurityUtils.getSecurityManager() lookup.");
            }
View Full Code Here

Examples of org.apache.xerces.util.SecurityManager

    XmlOptions xmlOptions;

    try
    {
      SAXParser saxParser = SAXParserFactory.newInstance().newSAXParser();
      SecurityManager securityManager = new SecurityManager();
      // Default seems to be 64000!
      securityManager.setEntityExpansionLimit( 16 );

      saxParser.setProperty( "http://apache.org/xml/properties/security-manager", securityManager );
      XMLReader xmlReader = saxParser.getXMLReader();
      xmlOptions = new XmlOptions().setLoadUseXMLReader( xmlReader );
    }
View Full Code Here

Examples of org.exist.security.SecurityManager

      sendChallenge(request, response);
      return null;
    }
    final Digest digest = new Digest(request.getMethod());
    parseCredentials(digest, credentials);
    final SecurityManager secman = pool.getSecurityManager();
    final AccountImpl user = (AccountImpl)secman.getAccount(digest.username);
    if (user == null) {
      // If user does not exist then send a challenge request again
      if (sendChallenge) {sendChallenge(request, response);}
      return null;
    }
View Full Code Here

Examples of org.jboss.jms.server.SecurityManager

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

      SecurityManager 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))
         {
            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.jdesktop.wonderland.server.security.SecurityManager

        }
       
        public void run() throws Exception {
            task.setCells(cells);
           
            SecurityManager security = AppContext.getManager(SecurityManager.class);
            security.doSecure(rm, task);
        }
View Full Code Here

Examples of org.jdesktop.wonderland.server.security.SecurityManager

                                                   owners);
            ActionMap am = new ActionMap(ownerRsrc, new OwnerAction());
            ResourceMap rm = new ResourceMap();
            rm.put(ownerRsrc.getId(), am);

            SecurityManager sec = AppContext.getManager(SecurityManager.class);
            SecureTask sst = new SetStateTask(id.getUsername(), ownerRsrc.getId(),
                                              this, scss.getPermissions());
            sec.doSecure(rm, sst);
        } else {
            // no security check, just set the values
            setCellPermissions(scss.getPermissions());
        }
    }
View Full Code Here

Examples of org.jdesktop.wonderland.server.security.SecurityManager

        Action[] actions = crmi.getActions(requestCellID).toArray(new Action[0]);
        ActionMap am = new ActionMap(rsrc, actions);
        rm.put(rsrc.getId(), am);

        // construct a new task to send the message
        SecurityManager sm = AppContext.getManager(SecurityManager.class);
        SecureTask sendTask = new SendPermissionsTask(rsrc.getId(), sender,
                                                      clientID, messageID);
        sm.doSecure(rm, sendTask);
    }
View Full Code Here

Examples of org.jdesktop.wonderland.server.security.SecurityManager

                               final short clientID,
                               final Message message,
                               final Set<Action> actions)
    {
        // get the security manager
        SecurityManager security = AppContext.getManager(SecurityManager.class);

        // create a request
        ActionMap am = new ActionMap(resource, actions.toArray(new Action[0]));
        ResourceMap request = new ResourceMap();
        request.put(resource.getId(), am);

        // perform the security check
        security.doSecure(request, new ReceiveSecureTask(resource.getId(),
                                                         clientID, actions,
                                                         message,
                                                         getBindingName()));
    }
View Full Code Here

Examples of org.jdesktop.wonderland.server.security.SecurityManager

                              final ConnectionType type,
                              final Properties properties,
                              final ClientHandlerRef ref)
    {
        // get the security manager
        SecurityManager security = AppContext.getManager(SecurityManager.class);

        // create a request
        ActionMap am = new ActionMap(resource, ConnectAction.getInstance());
        ResourceMap request = new ResourceMap();
        request.put(resource.getId(), am);

        // perform the security check
        security.doSecure(request, new AttachSecureTask(resource.getId(),
                                                        messageID, type,
                                                        properties, ref,
                                                        getBindingName()));
    }
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.