PKI Policy
PKI Policy defines the trusted Certificate Authority certificates (trust anchors) and CRL/OCSP endpoints used when validating certificates or certificate chains and attributes generated from subject and issuer certificates.
On this page described:
- 1 PKI Policy XML configuration file
- 2 Schema Explanation
- 2.1 The <Policy/> element
- 2.2 The <PKI/> element
- 2.3 The <Trust /> element
- 2.4 The <CRL /> and <OCSP /> elements
- 2.5 The <Subject /> element
- 2.6 The <Attributes /> element
- 2.7 The <Add /> element
- 2.8 The <Attribute /> element
- 2.9 The <Concat /> element
- 2.10 The <Digest /> element
- 2.11 The <Field /> element
- 2.12 The <Text /> element
- 2.13 The source attribute
PKI Policy XML configuration file
An example PKI policy XML configuration file is shown below.
<?xml version="1.0" encoding="iso-8859-1"?>
<Policy
xmlns="http://ubisecure.com/schema/certagent.xsd">
<PKI>
<Trust crl="ldap://ldap.fineid.fi:389/cn%3dVRK%20Gov.%20CA%20for%20Citizen%20Qualified%20Certificates,ou%3dValtion%20kansalaisvarmenteet,o%3dVaestorekisterikeskus%20CA,dmdName%3dFINEID,c%3dFI?certificateRevocationList??objectClass=cRLDistributionPoint">
MIIFjDCCBHSgAwIBAgIDAYiZMA0GCSqGSIb3DQEBBQUAMIGjMQswCQYDVQQGEwJG
STEQMA4GA1UECBMHRmlubGFuZDEhMB8GA1UEChMYVmFlc3RvcmVraXN0ZXJpa2Vz
a3VzIENBMSkwJwYDVQQLEyBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSBTZXJ2aWNl
czEZMBcGA1UECxMQVmFybWVubmVwYWx2ZWx1dDEZMBcGA1UEAxMQVlJLIEdvdi4g
Um9vdCBDQTAeFw0wMzAxMTAxMjU5MDVaFw0xOTAxMDkxMjU4MzBaMIGhMQswCQYD
VQQGEwJGSTEQMA4GA1UECBMHRmlubGFuZDEhMB8GA1UEChMYVmFlc3RvcmVraXN0
ZXJpa2Vza3VzIENBMSQwIgYDVQQLExtWYWx0aW9uIGthbnNhbGFpc3Zhcm1lbnRl
ZXQxNzA1BgNVBAMTLlZS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UJHgob91+kNslfPTVAoBBcwDQYJ
KoZIhvcNAQEFBQADggEBAEXit6ypQO+0RbVTK57SKT1jsqE8dUiwL8oevvdBiFpR
4HxEZZy8e/OGAvF3Hc/Hjc8cOjlsYToqztg16cOFI4vHZ+yC8rWh4TpuWgvkS80h
//jcweAayp6E/Z0z928vTNILBD34YJQvpU4u7jyhSaY3tzybKjlSAo5lahiI32a9
MNZXGoNv+j+MKq1NJkpgpy6/VEa5Z4RdRx43/EZhs45WvxTfER+nUC1loQngFKOS
jdWG3GhOAh13nM9jYASBtC7ONddvoByfzwUOQ+BOf08R2bvZA+2CDFI8PuYqxCFv
BMCpQSCdVL6tEYxeWIQb+uIQsfAEfjC3AQuTNh/UiW8=
</Trust>
</PKI>
<Subject KeyInfoConfirmationData="true"/>
<Attributes>
<!-- Subject's SHA-1 fingerprint -->
<Add name="subject.fingerprint">
<Digest source="subject" algorithm="sha1" />
</Add>
<!-- Subject's distinguished name -->
<Add name="subject.dn">
<Field source="subject"/>
</Add>
<!-- Issuer's distinguished name -->
<Add name="issuer.dn">
<Field source="issuer"/>
</Add>
<!-- Subject's attributes 2.5.4.4 (surname) and
2.5.4.42 (givenName) separated by space -->
<Add name="subject.name">
<Concat>
<Attribute source="subject" oid="2.5.4.4"/>
<Text content=" " />
<Attribute source="subject" oid="2.5.4.42"/>
</Concat>
</Add>
</Attributes>
</Policy> |
Trust anchors are defined in the Trust elements enclosed in a PKI element. The corresponding CRL distribution point is defined in the crl attribute. Other trusted issuers may be added by defining a new Trust element for each trusted issuer.
The subject certificate is defined to be included in a SubjectConfirmation of SAML Assertion by defining the Subject element's KeyInfoConfirmationData attribute as true. The subject certificate is used by SSO to write the audit log entry “certificate received”.
Attributes to be sent to SSO as SAML Assertion attributes and OpenID Connect id_token claims are defined in the Attributes element. The name of the attribute is defined in the name attribute of the Add element. The content of the attribute is defined in the enclosed elements. In this example:
The attribute
subject.fingerprint
is defined as a SHA-1 digest (fingerprint) of the subject certificate.The attribute
subject.dn
is defined as the distinguished name of the subject certificate.The attribute
issuer.dn
is defined as the distinguished name of the issuer certificate.The attribute
subject.name
is defined to be concatenated from attribute OID 2.5.4.4 (surname), 
(a space character) and attribute OID 2.5.4.42 (givenName).
The structure and data types of the configuration document are described in the following schema.
Schema Explanation
The <Policy/> element
<xs:element name="Policy" type="PolicyType" />
<xs:complexType name="PolicyType">
<xs:sequence>
<xs:element ref="PKI" />
<xs:element ref="Subject" />
<xs:element ref="Attributes" />
</xs:sequence>
</xs:complexType> |
The policy element defines three required child elements: PKI, Subject and Attributes.
The <PKI/> element
<xs:element name="PKI" type="PKIType" />
<xs:complexType name="PKIType">
<xs:sequence minOccurs="1" maxOccurs="unbounded">
<xs:element ref="Trust" />
</xs:sequence>
</xs:complexType> |
The PKI element encapsulates <Trust/> definitions. At least one certificate authority (CA) must be configured.
The <Trust /> element
The <Trust /> element represents a trusted certificate authority. The element contains a Base64-encoded certificate. The element may also contain crl
attribute defining a CRL URL or ocsp
attribute defining an OCSP URL.
Optionally CRL and OCSP URLs can be defined in a separate element <CRL /> and <OCSP /> as child element for <Trust /> element, and refer to them by their id in crlref
and ocspref
attribute in <Trust /> element.
The <CRL /> and <OCSP /> elements
The <CRL /> and the <OCSP /> element represent a CRL and OCSP endpoint. The endpoint URL is defined in uri
attribute and an optional identifier in id
attribute. The identifier can be used in a <Trust /> element as value for crlref
or ocspref
attribute to refer to <CRL /> or <OCSP /> element, in which case the CRL or OCSP endpoint is used only with that trust anchor. A <CRL /> or <OCSP /> element without id attribute is used with any trust anchor.
PKI Policy supports only one OCSP endpoint per trust anchor.
For example:
The <Subject /> element
The <Subject /> element contains a Boolean type attribute called KeyInfoConfirmationData which defines whether the client certificate sent to service provider in SAML Assertion or OpenID Connect id_token.
The <Attributes /> element
The <Attributes/> element is the container for response attributes. Response attributes are defined using the <Add/> directive.
The <Add /> element
This element is used to add response attributes to the assertion. Each <Add/> element can contain one of the child elements defined in ValueGroup.
The <Attribute /> element
The <Attribute /> element contains the source and OID attributes. OID-element represents an object identifier and the source defines if the OID is looked up from the distinguished name of the subject or the issuer.
The <Concat /> element
The <Concat/> element concatenates information defined by elements of the ValueGroup definition. Each defined element is individually parsed to a textual representation and concatenated with each other to form a single string.
The <Digest /> element
The <Digest /> element computes the hash of either the client's or CA's certificate. Allowed algorithms are md5 or sha-1, defined with the strings "md5" or "sha1".
The <Field /> element
The <Field /> element allows submitting either the subject's or issuer's distinguished name. The names' string representations are, by default, serialized by the JDK X500Principal.toString() –method. The normalization routine can be controlled by defining one of the following values:
Value | Description |
---|---|
RFC1779 | X500Principal (Java 2 Platform SE 5.0) |
RFC2253 | X500Principal (Java 2 Platform SE 5.0) |
CANONICAL | X500Principal (Java 2 Platform SE 5.0) |
altSecurityIdentities | Alt-Security-Identities attribute - Win32 apps
|
The <Text /> element
This element can be used to include arbitrary text in the response attributes or use the text in concatenation with other elements.
The source attribute
The value of source
attribute for Attribute, Field and Digest elements can be either subject
or issuer
. It denotes the source certificate for the element being either the subject certificate, or the issuer of subject certificate.
This web page (including any attachments) may contain confidential, proprietary, or privileged information – not for disclosure without authorization from Ubisecure Inc. Copyright © 2024. All Rights Reserved.