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

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


        }
    }

    public AuthzResult authoriseUnbind(AMQProtocolSession session, Exchange exch, AMQShortString routingKey, AMQQueue queue)
    {
        PrincipalPermissions principalPermissions = _users.get(session.getAuthorizedID().getName());
        if (principalPermissions == null)
        {
            return AuthzResult.DENIED;
        }
        else
        {
            return principalPermissions.authorise(Permission.UNBIND);
        }
    }
View Full Code Here


        }
    }

    public AuthzResult authorisePurge(PrincipalHolder session, AMQQueue queue)
    {
        PrincipalPermissions principalPermissions = _users.get(session.getPrincipal().getName());
        if (principalPermissions == null)
        {
            return AuthzResult.DENIED;
        }
        else
        {
            return principalPermissions.authorise(Permission.PURGE);
        }
    }
View Full Code Here

        }
    }

    public AuthzResult authoriseUnbind(PrincipalHolder session, Exchange exch, AMQShortString routingKey, AMQQueue queue)
    {
        PrincipalPermissions principalPermissions = _users.get(session.getPrincipal().getName());
        if (principalPermissions == null)
        {
            return AuthzResult.DENIED;
        }
        else
        {
            return principalPermissions.authorise(Permission.UNBIND);
        }
    }
View Full Code Here

        }
    }

    private void grant(Permission permission, String user, Object... parameters)
    {
        PrincipalPermissions permissions = _users.get(user);

        if (permissions == null)
        {
            permissions = new PrincipalPermissions(user);
        }

        _users.put(user, permissions);
        permissions.grant(permission, parameters);
    }
View Full Code Here

        return "Simple";
    }

    public AuthzResult authoriseBind(PrincipalHolder session, Exchange exch, AMQQueue queue, AMQShortString routingKey)
    {
        PrincipalPermissions principalPermissions = _users.get(session.getPrincipal().getName());
        if (principalPermissions == null)
        {
            return AuthzResult.DENIED;
        }
        else
        {
            return principalPermissions.authorise(Permission.BIND, null, exch, queue, routingKey);
        }
    }
View Full Code Here

        }
    }

    public AuthzResult authoriseConnect(PrincipalHolder session, VirtualHost virtualHost)
    {
        PrincipalPermissions principalPermissions = _users.get(session.getPrincipal().getName());
        if (principalPermissions == null)
        {
            return AuthzResult.DENIED;
        }
        else
        {
            return principalPermissions.authorise(Permission.ACCESS);
        }
    }
View Full Code Here

        }
    }

    public AuthzResult authoriseConsume(PrincipalHolder session, boolean noAck, AMQQueue queue)
    {
        PrincipalPermissions principalPermissions = _users.get(session.getPrincipal().getName());
        if (principalPermissions == null)
        {
            return AuthzResult.DENIED;
        }
        else
        {
            return principalPermissions.authorise(Permission.CONSUME, queue);
        }
    }
View Full Code Here

    }

    public AuthzResult authoriseCreateExchange(PrincipalHolder session, boolean autoDelete, boolean durable,
            AMQShortString exchangeName, boolean internal, boolean nowait, boolean passive, AMQShortString exchangeType)
    {
        PrincipalPermissions principalPermissions = _users.get(session.getPrincipal().getName());
        if (principalPermissions == null)
        {
            return AuthzResult.DENIED;
        }
        else
        {
            return principalPermissions.authorise(Permission.CREATEEXCHANGE, exchangeName);
        }
    }
View Full Code Here

    }

    public AuthzResult authoriseCreateQueue(PrincipalHolder session, boolean autoDelete, boolean durable, boolean exclusive,
            boolean nowait, boolean passive, AMQShortString queue)
    {
        PrincipalPermissions principalPermissions = _users.get(session.getPrincipal().getName());
        if (principalPermissions == null)
        {
            return AuthzResult.DENIED;
        }
        else
        {
            return principalPermissions.authorise(Permission.CREATEQUEUE, autoDelete, queue);
        }
    }
View Full Code Here

        }
    }

    public AuthzResult authoriseDelete(PrincipalHolder session, AMQQueue queue)
    {
        PrincipalPermissions principalPermissions = _users.get(session.getPrincipal().getName());
        if (principalPermissions == null)
        {
            return AuthzResult.DENIED;
        }
        else
        {
            return principalPermissions.authorise(Permission.DELETE);
        }
    }
View Full Code Here

TOP

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

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.