Search in sources :

Example 1 with CfgEvent

use of edu.uiuc.ncsa.security.core.configuration.provider.CfgEvent in project OA4MP by ncsa.

the class AbstractConfigurationLoader method getCASP.

protected MultiDSClientApprovalStoreProvider getCASP() {
    if (casp == null) {
        casp = new MultiDSClientApprovalStoreProvider(cn, isDefaultStoreDisabled(), loggerProvider.get());
        final ClientApprovalProvider caProvider = new ClientApprovalProvider();
        ClientApproverConverter cp = new ClientApproverConverter(caProvider);
        casp.addListener(new DSFSClientApprovalStoreProvider(cn, cp));
        casp.addListener(new DSSQLClientApprovalStoreProvider(cn, getMySQLConnectionPoolProvider(), OA4MPConfigTags.MYSQL_STORE, cp));
        casp.addListener(new DSSQLClientApprovalStoreProvider(cn, getMariaDBConnectionPoolProvider(), OA4MPConfigTags.MARIADB_STORE, cp));
        casp.addListener(new DSSQLClientApprovalStoreProvider(cn, getPgConnectionPoolProvider(), OA4MPConfigTags.POSTGRESQL_STORE, cp));
        casp.addListener(new TypedProvider<ClientApprovalStore>(cn, OA4MPConfigTags.MEMORY_STORE, OA4MPConfigTags.CLIENT_APPROVAL_STORE) {

            @Override
            public Object componentFound(CfgEvent configurationEvent) {
                if (checkEvent(configurationEvent)) {
                    return get();
                }
                return null;
            }

            @Override
            public ClientApprovalStore get() {
                return new ClientApprovalMemoryStore(caProvider);
            }
        });
    }
    return casp;
}
Also used : MultiDSClientApprovalStoreProvider(edu.uiuc.ncsa.myproxy.oa4mp.server.storage.MultiDSClientApprovalStoreProvider) DSFSClientApprovalStoreProvider(edu.uiuc.ncsa.myproxy.oa4mp.server.storage.filestore.DSFSClientApprovalStoreProvider) CfgEvent(edu.uiuc.ncsa.security.core.configuration.provider.CfgEvent) ClientApprovalMemoryStore(edu.uiuc.ncsa.security.delegation.server.storage.impl.ClientApprovalMemoryStore) ClientApproverConverter(edu.uiuc.ncsa.myproxy.oa4mp.server.util.ClientApproverConverter) ClientApprovalStore(edu.uiuc.ncsa.security.delegation.server.storage.ClientApprovalStore) ClientApprovalProvider(edu.uiuc.ncsa.myproxy.oa4mp.server.ClientApprovalProvider) DSSQLClientApprovalStoreProvider(edu.uiuc.ncsa.myproxy.oa4mp.server.storage.sql.provider.DSSQLClientApprovalStoreProvider)

Example 2 with CfgEvent

use of edu.uiuc.ncsa.security.core.configuration.provider.CfgEvent in project OA4MP by ncsa.

the class OA2ConfigurationLoader method getTSP.

protected Provider<TransactionStore> getTSP(IdentifiableProvider tp, OA2TConverter<? extends OA2ServiceTransaction> tc) {
    if (tsp == null) {
        // since this is referenced in an inner class below.
        final IdentifiableProvider tp1 = tp;
        OA2MultiTypeProvider storeProvider = new OA2MultiTypeProvider(cn, isDefaultStoreDisabled(), loggerProvider.get(), tp);
        storeProvider.addListener(createSQLTSP(cn, getMySQLConnectionPoolProvider(), OA4MPConfigTags.MYSQL_STORE, getCSP(), tp, getTokenForgeProvider(), tc));
        storeProvider.addListener(createSQLTSP(cn, getMariaDBConnectionPoolProvider(), OA4MPConfigTags.MARIADB_STORE, getCSP(), tp, getTokenForgeProvider(), tc));
        storeProvider.addListener(createSQLTSP(cn, getPgConnectionPoolProvider(), OA4MPConfigTags.POSTGRESQL_STORE, getCSP(), tp, getTokenForgeProvider(), tc));
        storeProvider.addListener(new OA2FSTStoreProvider(cn, tp, getTokenForgeProvider(), tc));
        storeProvider.addListener(new TypedProvider<TransactionStore>(cn, OA4MPConfigTags.MEMORY_STORE, OA4MPConfigTags.TRANSACTIONS_STORE) {

            @Override
            public Object componentFound(CfgEvent configurationEvent) {
                if (checkEvent(configurationEvent)) {
                    return get();
                }
                return null;
            }

            @Override
            public TransactionStore get() {
                return new OA2MTStore(tp1);
            }
        });
        tsp = storeProvider;
    }
    return tsp;
}
Also used : TransactionStore(edu.uiuc.ncsa.security.delegation.storage.TransactionStore) CfgEvent(edu.uiuc.ncsa.security.core.configuration.provider.CfgEvent) IdentifiableProvider(edu.uiuc.ncsa.security.core.IdentifiableProvider)

Example 3 with CfgEvent

use of edu.uiuc.ncsa.security.core.configuration.provider.CfgEvent in project OA4MP by ncsa.

the class OA2ConfigurationLoader method getCASP.

@Override
protected MultiDSClientApprovalStoreProvider getCASP() {
    if (casp == null) {
        casp = new MultiDSClientApprovalStoreProvider(cn, isDefaultStoreDisabled(), loggerProvider.get());
        final ClientApprovalProvider caProvider = new ClientApprovalProvider();
        ClientApprovalKeys caKeys = new ClientApprovalKeys();
        caKeys.identifier("client_id");
        ClientApproverConverter cp = new ClientApproverConverter(caKeys, caProvider);
        casp.addListener(new DSFSClientApprovalStoreProvider(cn, cp));
        casp.addListener(new DSSQLClientApprovalStoreProvider(cn, getMySQLConnectionPoolProvider(), OA4MPConfigTags.MYSQL_STORE, cp));
        casp.addListener(new DSSQLClientApprovalStoreProvider(cn, getMariaDBConnectionPoolProvider(), OA4MPConfigTags.MARIADB_STORE, cp));
        casp.addListener(new DSSQLClientApprovalStoreProvider(cn, getPgConnectionPoolProvider(), OA4MPConfigTags.POSTGRESQL_STORE, cp));
        casp.addListener(new TypedProvider<ClientApprovalStore>(cn, OA4MPConfigTags.MEMORY_STORE, OA4MPConfigTags.CLIENT_APPROVAL_STORE) {

            @Override
            public Object componentFound(CfgEvent configurationEvent) {
                if (checkEvent(configurationEvent)) {
                    return get();
                }
                return null;
            }

            @Override
            public ClientApprovalStore get() {
                return new ClientApprovalMemoryStore(caProvider);
            }
        });
    }
    return casp;
}
Also used : MultiDSClientApprovalStoreProvider(edu.uiuc.ncsa.myproxy.oa4mp.server.storage.MultiDSClientApprovalStoreProvider) DSFSClientApprovalStoreProvider(edu.uiuc.ncsa.myproxy.oa4mp.server.storage.filestore.DSFSClientApprovalStoreProvider) CfgEvent(edu.uiuc.ncsa.security.core.configuration.provider.CfgEvent) ClientApprovalMemoryStore(edu.uiuc.ncsa.security.delegation.server.storage.impl.ClientApprovalMemoryStore) ClientApprovalKeys(edu.uiuc.ncsa.security.delegation.storage.ClientApprovalKeys) ClientApproverConverter(edu.uiuc.ncsa.myproxy.oa4mp.server.util.ClientApproverConverter) ClientApprovalStore(edu.uiuc.ncsa.security.delegation.server.storage.ClientApprovalStore) ClientApprovalProvider(edu.uiuc.ncsa.myproxy.oa4mp.server.ClientApprovalProvider) DSSQLClientApprovalStoreProvider(edu.uiuc.ncsa.myproxy.oa4mp.server.storage.sql.provider.DSSQLClientApprovalStoreProvider)

Example 4 with CfgEvent

use of edu.uiuc.ncsa.security.core.configuration.provider.CfgEvent in project OA4MP by ncsa.

the class OA2ConfigurationLoader method getCSP.

@Override
protected MultiDSClientStoreProvider getCSP() {
    if (csp == null) {
        OA2ClientConverter converter = new OA2ClientConverter(getClientProvider());
        csp = new OA2MultiDSClientStoreProvider(cn, isDefaultStoreDisabled(), loggerProvider.get(), null, null, getClientProvider());
        csp.addListener(new DSFSClientStoreProvider(cn, converter, getClientProvider()));
        csp.addListener(new OA2ClientSQLStoreProvider(getMySQLConnectionPoolProvider(), OA4MPConfigTags.MYSQL_STORE, converter, getClientProvider()));
        csp.addListener(new OA2ClientSQLStoreProvider(getMariaDBConnectionPoolProvider(), OA4MPConfigTags.MARIADB_STORE, converter, getClientProvider()));
        csp.addListener(new OA2ClientSQLStoreProvider(getPgConnectionPoolProvider(), OA4MPConfigTags.POSTGRESQL_STORE, converter, getClientProvider()));
        csp.addListener(new TypedProvider<ClientStore>(cn, OA4MPConfigTags.MEMORY_STORE, OA4MPConfigTags.CLIENTS_STORE) {

            @Override
            public Object componentFound(CfgEvent configurationEvent) {
                if (checkEvent(configurationEvent)) {
                    return get();
                }
                return null;
            }

            @Override
            public ClientStore get() {
                return new OA2ClientMemoryStore(getClientProvider());
            }
        });
    }
    return csp;
}
Also used : AdminClientStore(edu.uiuc.ncsa.myproxy.oa4mp.server.admin.adminClient.AdminClientStore) ClientStore(edu.uiuc.ncsa.security.delegation.server.storage.ClientStore) DSFSClientStoreProvider(edu.uiuc.ncsa.myproxy.oa4mp.server.storage.filestore.DSFSClientStoreProvider) CfgEvent(edu.uiuc.ncsa.security.core.configuration.provider.CfgEvent)

Example 5 with CfgEvent

use of edu.uiuc.ncsa.security.core.configuration.provider.CfgEvent in project OA4MP by ncsa.

the class AbstractConfigurationLoader method getTSP.

protected Provider<TransactionStore> getTSP() {
    if (tsp == null) {
        final DSTransactionProvider tp = new DSTransactionProvider<OA4MPServiceTransaction>();
        TransactionConverter<OA4MPServiceTransaction> tc = new TransactionConverter(tp, getTokenForgeProvider().get(), (ClientStore<? extends Client>) getCSP().get());
        MultiDSTransactionStoreProvider storeProvider = new MultiDSTransactionStoreProvider(cn, isDefaultStoreDisabled(), loggerProvider.get(), tp);
        storeProvider.addListener(new DSSQLTransactionStoreProvider(cn, getMySQLConnectionPoolProvider(), OA4MPConfigTags.MYSQL_STORE, getCSP(), tp, getTokenForgeProvider(), tc));
        storeProvider.addListener(new DSSQLTransactionStoreProvider(cn, getMariaDBConnectionPoolProvider(), OA4MPConfigTags.MARIADB_STORE, getCSP(), tp, getTokenForgeProvider(), tc));
        storeProvider.addListener(new DSSQLTransactionStoreProvider(cn, getPgConnectionPoolProvider(), OA4MPConfigTags.POSTGRESQL_STORE, getCSP(), tp, getTokenForgeProvider(), tc));
        storeProvider.addListener(new DSFSTransactionStoreProvider(cn, tp, getTokenForgeProvider(), tc));
        storeProvider.addListener(new TypedProvider<TransactionStore>(cn, OA4MPConfigTags.MEMORY_STORE, OA4MPConfigTags.TRANSACTIONS_STORE) {

            @Override
            public Object componentFound(CfgEvent configurationEvent) {
                if (checkEvent(configurationEvent)) {
                    return get();
                }
                return null;
            }

            @Override
            public TransactionStore get() {
                return new TransactionMemoryStore(tp);
            }
        });
        tsp = storeProvider;
    }
    return tsp;
}
Also used : OA4MPServiceTransaction(edu.uiuc.ncsa.myproxy.oa4mp.server.OA4MPServiceTransaction) CfgEvent(edu.uiuc.ncsa.security.core.configuration.provider.CfgEvent) TransactionMemoryStore(edu.uiuc.ncsa.security.delegation.storage.impl.TransactionMemoryStore) TransactionStore(edu.uiuc.ncsa.security.delegation.storage.TransactionStore)

Aggregations

CfgEvent (edu.uiuc.ncsa.security.core.configuration.provider.CfgEvent)5 ClientApprovalProvider (edu.uiuc.ncsa.myproxy.oa4mp.server.ClientApprovalProvider)2 MultiDSClientApprovalStoreProvider (edu.uiuc.ncsa.myproxy.oa4mp.server.storage.MultiDSClientApprovalStoreProvider)2 DSFSClientApprovalStoreProvider (edu.uiuc.ncsa.myproxy.oa4mp.server.storage.filestore.DSFSClientApprovalStoreProvider)2 DSSQLClientApprovalStoreProvider (edu.uiuc.ncsa.myproxy.oa4mp.server.storage.sql.provider.DSSQLClientApprovalStoreProvider)2 ClientApproverConverter (edu.uiuc.ncsa.myproxy.oa4mp.server.util.ClientApproverConverter)2 ClientApprovalStore (edu.uiuc.ncsa.security.delegation.server.storage.ClientApprovalStore)2 ClientApprovalMemoryStore (edu.uiuc.ncsa.security.delegation.server.storage.impl.ClientApprovalMemoryStore)2 TransactionStore (edu.uiuc.ncsa.security.delegation.storage.TransactionStore)2 OA4MPServiceTransaction (edu.uiuc.ncsa.myproxy.oa4mp.server.OA4MPServiceTransaction)1 AdminClientStore (edu.uiuc.ncsa.myproxy.oa4mp.server.admin.adminClient.AdminClientStore)1 DSFSClientStoreProvider (edu.uiuc.ncsa.myproxy.oa4mp.server.storage.filestore.DSFSClientStoreProvider)1 IdentifiableProvider (edu.uiuc.ncsa.security.core.IdentifiableProvider)1 ClientStore (edu.uiuc.ncsa.security.delegation.server.storage.ClientStore)1 ClientApprovalKeys (edu.uiuc.ncsa.security.delegation.storage.ClientApprovalKeys)1 TransactionMemoryStore (edu.uiuc.ncsa.security.delegation.storage.impl.TransactionMemoryStore)1