@Service @Singleton public class SecuritySupportImpl extends SecuritySupport
| Modifier and Type | Field and Description |
|---|---|
protected static Logger |
_logger |
static String |
SEC_SSL_LOGGER |
static String |
SHARED_LOGMESSAGE_RESOURCE |
KEYSTORE_PASS_PROP, KEYSTORE_TYPE_PROP, keyStoreProp, TRUSTSTORE_PASS_PROP, TRUSTSTORE_TYPE_PROP, trustStoreProp| Modifier | Constructor and Description |
|---|---|
|
SecuritySupportImpl() |
protected |
SecuritySupportImpl(boolean init) |
| Modifier and Type | Method and Description |
|---|---|
void |
checkPermission(String key)
Check permission for the given key.
|
KeyManager[] |
getKeyManagers(String algorithm) |
KeyStore |
getKeyStore(String token) |
KeyStore[] |
getKeyStores()
This method returns an array of keystores containing keys and certificates.
|
PrivateKey |
getPrivateKeyForAlias(String alias,
int keystoreIndex)
Gets the PrivateKey for specified alias from the corresponding keystore indicated by the index.
|
String[] |
getTokenNames()
This method returns an array of token names in order corresponding to array of keystores.
|
TrustManager[] |
getTrustManagers(String algorithm) |
KeyStore |
getTrustStore(String token) |
KeyStore[] |
getTrustStores()
This method returns an array of truststores containing certificates.
|
boolean |
isACC() |
boolean |
isNotServerORACC() |
KeyStore |
loadNullStore(String type,
int index) |
protected static void |
loadStores(String tokenName,
Provider provider,
String keyStoreFile,
char[] keyStorePass,
String keyStoreType,
String trustStoreFile,
char[] trustStorePass,
String trustStoreType)
This method will load keystore and truststore and add into corresponding list.
|
void |
reset()
Resets the security instance by effectively re-initializing it.
|
void |
synchronizeKeyFile(Object configContext,
String fileRealmName)
TODO:V3:Cluster ConfigContext is no longer present so find out what this needs to be
|
boolean |
verifyMasterPassword(char[] masterPass) |
getDefaultInstancepublic static final String SHARED_LOGMESSAGE_RESOURCE
public static final String SEC_SSL_LOGGER
protected static final Logger _logger
public SecuritySupportImpl()
protected SecuritySupportImpl(boolean init)
public KeyStore[] getKeyStores()
getKeyStores in class SecuritySupportpublic KeyStore[] getTrustStores()
getTrustStores in class SecuritySupportpublic String[] getTokenNames()
getTokenNames in class SecuritySupportpublic KeyStore getKeyStore(String token)
getKeyStore in class SecuritySupporttoken - public KeyStore getTrustStore(String token)
getTrustStore in class SecuritySupporttoken - public void reset()
SecuritySupportThis means the default keystores and truststores will be reloaded from their default locations (which may be configured by system properties, such as with the default SecuritySupport instance).
reset in class SecuritySupportpublic KeyStore loadNullStore(String type, int index) throws KeyStoreException, IOException, NoSuchAlgorithmException, CertificateException
loadNullStore in class SecuritySupportKeyStoreExceptionIOExceptionNoSuchAlgorithmExceptionCertificateExceptionpublic KeyManager[] getKeyManagers(String algorithm) throws IOException, KeyStoreException, NoSuchAlgorithmException, UnrecoverableKeyException
getKeyManagers in class SecuritySupportIOExceptionKeyStoreExceptionNoSuchAlgorithmExceptionUnrecoverableKeyExceptionpublic TrustManager[] getTrustManagers(String algorithm) throws IOException, KeyStoreException, NoSuchAlgorithmException
getTrustManagers in class SecuritySupportIOExceptionKeyStoreExceptionNoSuchAlgorithmExceptionpublic boolean verifyMasterPassword(char[] masterPass)
verifyMasterPassword in class SecuritySupportpublic void synchronizeKeyFile(Object configContext, String fileRealmName) throws Exception
SecuritySupportsynchronizeKeyFile in class SecuritySupportExceptionpublic PrivateKey getPrivateKeyForAlias(String alias, int keystoreIndex) throws KeyStoreException, NoSuchAlgorithmException, UnrecoverableKeyException
SecuritySupportgetPrivateKeyForAlias in class SecuritySupportalias - Alias for which the PrivateKey is desired.keystoreIndex - Index of the keystore.KeyStoreExceptionNoSuchAlgorithmExceptionUnrecoverableKeyExceptionpublic void checkPermission(String key)
SecuritySupportcheckPermission in class SecuritySupportpublic boolean isACC()
public boolean isNotServerORACC()
protected static void loadStores(String tokenName, Provider provider, String keyStoreFile, char[] keyStorePass, String keyStoreType, String trustStoreFile, char[] trustStorePass, String trustStoreType)
tokenName - provider - keyStorePass - keyStoreFile - keyStoreType - trustStorePass - trustStoreFile - trustStoreType - Copyright © 2019. All rights reserved.