@Service @Singleton public class SecuritySupportImpl extends SecuritySupport
| Modifier and Type | Field and Description |
|---|---|
protected static Logger |
_logger |
protected static List<char[]> |
keyStorePasswords |
protected static List<KeyStore> |
keyStores |
static String |
SEC_SSL_LOGGER |
static String |
SHARED_LOGMESSAGE_RESOURCE |
protected static List<String> |
tokenNames |
protected static List<KeyStore> |
trustStores |
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 |
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
protected static final List<char[]> keyStorePasswords
public SecuritySupportImpl()
protected SecuritySupportImpl(boolean init)
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 - public KeyStore[] getKeyStores()
getKeyStores 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 KeyStore[] getTrustStores()
getTrustStores in class SecuritySupportpublic boolean verifyMasterPassword(char[] masterPass)
verifyMasterPassword 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 synchronizeKeyFile(Object configContext, String fileRealmName) throws Exception
SecuritySupportsynchronizeKeyFile in class SecuritySupportExceptionpublic void checkPermission(String key)
SecuritySupportcheckPermission in class SecuritySupportpublic boolean isACC()
public boolean isNotServerORACC()
public 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.KeyStoreExceptionNoSuchAlgorithmExceptionUnrecoverableKeyExceptionCopyright © 2017. All rights reserved.