public class X500SubjectCanonicalization extends AbstractSubjectCanonicalizationAction
SubjectCanonicalizationContext child of the current
ProfileRequestContext, and transforms the input Subject
into a principal name by searching for one and only one X509Certificate public credential,
or in its absence one and only one X500Principal.
A list of OIDs is used to locate an RDN to extract from the Subject DN and use as the principal name after applying the transforms from the base class.
Alternatively, a list of subjectAltName extension types may be specified, which takes precedence over the subject, if a match is found.
EventIds.PROCEED_EVENT_ID, AuthnEventIds.INVALID_SUBJECTProfileRequestContext.getSubcontext(SubjectCanonicalizationContext.class) != null
SubjectCanonicalizationContext.getPrincipalName() != null || SubjectCanonicalizationContext.getException() != null
| Modifier and Type | Class and Description |
|---|---|
static class |
X500SubjectCanonicalization.ActivationCondition
A predicate that determines if this action can run or not.
|
| Modifier and Type | Field and Description |
|---|---|
private X509Certificate |
certificate
The certificate to operate on.
|
private static String |
CN_OID
Common Name (CN) OID.
|
private X500SubjectCanonicalization.ActivationCondition |
embeddedPredicate
Supplies logic for pre-execute test.
|
private org.slf4j.Logger |
log
Class logger.
|
private List<String> |
objectIds
OIDs to search for.
|
private List<Integer> |
subjectAltNameTypes
subjectAltName types to search for.
|
private X500Principal |
x500Principal
The subject DN to operate on.
|
| Constructor and Description |
|---|
X500SubjectCanonicalization()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
doExecute(ProfileRequestContext profileRequestContext,
SubjectCanonicalizationContext c14nContext) |
protected boolean |
doPreExecute(ProfileRequestContext profileRequestContext,
SubjectCanonicalizationContext c14nContext) |
protected String |
findRDN(org.cryptacular.x509.dn.RDNSequence sequence,
String oid)
Find an RDN with the specified OID.
|
void |
setObjectIds(List<String> ids)
Set the OIDs to search for, in order of preference.
|
void |
setSubjectAltNameTypes(List<Integer> types)
Set the subjectAltName types to search for, in order of preference.
|
applyTransforms, doExecute, doPreExecute, setLookupStrategy, setLowercase, setTransforms, setTrim, setUppercasedoExecute, execute, getMessage, getMessage, getMessage, getProfileContextLookupStrategy, getRequestContext, getResult, setMessageSource, setProfileContextLookupStrategygetActivationCondition, setActivationConditiondoPostExecute, doPostExecute, execute, getHttpServletRequest, getHttpServletResponse, getLogPrefix, setHttpServletRequest, setHttpServletResponsedestroy, doDestroy, doInitialize, initialize, isDestroyed, isInitializedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinitialize, isInitializedprivate static final String CN_OID
@Nonnull private final org.slf4j.Logger log
@Nonnull private final X500SubjectCanonicalization.ActivationCondition embeddedPredicate
@Nonnull @NonnullElements private List<Integer> subjectAltNameTypes
@Nonnull @NonnullElements private List<String> objectIds
@Nullable private X509Certificate certificate
@Nullable private X500Principal x500Principal
public void setSubjectAltNameTypes(@Nonnull@NonnullElements List<Integer> types)
types - types to search forpublic void setObjectIds(@Nonnull@NonnullElements List<String> ids)
ids - RDN OIDs to search forprotected boolean doPreExecute(@Nonnull ProfileRequestContext profileRequestContext, @Nonnull SubjectCanonicalizationContext c14nContext)
doPreExecute in class AbstractSubjectCanonicalizationActionprotected void doExecute(@Nonnull ProfileRequestContext profileRequestContext, @Nonnull SubjectCanonicalizationContext c14nContext)
doExecute in class AbstractSubjectCanonicalizationActionCopyright © 1999–2018 Shibboleth Consortium. All rights reserved.