Class JavaSecurityManagementServiceImpl
java.lang.Object
org.kuali.rice.ksb.security.admin.service.impl.JavaSecurityManagementServiceImpl
- All Implemented Interfaces:
JavaSecurityManagementService,org.springframework.beans.factory.InitializingBean
public class JavaSecurityManagementServiceImpl
extends Object
implements JavaSecurityManagementService, org.springframework.beans.factory.InitializingBean
This is an implementation of the
JavaSecurityManagementService interface used by the KSB module- Author:
- Kuali Rice Team (rice.collab@kuali.org)
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddClientCertificateToModuleKeyStore(String alias, Certificate clientCertificate) voidLoad the module's keystore and private key for this "application"protected CertificategenerateCertificate(KeyPair keyPair, String alias) generateClientKeystore(String alias, String clientPassphrase) protected KeyStoregenerateKeyStore(Certificate cert, PrivateKey privateKey, String alias, String keyStorePassword) getCertificate(String alias) getCertificateAlias(Certificate certificate) protected Stringprotected StringbooleanisAliasInKeystore(String alias) protected KeyStoreprotected PrivateKeyvoidremoveClientCertificate(String alias) voidsetModuleKeyStoreAlias(String moduleKeyStoreAlias) voidsetModuleKeyStoreLocation(String moduleKeyStoreLocation) voidsetModuleKeyStorePassword(String moduleKeyStorePassword) protected voidVerifies the configuration of this service and throws an exception if it is not configured properly.
-
Field Details
-
CLIENT_KEY_GENERATOR_ALGORITHM
- See Also:
-
CLIENT_SECURE_RANDOM_ALGORITHM
- See Also:
-
CLIENT_KEY_PAIR_KEY_SIZE
protected final int CLIENT_KEY_PAIR_KEY_SIZE- See Also:
-
-
Constructor Details
-
JavaSecurityManagementServiceImpl
public JavaSecurityManagementServiceImpl()
-
-
Method Details
-
afterPropertiesSet
Load the module's keystore and private key for this "application"- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
Exception
-
verifyConfiguration
protected void verifyConfiguration()Verifies the configuration of this service and throws an exception if it is not configured properly. -
loadKeyStore
- Throws:
GeneralSecurityExceptionIOException
-
loadPrivateKey
- Throws:
GeneralSecurityException
-
removeClientCertificate
- Specified by:
removeClientCertificatein interfaceJavaSecurityManagementService- Throws:
KeyStoreException
-
addClientCertificateToModuleKeyStore
protected void addClientCertificateToModuleKeyStore(String alias, Certificate clientCertificate) throws KeyStoreException - Throws:
KeyStoreException
-
isAliasInKeystore
- Specified by:
isAliasInKeystorein interfaceJavaSecurityManagementService- Throws:
KeyStoreException
-
getCertificateAlias
- Specified by:
getCertificateAliasin interfaceJavaSecurityManagementService- Throws:
KeyStoreException
-
generateClientKeystore
public KeyStore generateClientKeystore(String alias, String clientPassphrase) throws GeneralSecurityException - Specified by:
generateClientKeystorein interfaceJavaSecurityManagementService- Throws:
GeneralSecurityException
-
generateCertificate
protected Certificate generateCertificate(KeyPair keyPair, String alias) throws GeneralSecurityException - Throws:
GeneralSecurityException
-
generateKeyStore
protected KeyStore generateKeyStore(Certificate cert, PrivateKey privateKey, String alias, String keyStorePassword) throws GeneralSecurityException, IOException - Throws:
GeneralSecurityExceptionIOException
-
getListOfModuleKeyStoreEntries
- Specified by:
getListOfModuleKeyStoreEntriesin interfaceJavaSecurityManagementService
-
getModuleSignatureAlgorithm
- Specified by:
getModuleSignatureAlgorithmin interfaceJavaSecurityManagementService
-
getCertificate
- Specified by:
getCertificatein interfaceJavaSecurityManagementService- Throws:
KeyStoreException- See Also:
-
getModuleKeyStoreType
-
getModuleAlgorithm
-
getModuleKeyStoreLocation
- Specified by:
getModuleKeyStoreLocationin interfaceJavaSecurityManagementService
-
setModuleKeyStoreLocation
-
getModuleKeyStoreAlias
- Specified by:
getModuleKeyStoreAliasin interfaceJavaSecurityManagementService
-
setModuleKeyStoreAlias
-
getModuleKeyStorePassword
-
setModuleKeyStorePassword
-
getModuleKeyStore
-
getModulePrivateKey
- Specified by:
getModulePrivateKeyin interfaceJavaSecurityManagementService
-