org.kuali.rice.ksb.security.admin.service.impl
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)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CLIENT_KEY_GENERATOR_ALGORITHM
protected final String CLIENT_KEY_GENERATOR_ALGORITHM
- See Also:
- Constant Field Values
CLIENT_SECURE_RANDOM_ALGORITHM
protected final String CLIENT_SECURE_RANDOM_ALGORITHM
- See Also:
- Constant Field Values
CLIENT_KEY_PAIR_KEY_SIZE
protected final int CLIENT_KEY_PAIR_KEY_SIZE
- See Also:
- Constant Field Values
CLIENT_CERT_EXPIRATION_DAYS
private final int CLIENT_CERT_EXPIRATION_DAYS
- See Also:
- Constant Field Values
MODULE_SHA_RSA_ALGORITHM
private static final String MODULE_SHA_RSA_ALGORITHM
- See Also:
- Constant Field Values
MODULE_JKS_TYPE
private static final String MODULE_JKS_TYPE
- See Also:
- Constant Field Values
moduleKeyStoreLocation
private String moduleKeyStoreLocation
moduleKeyStoreAlias
private String moduleKeyStoreAlias
moduleKeyStorePassword
private String moduleKeyStorePassword
moduleKeyStore
private KeyStore moduleKeyStore
modulePrivateKey
private PrivateKey modulePrivateKey
JavaSecurityManagementServiceImpl
public JavaSecurityManagementServiceImpl()
afterPropertiesSet
public void afterPropertiesSet()
throws Exception
- Load the module's keystore and private key for this "application"
- Specified by:
afterPropertiesSet
in interface org.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
protected KeyStore loadKeyStore()
throws GeneralSecurityException,
IOException
- Throws:
GeneralSecurityException
IOException
loadPrivateKey
protected PrivateKey loadPrivateKey()
throws GeneralSecurityException
- Throws:
GeneralSecurityException
removeClientCertificate
public void removeClientCertificate(String alias)
throws KeyStoreException
- Specified by:
removeClientCertificate
in interface JavaSecurityManagementService
- Throws:
KeyStoreException
addClientCertificateToModuleKeyStore
protected void addClientCertificateToModuleKeyStore(String alias,
Certificate clientCertificate)
throws KeyStoreException
- Throws:
KeyStoreException
isAliasInKeystore
public boolean isAliasInKeystore(String alias)
throws KeyStoreException
- Specified by:
isAliasInKeystore
in interface JavaSecurityManagementService
- Throws:
KeyStoreException
getCertificateAlias
public String getCertificateAlias(Certificate certificate)
throws KeyStoreException
- Specified by:
getCertificateAlias
in interface JavaSecurityManagementService
- Throws:
KeyStoreException
generateClientKeystore
public KeyStore generateClientKeystore(String alias,
String clientPassphrase)
throws GeneralSecurityException
- Specified by:
generateClientKeystore
in interface JavaSecurityManagementService
- 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:
GeneralSecurityException
IOException
getListOfModuleKeyStoreEntries
public List<KeyStoreEntryDataContainer> getListOfModuleKeyStoreEntries()
- Specified by:
getListOfModuleKeyStoreEntries
in interface JavaSecurityManagementService
getModuleSignatureAlgorithm
public String getModuleSignatureAlgorithm()
- Specified by:
getModuleSignatureAlgorithm
in interface JavaSecurityManagementService
getCertificate
public Certificate getCertificate(String alias)
throws KeyStoreException
- Specified by:
getCertificate
in interface JavaSecurityManagementService
- Throws:
KeyStoreException
- See Also:
KeyStore.getCertificate(java.lang.String)
getModuleKeyStoreType
protected String getModuleKeyStoreType()
getModuleAlgorithm
protected String getModuleAlgorithm()
getModuleKeyStoreLocation
public String getModuleKeyStoreLocation()
- Specified by:
getModuleKeyStoreLocation
in interface JavaSecurityManagementService
setModuleKeyStoreLocation
public void setModuleKeyStoreLocation(String moduleKeyStoreLocation)
getModuleKeyStoreAlias
public String getModuleKeyStoreAlias()
- Specified by:
getModuleKeyStoreAlias
in interface JavaSecurityManagementService
setModuleKeyStoreAlias
public void setModuleKeyStoreAlias(String moduleKeyStoreAlias)
getModuleKeyStorePassword
public String getModuleKeyStorePassword()
setModuleKeyStorePassword
public void setModuleKeyStorePassword(String moduleKeyStorePassword)
getModuleKeyStore
public KeyStore getModuleKeyStore()
getModulePrivateKey
public PrivateKey getModulePrivateKey()
- Specified by:
getModulePrivateKey
in interface JavaSecurityManagementService
Copyright © 2004-2011 The Kuali Foundation. All Rights Reserved.