Class X509CredentialStorageServiceResolver
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
net.shibboleth.sp.credential.AbstractOrderedCredentialResolver
net.shibboleth.sp.credential.AbstractStorageServiceCredentialResolver<X509Credential>
net.shibboleth.sp.credential.impl.X509CredentialStorageServiceResolver
- All Implemented Interfaces:
Component,DestructableComponent,IdentifiableComponent,IdentifiedComponent,InitializableComponent,Resolver<Credential,,CriteriaSet> OrderedCredentialResolver,CredentialResolver,Ordered
public class X509CredentialStorageServiceResolver
extends AbstractStorageServiceCredentialResolver<X509Credential>
A specialized storage-based resolver that can resolve the
X509Credential type.
Additional settings are required to specify how to locate the various components such as the private key and certificate(s). A key password may be configured but must be usable for any resolved keys.
The private key and certificate(s) must be stored separately for this implementation in DER or PEM fornat but cannot be binary-encoded.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.shibboleth.sp.credential.AbstractOrderedCredentialResolver
AbstractOrderedCredentialResolver.UsageCriterionPredicate -
Field Summary
FieldsModifier and TypeFieldDescription(package private) TemplateVelocity template for certificate storage key.private StringTemplate used to construct the storage key for the public key certificate(s).(package private) TemplateVelocity template for CRL storage key.private StringTemplate used to construct the storage key for the CRL(s).private final org.slf4j.LoggerClass logger.private char[]Password for private key(s).(package private) TemplateVelocity template for private key storage key.private StringTemplate used to construct the storage key for the private key.Fields inherited from class net.shibboleth.sp.credential.AbstractStorageServiceCredentialResolver
CONTEXT_KEY_AGENT_ID, CONTEXT_KEY_APPLICATION_ID, CONTEXT_KEY_CRITERIA, CONTEXT_KEY_ENTITY_ID, CONTEXT_KEY_PRC, CONTEXT_KEY_PROTOCOL, CONTEXT_KEY_TX_ENTITY_ID, CONTEXT_KEY_USAGE, DEFAULT_CONTEXT_PREFIXFields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected Iterable<Credential>doResolve(org.apache.velocity.VelocityContext velocityContext, CriteriaSet criteria, String storageContext) Perform the resolution as required for the specific type ofCredential.voidsetCertificateTemplate(String template) Sets the Velocity template string for the certificate's storage key.voidsetCRLTemplateString(String template) Sets the Velocity template string for the CRL's storage key.voidsetPrivateKeyPassword(String password) Sets the private key password to apply to any resolved keys.voidsetPrivateKeyTemplate(String template) Sets the Velocity template string for the private key's storage key.Methods inherited from class net.shibboleth.sp.credential.AbstractStorageServiceCredentialResolver
doResolve, getStorageService, getVelocityEngine, populateVelocityContext, setCacheEnabled, setContextTemplate, setEntityIDTransformStrategy, setExpireAfterAccess, setExpireAfterWrite, setMaximumCachedElements, setProtocolMap, setStorageService, setUsageMap, setVelocityEngineMethods inherited from class net.shibboleth.sp.credential.AbstractOrderedCredentialResolver
getOrder, resolve, resolveSingle, setFilterByUsage, setOrder, setProtocolsMethods inherited from class net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
setIdMethods inherited from class net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
ensureId, getId, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentExceptionMethods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent
checkComponentActive, checkSetterPreconditions, destroy, doDestroy, initialize, isDestroyed, isInitializedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.shibboleth.shared.component.IdentifiedComponent
getId
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logClass logger. -
privateKeyTemplateString
Template used to construct the storage key for the private key. -
certificateTemplateString
Template used to construct the storage key for the public key certificate(s). -
crlTemplateString
Template used to construct the storage key for the CRL(s). -
privateKeyPassword
@Nullable private char[] privateKeyPasswordPassword for private key(s). -
privateKeyTemplate
Velocity template for private key storage key. -
certificateTemplate
Velocity template for certificate storage key. -
crlTemplate
Velocity template for CRL storage key.
-
-
Constructor Details
-
X509CredentialStorageServiceResolver
public X509CredentialStorageServiceResolver()Constructor.
-
-
Method Details
-
setPrivateKeyTemplate
Sets the Velocity template string for the private key's storage key.Defaults to "sp${usage}.key", which punts any other decoration to the storage context.
- Parameters:
template- template string
-
setCertificateTemplate
Sets the Velocity template string for the certificate's storage key.Defaults to "sp${usage}.crt", which punts any other decoration to the storage context.
- Parameters:
template- template string
-
setCRLTemplateString
Sets the Velocity template string for the CRL's storage key.Defaults to null, ignoring the CRL component.
- Parameters:
template- template string
-
setPrivateKeyPassword
Sets the private key password to apply to any resolved keys.- Parameters:
password- key password
-
doInitialize
- Overrides:
doInitializein classAbstractStorageServiceCredentialResolver<X509Credential>- Throws:
ComponentInitializationException
-