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

Examples of org.apache.qpid.server.security.access.config.PlainConfiguration


            {
                throw new IllegalConfigurationException("ACL file '" + _aclFile + "' is not found");
            }

            //verify it is parsable
            new PlainConfiguration(_aclFile, _eventLogger).load();
        }
    }
View Full Code Here


            aclWriter.println(line);
        }
        aclWriter.close();

        // Load ruleset
        ConfigurationFile configFile = new PlainConfiguration(acl);
        RuleSet ruleSet = configFile.load();
    }
View Full Code Here

    public void testMissingACLConfig() throws Exception
    {
        try
        {
            // Load ruleset
          ConfigurationFile configFile = new PlainConfiguration(new File("doesnotexist"));
          RuleSet ruleSet = configFile.load();
           
            fail("fail");
        }
        catch (ConfigurationException ce)
        {
View Full Code Here

            if (!validate())
            {
                throw new IllegalConfigurationException("ACL file '" + _aclFile + "' is not found");
            }

            ConfigurationFile configFile = new PlainConfiguration(_aclFile, _eventLogger);
            _ruleSet = configFile.load();
        }
    }
View Full Code Here

            {
                throw new IllegalConfigurationException("ACL file '" + _aclFile + "' is not found");
            }

            //verify it is parsable
            new PlainConfiguration(_aclFile, _eventLogger).load();
        }
    }
View Full Code Here

            aclWriter.println(line);
        }
        aclWriter.close();

        // Load ruleset
        PlainConfiguration configFile = new PlainConfiguration(acl);
        configFile.load();
        return configFile;
    }
View Full Code Here

    public void testMissingACLConfig() throws Exception
    {
        try
        {
            // Load ruleset
            ConfigurationFile configFile = new PlainConfiguration(new File("doesnotexist"));
            configFile.load();

            fail("fail");
        }
        catch (ConfigurationException ce)
        {
View Full Code Here

     * Tests interpretation of an acl rule with no object properties.
     *
     */
    public void testValidRule() throws Exception
    {
        final PlainConfiguration config = writeACLConfig("ACL DENY-LOG user1 ACCESS VIRTUALHOST");
        final RuleSet rs = config.getConfiguration();
        assertEquals(1, rs.getRuleCount());

        final Map<Integer, Rule> rules = rs.getAllRules();
        assertEquals(1, rules.size());
        final Rule rule = rules.get(0);
View Full Code Here

    /**
     * Tests interpretation of an acl rule with object properties quoted in single quotes.
     */
    public void testValidRuleWithSingleQuotedProperty() throws Exception
    {
        final PlainConfiguration config = writeACLConfig("ACL ALLOW all CREATE EXCHANGE name = \'value\'");
        final RuleSet rs = config.getConfiguration();
        assertEquals(1, rs.getRuleCount());

        final Map<Integer, Rule> rules = rs.getAllRules();
        assertEquals(1, rules.size());
        final Rule rule = rules.get(0);
View Full Code Here

    /**
     * Tests interpretation of an acl rule with object properties quoted in double quotes.
     */
    public void testValidRuleWithDoubleQuotedProperty() throws Exception
    {
        final PlainConfiguration config = writeACLConfig("ACL ALLOW all CREATE EXCHANGE name = \"value\"");
        final RuleSet rs = config.getConfiguration();
        assertEquals(1, rs.getRuleCount());

        final Map<Integer, Rule> rules = rs.getAllRules();
        assertEquals(1, rules.size());
        final Rule rule = rules.get(0);
View Full Code Here

TOP

Related Classes of org.apache.qpid.server.security.access.config.PlainConfiguration

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.