Package org.apache.qpid.server.security.auth.database

Examples of org.apache.qpid.server.security.auth.database.PrincipalDatabase


        {
            LOGGER.warn("Password file path must not be null");
            return null;
        }

        PrincipalDatabase principalDatabase = createPrincipalDatabase();
        return new PrincipalDatabaseAuthenticationManager(principalDatabase, passwordFile);
    }
View Full Code Here


        String clazz = configuration.getString("pd-auth-manager.principal-database.class");
        String passwordArgumentName = configuration.getString("pd-auth-manager.principal-database.attributes.attribute.name");
        String passwordFile = configuration.getString("pd-auth-manager.principal-database.attributes.attribute.value");

        PrincipalDatabase principalDatabase = createKnownImplementation(clazz);
        if (principalDatabase == null)
        {
            LOGGER.warn("Config for pd-auth-manager found but principal-database class specified in config " + clazz +
                    " not recognised.");
            return null;
        }

        if (!"passwordFile".equals(passwordArgumentName) || passwordFile == null)
        {
            LOGGER.warn("Config for pd-auth-manager found but config incomplete - expected attributes not found.");
            return null;
        }

        try
        {
            principalDatabase.setPasswordFile(passwordFile);
        }
        catch (IOException e)
        {
            throw new RuntimeException(e.getMessage(), e);
        }
View Full Code Here

    public void initialise(String baseConfigPath, Configuration configuration,
        Map<String, PrincipalDatabase> principalDatabases) throws Exception
    {
        String principalDatabaseName = configuration.getString(baseConfigPath + ".principal-database");
        PrincipalDatabase db = principalDatabases.get(principalDatabaseName);

        initialise(db);
    }
View Full Code Here

    public void initialise(String baseConfigPath, Configuration configuration,
        Map<String, PrincipalDatabase> principalDatabases) throws Exception
    {
        String principalDatabaseName = configuration.getString(baseConfigPath + ".principal-database");
        PrincipalDatabase db = principalDatabases.get(principalDatabaseName);

        initialise(db);
    }
View Full Code Here

            if ((name == null) || (name.length() == 0))
            {
                throw new Exception("Principal database names must have length greater than or equal to one character");
            }

            PrincipalDatabase pd = databases.get(name);
            if (pd != null)
            {
                throw new Exception("Duplicate principal database name not permitted");
            }
View Full Code Here

            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)
View Full Code Here

     * @see org.apache.qpid.server.security.auth.manager.AuthenticationManager#authenticate(String, String)
     */
    @Override
    public AuthenticationResult authenticate(final String username, final String password)
    {
        final PrincipalDatabase db = ApplicationRegistry.getInstance().getDatabaseManager().getDatabases().values().iterator().next();

        try
        {
            if (db.verifyPassword(username, password.toCharArray()))
            {
                final Subject subject = new Subject();
                subject.getPrincipals().add(new UsernamePrincipal(username));
                return new AuthenticationResult(subject);
            }
View Full Code Here

        int port = appRegistry.getConfiguration().getJMXManagementPort();

        //retrieve the Principal Database assigned to JMX authentication duties
        String jmxDatabaseName = appRegistry.getConfiguration().getJMXPrincipalDatabase();
        Map<String, PrincipalDatabase> map = appRegistry.getDatabaseManager().getDatabases();       
        PrincipalDatabase db = map.get(jmxDatabaseName);

        HashMap<String,Object> env = new HashMap<String,Object>();

        //Socket factories for the RMIConnectorServer, either default or SLL depending on configuration
        RMIClientSocketFactory csf;
View Full Code Here

        int port = appRegistry.getConfiguration().getJMXManagementPort();

        //retrieve the Principal Database assigned to JMX authentication duties
        String jmxDatabaseName = appRegistry.getConfiguration().getJMXPrincipalDatabase();
        Map<String, PrincipalDatabase> map = appRegistry.getDatabaseManager().getDatabases();       
        PrincipalDatabase db = map.get(jmxDatabaseName);

        final JMXConnectorServer cs;
        HashMap<String,Object> env = new HashMap<String,Object>();

        //Socket factories for the RMIConnectorServer, either default or SLL depending on configuration
View Full Code Here

            if ((name == null) || (name.length() == 0))
            {
                throw new Exception("Principal database names must have length greater than or equal to one character");
            }

            PrincipalDatabase pd = databases.get(name);
            if (pd != null)
            {
                throw new Exception("Duplicate principal database name not permitted");
            }
View Full Code Here

TOP

Related Classes of org.apache.qpid.server.security.auth.database.PrincipalDatabase

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.