@RefreshScope @Component(value="x509SubjectPrincipalResolver") public class X509SubjectPrincipalResolver extends AbstractX509PrincipalResolver
| Constructor and Description |
|---|
X509SubjectPrincipalResolver() |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.String |
resolvePrincipalInternal(java.security.cert.X509Certificate certificate)
Replaces placeholders in the descriptor with values extracted from attribute
values in relative distinguished name components of the DN.
|
void |
setDescriptor(java.lang.String s)
Sets the descriptor that describes for format of the principal ID to
create from X.509 subject DN attributes.
|
extractPrincipalId, supports@Autowired
public void setDescriptor(@Value(value="${cas.x509.authn.principal.descriptor:}")
java.lang.String s)
EXAMPLE:
{@code
<bean class="X509SubjectPrincipalResolver"
p:descriptor="$UID@$DC.$DC" />
}
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.
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:
StandardAttributeType.protected java.lang.String resolvePrincipalInternal(java.security.cert.X509Certificate certificate)
resolvePrincipalInternal in class AbstractX509PrincipalResolvercertificate - X.509 certificate credential.AbstractX509PrincipalResolver.resolvePrincipalInternal(java.security.cert.X509Certificate)