public abstract class CoreSecurityService extends ServiceImp
SecurityService
Modifier and Type | Field and Description |
---|---|
protected boolean |
branchingEnabled |
log
Constructor and Description |
---|
CoreSecurityService()
Creates a new Object with the following defaults.
|
Modifier and Type | Method and Description |
---|---|
void |
addKeystoreUrl(ConfiguredKeystore url)
Add an url to the list.
|
protected void |
closeService() |
EncryptionAlgorithm |
getEncryptionAlgorithm()
Get the encryption algorithm to be used.
|
java.lang.String |
getFailId() |
java.util.List<ConfiguredKeystore> |
getKeystoreUrls()
Get the list of keystore urls.
|
java.lang.String |
getLocalPartner()
Get the local partner keystore alias.
|
PrivateKeyPasswordProvider |
getPrivateKeyPasswordProvider() |
java.lang.String |
getRemotePartner()
Get the remote partner alias.
|
java.lang.String |
getRemotePartnerMetadataKey() |
SecurityServiceFactory |
getSecurityFactory()
Get the encryption type to be used.
|
java.lang.String |
getSuccessId() |
protected void |
initService() |
boolean |
isBranching()
Returns true if the implementation supports branching.
|
void |
prepare()
Prepare for initialisation.
|
void |
setEncryptionAlgorithm(EncryptionAlgorithm enc)
Set the encryption algorithm to be used.
|
void |
setFailId(java.lang.String s) |
void |
setKeystoreUrls(java.util.List<ConfiguredKeystore> list)
Set the keystore urls.
|
void |
setLocalPartner(java.lang.String s)
Set the local partner keystore alias.
|
void |
setPrivateKeyPasswordProvider(PrivateKeyPasswordProvider pkpp)
Set the private key password provider.
|
void |
setRemotePartner(java.lang.String s)
Set the remote partner keystore alias.
|
void |
setRemotePartnerMetadataKey(java.lang.String s) |
void |
setSecurityFactory(SecurityServiceFactory s)
Set the type of encryption to be used.
|
void |
setSuccessId(java.lang.String s) |
changeState, close, continueOnFailure, createName, createQualifier, getContinueOnFail, getIsTrackingEndpoint, getUniqueId, init, isTrackingEndpoint, requestClose, requestInit, requestStart, requestStop, retrieveComponentState, setContinueOnFail, setIsTrackingEndpoint, setUniqueId, start, stop
public CoreSecurityService()
public boolean isBranching()
Service
Returns true if the implementation supports branching.
isBranching
in interface Service
isBranching
in class ServiceImp
ServiceImp.isBranching()
public java.util.List<ConfiguredKeystore> getKeystoreUrls()
public void setKeystoreUrls(java.util.List<ConfiguredKeystore> list)
list
- the list of keystore urls.public void addKeystoreUrl(ConfiguredKeystore url)
Valid URLS are in the form
[protocol]://[server]:[port]/[path]?keystoreType=[type]&
keystorePassword=[password]
An example would be http://www.adaptris.com/my.ks?keystoreType=JKS&
keystorePassword=ABCDE
or
file://localhost/c:/my.ks?keystoreType=JKS&
keystorePassword=ABCDE
For the purposes of security each of the keystores will be searched in turn for the matching partner information. Only the first matching partner will be used.
url
- an individual urlgetKeystoreUrls()
,
ConfiguredKeystore
public void setLocalPartner(java.lang.String s)
s
- the local partnerpublic java.lang.String getLocalPartner()
public void setRemotePartner(java.lang.String s)
If this is not set, then it will be derived from metadata.
s
- the remote partnerCoreConstants.SECURITY_REMOTE_PARTNER
public java.lang.String getRemotePartner()
public void setEncryptionAlgorithm(EncryptionAlgorithm enc)
enc
- the encryption algorithmpublic EncryptionAlgorithm getEncryptionAlgorithm()
public void setSecurityFactory(SecurityServiceFactory s)
s
- the encryption type.public SecurityServiceFactory getSecurityFactory()
protected final void initService() throws CoreException
initService
in class ServiceImp
CoreException
protected void closeService()
closeService
in class ServiceImp
public void prepare() throws CoreException
ComponentLifecycleExtension
CoreException
public java.lang.String getFailId()
public void setFailId(java.lang.String s)
s
- the failId to setpublic java.lang.String getSuccessId()
public void setSuccessId(java.lang.String s)
s
- the successId to setpublic java.lang.String getRemotePartnerMetadataKey()
public void setRemotePartnerMetadataKey(java.lang.String s)
public PrivateKeyPasswordProvider getPrivateKeyPasswordProvider()
public void setPrivateKeyPasswordProvider(PrivateKeyPasswordProvider pkpp)
pkpp
- the provider; default is LegacyPrivateKeyPasswordProvider
which retrieves the private key password from
'security.properties' on the classpath to support backward compatibility.