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

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


        if (isSet(EXPAND))
        {
            if (action.getOperation() == Operation.CREATE && action.getObjectType() == ObjectType.TOPIC)
            {
                addRule(null, identity, noLog(permission), new Action(Operation.BIND, ObjectType.EXCHANGE,
                        new ObjectProperties("amq.topic", action.getProperties().get(ObjectProperties.Property.NAME))));
                ObjectProperties topicProperties = new ObjectProperties();
                topicProperties.put(ObjectProperties.Property.DURABLE, true);
                addRule(null, identity, permission, new Action(Operation.CREATE, ObjectType.QUEUE, topicProperties));
                return;
            }
            if (action.getOperation() == Operation.DELETE && action.getObjectType() == ObjectType.TOPIC)
            {
                addRule(null, identity, noLog(permission), new Action(Operation.UNBIND, ObjectType.EXCHANGE,
                        new ObjectProperties("amq.topic", action.getProperties().get(ObjectProperties.Property.NAME))));
                ObjectProperties topicProperties = new ObjectProperties();
                topicProperties.put(ObjectProperties.Property.DURABLE, true);
                addRule(null, identity, permission, new Action(Operation.DELETE, ObjectType.QUEUE, topicProperties));
                return;
            }
        }
       
    // transitive action dependencies
        if (isSet(TRANSITIVE))
        {
            if (action.getOperation() == Operation.CREATE && action.getObjectType() == ObjectType.QUEUE)
            {
                ObjectProperties exchProperties = new ObjectProperties(action.getProperties());
                exchProperties.setName(ExchangeDefaults.DEFAULT_EXCHANGE_NAME);
                exchProperties.put(ObjectProperties.Property.ROUTING_KEY, action.getProperties().get(ObjectProperties.Property.NAME));
                addRule(null, identity, noLog(permission), new Action(Operation.BIND, ObjectType.EXCHANGE, exchProperties));
        if (action.getProperties().isSet(ObjectProperties.Property.AUTO_DELETE))
        {
          addRule(null, identity, noLog(permission), new Action(Operation.DELETE, ObjectType.QUEUE, action.getProperties()));
        }
            }
            else if (action.getOperation() == Operation.DELETE && action.getObjectType() == ObjectType.QUEUE)
            {
                ObjectProperties exchProperties = new ObjectProperties(action.getProperties());
                exchProperties.setName(ExchangeDefaults.DEFAULT_EXCHANGE_NAME);
                exchProperties.put(ObjectProperties.Property.ROUTING_KEY, action.getProperties().get(ObjectProperties.Property.NAME));
                addRule(null, identity, noLog(permission), new Action(Operation.UNBIND, ObjectType.EXCHANGE, exchProperties));
            }
            else if (action.getOperation() != Operation.ACCESS && action.getObjectType() != ObjectType.VIRTUALHOST)
            {
                addRule(null, identity, noLog(permission), new Action(Operation.ACCESS, ObjectType.VIRTUALHOST));
View Full Code Here


    {
        return checkAllPlugins(new AccessCheck()
        {
            Result allowed(SecurityPlugin plugin)
            {
                return plugin.authorise(BIND, EXCHANGE, new ObjectProperties(exch, queue, routingKey));
            }
        });
    }
View Full Code Here

    {
        return checkAllPlugins(new AccessCheck()
        {
            Result allowed(SecurityPlugin plugin)
            {
                ObjectProperties properties = new ObjectProperties();
                properties.put(ObjectProperties.Property.PACKAGE, packageName);
                properties.put(ObjectProperties.Property.CLASS, className);
                return plugin.authorise(ACCESS, OBJECT, properties);
            }
        });
    }
View Full Code Here

    {
        return checkAllPlugins(new AccessCheck()
        {
            Result allowed(SecurityPlugin plugin)
            {
                ObjectProperties properties = new ObjectProperties();
                properties.setName(methodName);
                if (componentName != null)
                {
                    // Only set the property if there is a component name
                  properties.put(ObjectProperties.Property.COMPONENT, componentName);
                }
                return plugin.authorise(operation, METHOD, properties);
            }
        });
    }
View Full Code Here

    {
        return checkAllPlugins(new AccessCheck()
        {
            Result allowed(SecurityPlugin plugin)
            {
                return plugin.authorise(CONSUME, QUEUE, new ObjectProperties(queue));
            }
        });
    }
View Full Code Here

    {
        return checkAllPlugins(new AccessCheck()
        {
            Result allowed(SecurityPlugin plugin)
            {
                return plugin.authorise(CONSUME, QUEUE, new ObjectProperties(exclusive, noAck, noLocal, nowait, queue));
            }
        });
    }
View Full Code Here

    {
        return checkAllPlugins(new AccessCheck()
        {
            Result allowed(SecurityPlugin plugin)
            {
                return plugin.authorise(CREATE, EXCHANGE, new ObjectProperties(autoDelete, durable, exchangeName,
                        internal, nowait, passive, exchangeType));
            }
        });
    }
View Full Code Here

    {
        return checkAllPlugins(new AccessCheck()
        {
            Result allowed(SecurityPlugin plugin)
            {
                return plugin.authorise(CREATE, QUEUE, new ObjectProperties(autoDelete, durable, exclusive, nowait, passive, queueName, owner));
            }
        });
    }
View Full Code Here

    {
        return checkAllPlugins(new AccessCheck()
        {
            Result allowed(SecurityPlugin plugin)
            {
                return plugin.authorise(DELETE, QUEUE, new ObjectProperties(queue));
            }
        });
    }
View Full Code Here

    {
        return checkAllPlugins(new AccessCheck()
        {
            Result allowed(SecurityPlugin plugin)
            {
                return plugin.authorise(DELETE, EXCHANGE, new ObjectProperties(exchange.getName()));
            }
        });
    }
View Full Code Here

TOP

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

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.