use of com.emc.storageos.security.keystore.KeyStoreExporter 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();
}
}
use of com.emc.storageos.security.keystore.KeyStoreExporter in project coprhd-controller by CoprHD.
the class KeystoreCmdHandler method exportKeystore.
/**
* Export the ViPR keystore to local file in JKS format
*/
public void exportKeystore() throws Exception {
KeyStoreExporter exporter = (KeyStoreExporter) ctx.getBean("keystoreExporter");
exporter.export();
}
Aggregations