Control certificate issuance with X.509 certificate condition keys
With X.509 certificate condition keys, you can write IAM policies that inspect the
certificate that AWS Private CA is about to sign. When a caller invokes the
IssueCertificate operation,
AWS Private CA builds the certificate from the certificate signing request (CSR), the certificate
template, any API passthrough values, and the request parameters. It then evaluates
your policies against the attributes of that certificate before signing it. If a policy
denies the request, AWS Private CA returns an AccessDeniedException and doesn't
issue the certificate.
The condition keys describe the certificate that would be issued, not how its
contents were supplied. For example, acm-pca:x509Ext/ExtendedKeyUsage has
the same value whether the extended key usage came from the CSR, the template, or API
passthrough. This means that a policy can't be bypassed by moving an attribute from one
input to another.
X.509 certificate condition keys are available only for the
acm-pca:IssueCertificate action. Don't use them in statements that
apply to other actions, such as acm-pca:RevokeCertificate or
acm-pca:GetCertificate. Those requests don't include the keys, so the
conditions in those statements won't match the way you intend.
A new Deny statement can block certificate requests that you didn't
intend to block, including requests that other AWS services and connectors make on
your behalf. Before you apply a policy broadly, read Before you deploy a policy and test the policy in a non-production account.
Topics
Condition key reference
All X.509 certificate condition keys use the acm-pca: prefix and
describe the To-Be-Signed (TBS) certificate. A key that doesn't apply to the
certificate is absent from the request context. For example,
acm-pca:x509Key/curve is absent for an RSA key, and
acm-pca:x509Ext/BasicConstraints/pathLen is absent when the
certificate doesn't set a path length. For how absent keys affect your policies, see
How condition key values are evaluated.
The following keys describe the subject of the certificate.
| Condition key | Type | Description |
|---|---|---|
|
|
Bool | true if the subject distinguished name is empty or
contains only empty relative distinguished names. Always
present. |
|
|
ArrayOfString | Subject common names, matched as written in the certificate. For more information, see How condition key values are evaluated. |
|
|
ArrayOfString | Subject countries, as two-letter codes. For example,
DE. |
|
|
ArrayOfString | Subject organizations. |
|
|
ArrayOfString | Subject organizational units. |
The following keys describe the subject alternative name (SAN) extension.
| Condition key | Type | Description |
|---|---|---|
|
|
Bool | true if the certificate has a subject alternative name
extension. |
|
|
Bool | true if the SAN extension is marked critical. |
|
|
Numeric | Total number of entries in the SAN extension. |
|
|
ArrayOfString | DNS name entries, in lowercase without a trailing dot. For example,
www.example.com. |
|
|
ArrayOfIPAddress | IP address entries. AWS Private CA evaluates IPv4-mapped IPv6 addresses as IPv4 addresses, so IPv4 ranges in your conditions also match them. |
|
|
ArrayOfString | URI entries, such as SPIFFE workload identifiers. The host part is lowercase, and the rest of the URI is unchanged. |
|
|
ArrayOfString | Email address entries. The domain part is lowercase, and the local part is unchanged. |
|
|
ArrayOfString | Common names from all directory name entries in the SAN extension. |
|
|
ArrayOfString | Values of other name entries, keyed by type ID. For example, the
Microsoft user principal name is
acm-pca:x509SAN/OtherName/1.3.6.1.4.1.311.20.2.3. |
The following keys describe the subject public key and the signature algorithm.
| Condition key | Type | Description |
|---|---|---|
|
|
String | Algorithm of the subject public key from the CSR:
RSA, EC, SM2,
ML-DSA-44, ML-DSA-65, or
ML-DSA-87. This is the key being certified, not the
CA's key. |
|
|
Numeric |
Size of the subject public key, in bits:
|
|
|
String | Curve of an EC or SM2 subject key. For example,
prime256v1, secp384r1, or
secp521r1. Present when the key names its curve,
and also when the key spells out explicit parameters that exactly match
a known named curve. Absent for other keys, including explicit
parameters that don't match a known curve. |
|
|
Bool | true if an EC or SM2 subject key identifies its curve
by object identifier (a named curve), as RFC 5480 requires.
false if the key spells out explicit curve
parameters. Absent for other key algorithms. |
|
|
String | Algorithm the CA uses to sign the certificate, set by the
SigningAlgorithm request parameter. For example,
sha256WithRSAEncryption,
ecdsa-with-SHA384, or ML-DSA-65.
This describes the CA's signature, not the subject key. |
The following keys describe the validity period.
| Condition key | Type | Description |
|---|---|---|
|
|
Date | Start of the validity period, in UTC. For example,
2026-03-02T18:56:38Z. |
|
|
Date | End of the validity period, in UTC. |
|
|
Numeric | Time from notBefore to notAfter, in whole
days, rounded down. |
|
|
Numeric | Time from notBefore to notAfter, in whole
hours, rounded down. |
The following keys describe the key usage, extended key usage, and basic constraints extensions.
| Condition key | Type | Description |
|---|---|---|
|
|
Bool | true if the certificate has a key usage
extension. |
|
|
ArrayOfString | Key usage values, using the RFC 5280 names:
digitalSignature, nonRepudiation,
keyEncipherment, dataEncipherment,
keyAgreement, keyCertSign,
cRLSign, encipherOnly, and
decipherOnly. |
|
|
Bool | true if the key usage extension is marked
critical. |
|
|
Bool | true if the certificate has an extended key usage
extension. |
|
|
ArrayOfString | Extended key usage purposes. Each purpose appears as its object
identifier (OID). Purposes defined in RFC 5280 also appear by name:
serverAuth, clientAuth,
codeSigning, emailProtection,
timeStamping, and OCSPSigning. For
example, a TLS server certificate has the values
serverAuth and
1.3.6.1.5.5.7.3.1. |
|
|
Numeric | Number of extended key usage purposes in the certificate. Each purpose counts once. |
|
|
Bool | true if the extended key usage extension is marked
critical. |
|
|
Bool | true if the certificate has a basic constraints
extension. |
|
|
Bool | true if the certificate is a CA certificate. Absent
when the certificate has no basic constraints extension. |
|
|
Numeric | Path length constraint of a CA certificate. Absent when the certificate doesn't set one. |
|
|
Bool | true if the basic constraints extension is marked
critical. |