org.jasig.cas.adaptors.x509.authentication.principal
Class X509CertificateCredentialsToSubjectPrinciplalResolver
java.lang.Object
org.jasig.cas.authentication.principal.AbstractPersonDirectoryCredentialsToPrincipalResolver
org.jasig.cas.adaptors.x509.authentication.principal.AbstractX509CertificateCredentialsToPrincipalResolver
org.jasig.cas.adaptors.x509.authentication.principal.X509CertificateCredentialsToSubjectPrinciplalResolver
- All Implemented Interfaces:
- CredentialsToPrincipalResolver
public class X509CertificateCredentialsToSubjectPrinciplalResolver
- extends AbstractX509CertificateCredentialsToPrincipalResolver
Credential to principal resolver that extracts one or more attribute values
from the certificate subject DN and combines them with intervening delimiters.
This class is a replacement for the following deprecated resolvers:
- X509CertificateCredentialsToIdentifierPrincipalResolver
- Since:
- 3.4.4
- Version:
- $Revision$ $Date$
- Author:
- Marvin S. Addison
|
Method Summary |
protected String |
resolvePrincipalInternal(X509Certificate certificate)
Replaces placeholders in the descriptor with values extracted from attribute
values in relative distinguished name components of the DN. |
void |
setDescriptor(String s)
Sets the descriptor that describes for format of the principal ID to
create from X.509 subject DN attributes. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
X509CertificateCredentialsToSubjectPrinciplalResolver
public X509CertificateCredentialsToSubjectPrinciplalResolver()
setDescriptor
public void setDescriptor(String s)
- Sets the descriptor that describes for format of the principal ID to
create from X.509 subject DN attributes. The descriptor is made up of
common X.509 attribute names prefixed by "$", which are replaced by
attribute values extracted from DN attribute values.
EXAMPLE:
The above bean when applied to a certificate with the DN
DC=edu, DC=vt/UID=jacky, CN=Jascarnella Ellagwonto
produces the principal jacky@vt.edu.
- Parameters:
s - Descriptor string where attribute names are prefixed with "$"
to identify replacement by real attribute values from the subject DN.
Valid attributes include common X.509 DN attributes such as the following:
- C
- CN
- DC
- EMAILADDRESS
- L
- O
- OU
- SERIALNUMBER
- ST
- UID
- UNIQUEIDENTIFIER
For a complete list of supported attributes, see
AttributeType.
resolvePrincipalInternal
protected String resolvePrincipalInternal(X509Certificate certificate)
- Replaces placeholders in the descriptor with values extracted from attribute
values in relative distinguished name components of the DN.
- Specified by:
resolvePrincipalInternal in class AbstractX509CertificateCredentialsToPrincipalResolver
- Parameters:
certificate - X.509 certificate credential.
- Returns:
- Resolved principal ID.
- See Also:
AbstractX509CertificateCredentialsToPrincipalResolver.resolvePrincipalInternal(java.security.cert.X509Certificate)
Copyright © 2004-2013 Jasig. All Rights Reserved.