Search in sources :

Example 1 with AuthSvcEndPointLocator

use of com.emc.storageos.security.authentication.AuthSvcEndPointLocator in project coprhd-controller by CoprHD.

the class DependencyInjectionJob method doJob.

public void doJob() {
    AuthSvcEndPointLocator authSvcEndPointLocator = null;
    if (StorageOsPlugin.isEnabled()) {
        authSvcEndPointLocator = StorageOsPlugin.getInstance().getAuthSvcEndPointLocator();
    } else {
        Logger.info("WARNING - Service Descriptors are unavailable!");
    }
    beans.put(AuthSvcEndPointLocator.class, authSvcEndPointLocator);
    Injector.inject(this);
}
Also used : AuthSvcEndPointLocator(com.emc.storageos.security.authentication.AuthSvcEndPointLocator)

Example 2 with AuthSvcEndPointLocator

use of com.emc.storageos.security.authentication.AuthSvcEndPointLocator in project coprhd-controller by CoprHD.

the class StorageOsPlugin method onApplicationStart.

/**
 * Called at application start (and at each reloading) Time to start stateful things.
 */
@Override
public void onApplicationStart() {
    // NOSONAR
    instance = this;
    // ("Suppressing Sonar violation of Lazy initialization of static fields should be synchronized for field instance")
    if (!isEnabled()) {
        return;
    }
    try {
        Logger.info("Connecting to Coordinator Service");
        // To using Spring profile feature
        context = new GenericXmlApplicationContext();
        context.getEnvironment().setActiveProfiles(System.getProperty("buildType"));
        context.load(getContextFiles());
        context.refresh();
        Logger.info("Connected to Coordinator Service");
        zkConnection = getBean("zkconn", ZkConnection.class);
        coordinatorClient = getBean("coordinator", CoordinatorClient.class);
        encryptionProvider = getBean("encryptionProvider", EncryptionProvider.class);
        authSvcEndPointLocator = getBean("authSvcEndpointLocator", AuthSvcEndPointLocator.class);
        Validator.setAuthSvcEndPointLocator(authSvcEndPointLocator);
        Validator.setCoordinator(coordinatorClient);
        // need reference to local-security-conf.xml to load this
        Validator.setStorageOSUserRepository(null);
        coordinatorClient.start();
        encryptionProvider.start();
        Logger.info("Started ViPR connection, version: %s", version);
        KeyStoreExporter keystoreExporter = getBean("keystoreExporter", KeyStoreExporter.class);
        keystoreExporter.export();
        // register node listener for catalog acl change
        coordinatorClient.addNodeListener(new CatalogAclListener());
        Logger.info("added CatalogAclListener");
    } catch (Exception e) {
        Logger.error(e, "Error initializing ViPR Connection");
        shutdown();
    }
}
Also used : AuthSvcEndPointLocator(com.emc.storageos.security.authentication.AuthSvcEndPointLocator) KeyStoreExporter(com.emc.storageos.security.keystore.KeyStoreExporter) CoordinatorClient(com.emc.storageos.coordinator.client.service.CoordinatorClient) CatalogAclListener(controllers.util.CatalogAclListener) EncryptionProvider(com.emc.storageos.db.client.model.EncryptionProvider) GenericXmlApplicationContext(org.springframework.context.support.GenericXmlApplicationContext) ZkConnection(com.emc.storageos.coordinator.common.impl.ZkConnection)

Aggregations

AuthSvcEndPointLocator (com.emc.storageos.security.authentication.AuthSvcEndPointLocator)2 CoordinatorClient (com.emc.storageos.coordinator.client.service.CoordinatorClient)1 ZkConnection (com.emc.storageos.coordinator.common.impl.ZkConnection)1 EncryptionProvider (com.emc.storageos.db.client.model.EncryptionProvider)1 KeyStoreExporter (com.emc.storageos.security.keystore.KeyStoreExporter)1 CatalogAclListener (controllers.util.CatalogAclListener)1 GenericXmlApplicationContext (org.springframework.context.support.GenericXmlApplicationContext)1