Package org.apache.qpid.server.security.access

Examples of org.apache.qpid.server.security.access.AccessResult


        }
        else
        {
            session.setVirtualHost(virtualHost);

            AccessResult result = virtualHost.getAccessManager().isAuthorized(virtualHost, session.getAuthorizedID(), AccessRights.Rights.ANY);

            switch (result.getStatus())
            {
                default:
                case REFUSED:
                    String error = "Any access denied to vHost '" + virtualHostName + "' by "
                                   + result.getAuthorizer();
                   
                    _logger.warn(error);

                    throw body.getConnectionException(AMQConstant.ACCESS_REFUSED, error);
                case GRANTED:
                    _logger.info("Granted any access to vHost '" + virtualHostName + "' for " + session.getAuthorizedID()
                                 + " by '" + result.getAuthorizer() + "'");
            }

            // See Spec (0.8.2). Section  3.1.2 Virtual Hosts
            if (session.getContextKey() == null)
            {
View Full Code Here


            {
                for (String host : hosts)
                {
                    if (accessObject.getAccessableName().equals(host))
                    {
                        return new AccessResult(this, AccessResult.AccessStatus.GRANTED);
                    }
                }
            }
        }

        return new AccessResult(this, AccessResult.AccessStatus.REFUSED);
    }
View Full Code Here

            ACLManager.getLogger().debug("Allowing user:" + session.getAuthorizedID() + " for :" + permission.toString()
                                        + " on " + body.getClass().getSimpleName()
                                        + (parameters == null || parameters.length == 0 ? "" : "-" + accessablesToString(parameters)));
        }

        return new AccessResult(this, AccessResult.AccessStatus.GRANTED);
    }
View Full Code Here

TOP

Related Classes of org.apache.qpid.server.security.access.AccessResult

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.