/** * Initialize Credential Store service with given attributes. * This procedure should set {@link CredentialStoreSpi#initialized} after successful initialization. * * @param attributes attributes to used to pass information to Credential Store service * @throws CredentialStoreException if initialization fails due to any reason */ public void initialize(Map<String, String> attributes) throws CredentialStoreException { initialize(attributes, null); }
/** * Initialize Credential Store service with given attributes. * This procedure should set {@link CredentialStoreSpi#initialized} after successful initialization. * * @param attributes attributes to used to pass information to Credential Store service * @param protectionParameter the protection parameter to use when accessing the store * @throws CredentialStoreException if initialization fails due to any reason */ public void initialize(Map<String, String> attributes, ProtectionParameter protectionParameter) throws CredentialStoreException { initialize(attributes, protectionParameter, null); }
/** * Create an instance of {@link CredentialStore} and initialize it. * * @return the new instance * @throws GeneralSecurityException if instantiation fails for some reason */ @Override public CredentialStore get() throws ConfigXMLParseException { final CredentialStore credentialStore; try { if (providers != null) { credentialStore = providerName != null ? CredentialStore.getInstance(type, providerName, providers) : CredentialStore.getInstance(type, providers); } else { credentialStore = providerName != null ? CredentialStore.getInstance(type, providerName) : CredentialStore.getInstance(type); } credentialStore.initialize(attributes, credentialSource == null ? null : new CredentialStore.CredentialSourceProtectionParameter(credentialSource.get())); } catch (GeneralSecurityException e) { throw xmlLog.xmlFailedToCreateCredentialStore(location, e); } return credentialStore; }
/** * Initialize Credential Store service with given attributes. * This procedure should set {@link CredentialStoreSpi#initialized} after successful initialization. * * @param attributes attributes to used to pass information to Credential Store service * @param protectionParameter the protection parameter to use when accessing the store * @throws CredentialStoreException if initialization fails due to any reason */ public void initialize(Map<String, String> attributes, ProtectionParameter protectionParameter) throws CredentialStoreException { initialize(attributes, protectionParameter, null); }
/** * Initialize Credential Store service with given attributes. * This procedure should set {@link CredentialStoreSpi#initialized} after successful initialization. * * @param attributes attributes to used to pass information to Credential Store service * @param protectionParameter the protection parameter to use when accessing the store * @throws CredentialStoreException if initialization fails due to any reason */ public void initialize(Map<String, String> attributes, ProtectionParameter protectionParameter) throws CredentialStoreException { initialize(attributes, protectionParameter, null); }
/** * Initialize Credential Store service with given attributes. * This procedure should set {@link CredentialStoreSpi#initialized} after successful initialization. * * @param attributes attributes to used to pass information to Credential Store service * @throws CredentialStoreException if initialization fails due to any reason */ public void initialize(Map<String, String> attributes) throws CredentialStoreException { initialize(attributes, null); }
/** * Initialize Credential Store service with given attributes. * This procedure should set {@link CredentialStoreSpi#initialized} after successful initialization. * * @param attributes attributes to used to pass information to Credential Store service * @param protectionParameter the protection parameter to use when accessing the store * @throws CredentialStoreException if initialization fails due to any reason */ public void initialize(Map<String, String> attributes, ProtectionParameter protectionParameter) throws CredentialStoreException { initialize(attributes, protectionParameter, null); }
/** * Initialize Credential Store service with given attributes. * This procedure should set {@link CredentialStoreSpi#initialized} after successful initialization. * * @param attributes attributes to used to pass information to Credential Store service * @throws CredentialStoreException if initialization fails due to any reason */ public void initialize(Map<String, String> attributes) throws CredentialStoreException { initialize(attributes, null); }
/** * Initialize Credential Store service with given attributes. * This procedure should set {@link CredentialStoreSpi#initialized} after successful initialization. * * @param attributes attributes to used to pass information to Credential Store service * @throws CredentialStoreException if initialization fails due to any reason */ public void initialize(Map<String, String> attributes) throws CredentialStoreException { initialize(attributes, null); }
@Override public void start(StartContext startContext) throws StartException { Path loc = location == null ? null : resolveLocation(); try { ROOT_LOGGER.tracef("starting CredentialStore: name = %s", name); credentialStoreAttributes.put(CS_LOCATION_ATTRIBUTE, loc == null ? null : loc.toAbsolutePath().toString()); CredentialStore cs = getCredentialStoreInstance(); Provider[] otherProvidersArr = otherProviders.getOptionalValue(); if (ROOT_LOGGER.isTraceEnabled()) { ROOT_LOGGER.tracef( "initializing CredentialStore: name = %s type = %s provider = %s otherProviders = %s attributes = %s", name, type, provider, Arrays.toString(otherProvidersArr), credentialStoreAttributes ); } synchronized (EmptyProvider.getInstance()) { cs.initialize(credentialStoreAttributes, resolveCredentialStoreProtectionParameter(), otherProvidersArr); } if (credentialStoreAttributes.get(ElytronDescriptionConstants.CREATE).equals("true") && loc != null && !loc.toFile().exists()){ ROOT_LOGGER.tracef("CredentialStore %s does not exist, creating", name); cs.flush(); } credentialStore.set(cs); ROOT_LOGGER.tracef("CredentialStore started: name = %s credentialStore = %s", name, cs); } catch (Exception e) { throw ElytronSubsystemMessages.ROOT_LOGGER.unableToStartService(e); } }
/** * Create an instance of {@link CredentialStore} and initialize it. * * @return the new instance * @throws GeneralSecurityException if instantiation fails for some reason */ @Override public CredentialStore get() throws ConfigXMLParseException { final CredentialStore credentialStore; try { if (providers != null) { credentialStore = providerName != null ? CredentialStore.getInstance(type, providerName, providers) : CredentialStore.getInstance(type, providers); } else { credentialStore = providerName != null ? CredentialStore.getInstance(type, providerName) : CredentialStore.getInstance(type); } credentialStore.initialize(attributes, credentialSource == null ? null : new CredentialStore.CredentialSourceProtectionParameter(credentialSource.get())); } catch (GeneralSecurityException e) { throw xmlLog.xmlFailedToCreateCredentialStore(location, e); } return credentialStore; }
/** * Create an instance of {@link CredentialStore} and initialize it. * * @return the new instance * @throws GeneralSecurityException if instantiation fails for some reason */ @Override public CredentialStore get() throws ConfigXMLParseException { final CredentialStore credentialStore; try { if (providers != null) { credentialStore = providerName != null ? CredentialStore.getInstance(type, providerName, providers) : CredentialStore.getInstance(type, providers); } else { credentialStore = providerName != null ? CredentialStore.getInstance(type, providerName) : CredentialStore.getInstance(type); } credentialStore.initialize(attributes, credentialSource == null ? null : new CredentialStore.CredentialSourceProtectionParameter(credentialSource.get())); } catch (GeneralSecurityException e) { throw xmlLog.xmlFailedToCreateCredentialStore(location, e); } return credentialStore; }
/** * Create an instance of {@link CredentialStore} and initialize it. * * @return the new instance * @throws GeneralSecurityException if instantiation fails for some reason */ @Override public CredentialStore get() throws ConfigXMLParseException { final CredentialStore credentialStore; try { if (providers != null) { credentialStore = providerName != null ? CredentialStore.getInstance(type, providerName, providers) : CredentialStore.getInstance(type, providers); } else { credentialStore = providerName != null ? CredentialStore.getInstance(type, providerName) : CredentialStore.getInstance(type); } credentialStore.initialize(attributes, credentialSource == null ? null : new CredentialStore.CredentialSourceProtectionParameter(credentialSource.get())); } catch (GeneralSecurityException e) { throw xmlLog.xmlFailedToCreateCredentialStore(location, e); } return credentialStore; }