Examples of AMQUserManagementMBean


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

    public void initialiseManagement(Configuration config) throws ConfigurationException
    {
        try
        {
            AMQUserManagementMBean _mbean = new AMQUserManagementMBean();

            String baseSecurity = "security.jmx";
            List<String> principalDBs = config.getList(baseSecurity + ".principal-database");

            if (principalDBs.size() == 0)
            {
                throw new ConfigurationException("No principal-database specified for jmx security(" + baseSecurity + ".principal-database)");
            }

            String databaseName = principalDBs.get(0);

            PrincipalDatabase database = getDatabases().get(databaseName);

            if (database == null)
            {
                throw new ConfigurationException("Principal-database '" + databaseName + "' not found");
            }

            _mbean.setPrincipalDatabase(database);

            List<String> jmxaccesslist = config.getList(baseSecurity + ".access");

            if (jmxaccesslist.size() == 0)
            {
                throw new ConfigurationException("No access control files specified for jmx security(" + baseSecurity + ".access)");
            }

            String jmxaccesssFile = null;
           
            try
            {
                jmxaccesssFile = PropertyUtils.replaceProperties(jmxaccesslist.get(0));
            }
            catch (PropertyException e)
            {
                throw new ConfigurationException("Unable to parse access control filename '" + jmxaccesssFile + "'");
            }

            try
            {
                _mbean.setAccessFile(jmxaccesssFile);
            }
            catch (IOException e)
            {
                _logger.warn("Unable to load access file:" + jmxaccesssFile);
            }

            try
            {
                _mbean.register();
            }
            catch (AMQException e)
            {
                _logger.warn("Unable to register user management MBean");
            }
View Full Code Here

Examples of org.apache.qpid.server.security.access.management.AMQUserManagementMBean

    public void initialiseManagement(ServerConfiguration config) throws ConfigurationException
    {
        try
        {
            AMQUserManagementMBean _mbean = new AMQUserManagementMBean();

            List<String> principalDBs = config.getManagementPrincipalDBs();

            if (principalDBs.size() == 0)
            {
                throw new ConfigurationException("No principal-database specified for jmx security");
            }

            String databaseName = principalDBs.get(0);

            PrincipalDatabase database = getDatabases().get(databaseName);

            if (database == null)
            {
                throw new ConfigurationException("Principal-database '" + databaseName + "' not found");
            }

            _mbean.setPrincipalDatabase(database);

            List<String> jmxaccesslist = config.getManagementAccessList();

            if (jmxaccesslist.size() == 0)
            {
                throw new ConfigurationException("No access control files specified for jmx security");
            }

            String jmxaccesssFile = null;

            try
            {
                jmxaccesssFile = PropertyUtils.replaceProperties(jmxaccesslist.get(0));
            }
            catch (PropertyException e)
            {
                throw new ConfigurationException("Unable to parse access control filename '" + jmxaccesssFile + "'");
            }

            try
            {
                _mbean.setAccessFile(jmxaccesssFile);
            }
            catch (IOException e)
            {
                _logger.warn("Unable to load access file:" + jmxaccesssFile);
            }

            try
            {
                _mbean.register();
            }
            catch (AMQException e)
            {
                _logger.warn("Unable to register user management MBean");
            }
View Full Code Here

Examples of org.apache.qpid.server.security.access.management.AMQUserManagementMBean

    public void initialiseManagement(ServerConfiguration config) throws ConfigurationException
    {
        try
        {
            AMQUserManagementMBean _mbean = new AMQUserManagementMBean();

            List<String> principalDBs = config.getManagementPrincipalDBs();

            if (principalDBs.size() == 0)
            {
                throw new ConfigurationException("No principal-database specified for jmx security");
            }

            String databaseName = principalDBs.get(0);

            PrincipalDatabase database = getDatabases().get(databaseName);

            if (database == null)
            {
                throw new ConfigurationException("Principal-database '" + databaseName + "' not found");
            }

            _mbean.setPrincipalDatabase(database);

            List<String> jmxaccesslist = config.getManagementAccessList();

            if (jmxaccesslist.size() == 0)
            {
                throw new ConfigurationException("No access control files specified for jmx security");
            }

            String jmxaccesssFile = null;

            try
            {
                jmxaccesssFile = PropertyUtils.replaceProperties(jmxaccesslist.get(0));
            }
            catch (PropertyException e)
            {
                throw new ConfigurationException("Unable to parse access control filename '" + jmxaccesssFile + "'");
            }

            try
            {
                _mbean.setAccessFile(jmxaccesssFile);
            }
            catch (IOException e)
            {
                _logger.warn("Unable to load access file:" + jmxaccesssFile);
            }

            _mbean.register();
        }
        catch (JMException e)
        {
            _logger.warn("User management disabled as unable to create MBean:" + e);
        }
View Full Code Here

Examples of org.apache.qpid.server.security.access.management.AMQUserManagementMBean

    public void initialiseManagement(Configuration config) throws ConfigurationException
    {
        try
        {
            AMQUserManagementMBean _mbean = new AMQUserManagementMBean();

            String baseSecurity = "security.jmx";
            List<String> principalDBs = config.getList(baseSecurity + ".principal-database");

            if (principalDBs.size() == 0)
            {
                throw new ConfigurationException("No principal-database specified for jmx security(" + baseSecurity + ".principal-database)");
            }

            String databaseName = principalDBs.get(0);

            PrincipalDatabase database = getDatabases().get(databaseName);

            if (database == null)
            {
                throw new ConfigurationException("Principal-database '" + databaseName + "' not found");
            }

            _mbean.setPrincipalDatabase(database);

            List<String> jmxaccesslist = config.getList(baseSecurity + ".access");

            if (jmxaccesslist.size() == 0)
            {
                throw new ConfigurationException("No access control files specified for jmx security(" + baseSecurity + ".access)");
            }

            String jmxaccesssFile = null;

            try
            {
                jmxaccesssFile = PropertyUtils.replaceProperties(jmxaccesslist.get(0));
            }
            catch (PropertyException e)
            {
                throw new ConfigurationException("Unable to parse access control filename '" + jmxaccesssFile + "'");
            }

            try
            {
                _mbean.setAccessFile(jmxaccesssFile);
            }
            catch (IOException e)
            {
                _logger.warn("Unable to load access file:" + jmxaccesssFile);
            }

            try
            {
                _mbean.register();
            }
            catch (AMQException e)
            {
                _logger.warn("Unable to register user management MBean");
            }
View Full Code Here

Examples of org.apache.qpid.server.security.auth.management.AMQUserManagementMBean

    public void initialiseManagement(ServerConfiguration config) throws ConfigurationException
    {
        try
        {
            AMQUserManagementMBean _mbean = new AMQUserManagementMBean();


            final Collection<PrincipalDatabase> dbs = getDatabases().values();
            if (dbs.size() == 0)
            {
                throw new ConfigurationException("Principal-database not found");
            }
            final PrincipalDatabase database = dbs.iterator().next();

            _mbean.setPrincipalDatabase(database);
            _mbean.register();
        }
        catch (JMException e)
        {
            _logger.warn("User management disabled as unable to create MBean:" + e);
        }
View Full Code Here

Examples of org.apache.qpid.server.security.auth.management.AMQUserManagementMBean

    public void setUp() throws Exception
    {
        super.setUp();

        _database = new PlainPasswordFilePrincipalDatabase();
        _amqumMBean = new AMQUserManagementMBean();
        loadFreshTestPasswordFile();
    }
View Full Code Here

Examples of org.apache.qpid.server.security.auth.management.AMQUserManagementMBean

    {
        try
        {
            _logger.info("Registering UserManagementMBean");

            _mbean = new AMQUserManagementMBean();
            _mbean.setPrincipalDatabase(_principalDatabase);
            _mbean.register();
        }
        catch (Exception e)
        {
View Full Code Here

Examples of org.apache.qpid.server.security.auth.management.AMQUserManagementMBean

    public void initialiseManagement(ServerConfiguration config) throws ConfigurationException
    {
        try
        {
            AMQUserManagementMBean _mbean = new AMQUserManagementMBean();

            List<String> principalDBs = config.getManagementPrincipalDBs();
            if (principalDBs.isEmpty())
            {
                throw new ConfigurationException("No principal-database specified for jmx security");
            }

            String databaseName = principalDBs.get(0);
            PrincipalDatabase database = getDatabases().get(databaseName);
            if (database == null)
            {
                throw new ConfigurationException("Principal-database '" + databaseName + "' not found");
            }

            _mbean.setPrincipalDatabase(database);

            List<String> jmxaccesslist = config.getManagementAccessList();
            if (jmxaccesslist.isEmpty())
            {
                throw new ConfigurationException("No access control files specified for jmx security");
            }

            String jmxaccesssFile = null;
           
            try
            {
                jmxaccesssFile = PropertyUtils.replaceProperties(jmxaccesslist.get(0));
            }
            catch (PropertyException e)
            {
                throw new ConfigurationException("Unable to parse access control filename '" + jmxaccesssFile + "'");
            }
           
            try
            {
                _mbean.setAccessFile(jmxaccesssFile);
            }
            catch (IOException e)
            {
                _logger.warn("Unable to load access file:" + jmxaccesssFile);
            }

            _mbean.register();
        }
        catch (JMException e)
        {
            _logger.warn("User management disabled as unable to create MBean:" + e);
        }
View Full Code Here

Examples of org.apache.qpid.server.security.auth.management.AMQUserManagementMBean

    public void setUp() throws Exception
    {
        super.setUp();

        _database = new PlainPasswordFilePrincipalDatabase();
        _amqumMBean = new AMQUserManagementMBean();
        loadFreshTestPasswordFile();
        loadFreshTestAccessFile();
    }
View Full Code Here

Examples of org.apache.qpid.server.security.auth.management.AMQUserManagementMBean

    public void setUp() throws Exception
    {
        super.setUp();

        _database = new PlainPasswordFilePrincipalDatabase();
        _amqumMBean = new AMQUserManagementMBean();
        loadFreshTestPasswordFile();
    }
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.