← Week 2: ACM Private CA — architecture + API

Day 10: Certificate Templates — What ACM PCA Can Issue

Phase 5 · September 4, 2026

← Week 2: ACM Private CA — architecture + API

Agenda (2–3 hours)

  • Read (45 min): ACM PCA docs — "Understanding certificate templates"; template ARN list
  • Study (60 min): Template extensions; custom templates; what templates can and cannot control
  • Write (45 min): Choose templates for your provisioning service use cases
← Week 2: ACM Private CA — architecture + API

What Is a Certificate Template?

When you call IssueCertificate, you must provide a template ARN.
The template controls which X.509 extensions are set in the issued certificate:

  • Basic Constraints (CA flag, path length)
  • Key Usage (digitalSignature, keyEncipherment, etc.)
  • Extended Key Usage (serverAuth, clientAuth, codeSigning, etc.)
  • Subject Alternative Name (allowed in custom templates)
  • CRL/OCSP distribution points (added by ACM PCA based on CA config)

Templates ensure certificates are issued with the correct extension profile
even if the caller provides a bad CSR.

← Week 2: ACM Private CA — architecture + API

Built-in Template ARNs

Template ARN suffix Purpose
End entity (server+client) EndEntityCertificate/V1 General mTLS leaf cert
End entity (server only) EndEntityServerAuthCertificate/V1 TLS server cert
End entity (client only) EndEntityClientAuthCertificate/V1 TLS client cert
Code signing CodeSigningCertificate/V1 Software signing
OCSP response signing OcspSigningCertificate/V1 OCSP responder
Root CA RootCACertificate/V1 Self-signed root CA cert
Subordinate CA SubordinateCACertificate_PathLen0/V1 Leaf-issuing sub CA
Subordinate CA (pathLen 1) SubordinateCACertificate_PathLen1/V1 One more sub CA level

Full ARN format: arn:aws:acm-pca:::template/<TemplateId>

← Week 2: ACM Private CA — architecture + API

Template: EndEntityCertificate/V1

Extensions in an EndEntityCertificate/V1 cert:

Basic Constraints: CA:false
Key Usage: digitalSignature, keyEncipherment
Extended Key Usage: serverAuth, clientAuth
Subject Alternative Name: from CSR (DNS, IP, email, URI)
CRL Distribution Points: from CA CRL config (if enabled)
Authority Info Access: OCSP URL (if OCSP enabled)

This is the template for a general mTLS leaf cert.
Your provisioning service would use this to issue device and service certs.

← Week 2: ACM Private CA — architecture + API

Custom Templates (API Passthrough)

For specialized certificates (like SPIFFE SVIDs), use a custom template:

Template ARN: arn:aws:acm-pca:::template/EndEntityCertificate/V1
+ APIPassthrough

The APIPassthrough variant allows the IssueCertificate call to include
custom extensions in the ApiPassthrough field:

use aws_sdk_acmpca::types::{ApiPassthrough, Extensions, GeneralName};

let api_passthrough = ApiPassthrough::builder()
    .extensions(
        Extensions::builder()
            .subject_alternative_names(
                GeneralName::builder()
                    .uniform_resource_identifier(
                        "spiffe://leo.amazon.com/ns/prod/svc/provisioning"
                    )
                    .build()
            )
            .build()
    )
    .build();

acmpca_client
    .issue_certificate()
    .api_passthrough(api_passthrough)
    // ...
← Week 2: ACM Private CA — architecture + API

SPIFFE SVID via ACM PCA

An X.509-SVID requires:

  • URI SAN = spiffe://trust-domain/path
  • CA:false
  • digitalSignature key usage
  • serverAuth + clientAuth extended key usage

Use EndEntityCertificate/V1 with APIPassthrough to include the URI SAN.

Template: arn:aws:acm-pca:::template/EndEntityCertificate/V1

CSR: contains the subject (can be empty for SVIDs)
ApiPassthrough.Extensions.SubjectAlternativeNames:
  - UniformResourceIdentifier: spiffe://leo.amazon.com/ns/prod/svc/leo-agent

Limitation: ACM PCA validates that URI SANs are valid URIs but does NOT
enforce that they are spiffe:// URIs. Your application must validate this.

← Week 2: ACM Private CA — architecture + API

Template for Device Certificates

Satellite terminal devices need certs with:

  • Subject: device serial number
  • DNS SAN or URI SAN for device identity
  • ClientAuth EKU (devices connect to a server)
  • Short validity (90 days for rotation)

Template choice: EndEntityClientAuthCertificate/V1

acmpca_client
    .issue_certificate()
    .certificate_authority_arn(device_issuance_ca_arn)
    .csr(device_csr_bytes)
    .signing_algorithm(SigningAlgorithm::Sha256Withecdsa)
    .template_arn(
        "arn:aws:acm-pca:::template/EndEntityClientAuthCertificate/V1"
    )
    .validity(
        Validity::builder()
            .r#type(ValidityPeriodType::Days)
            .value(90)
            .build()?
    )
    .send()
    .await?;
← Week 2: ACM Private CA — architecture + API

What Templates Cannot Control

Templates control extensions but NOT:

Property Controlled by
Subject DN CSR (caller-provided)
Public key CSR (caller-provided)
Validity period IssueCertificate Validity parameter
Subject Alternative Names (DNS/IP) CSR or APIPassthrough
CA-specific CRL/OCSP URLs CA configuration

The CSR is trusted — ACM PCA does not validate that the subject matches
a registered identity. Your provisioning service is responsible for CSR validation
before calling IssueCertificate.

This is a critical security point: if a rogue caller submits a CSR with
CN=leo-admin, ACM PCA will issue a cert with that subject.

← Week 2: ACM Private CA — architecture + API

Challenge Assignment

For each certificate type your provisioning service issues, specify the template:

Cert type Template ARN Key usage EKU SAN type Validity
Device cert EndEntityClientAuth/V1 digitalSignature clientAuth DNS or URI 90 days
Service mTLS EndEntityCertificate/V1 digitalSignature, keyEnc serverAuth, clientAuth DNS 1 year
SVID-like EndEntityCertificate/V1 + Passthrough digitalSignature serverAuth, clientAuth URI (spiffe://) 1 hour
OCSP responder OcspSigningCertificate/V1 digitalSignature ocspSigning 1 year

Add this table to acm-pca-design.md §2 (Certificate Templates).

← Week 2: ACM Private CA — architecture + API

Resources

  • ACM PCA template reference: docs.aws.amazon.com/privateca/latest/userguide/UsingTemplates.html
  • APIPassthrough templates: docs.aws.amazon.com/privateca/latest/userguide/UsingTemplates.html#template-api-passthrough
  • aws-sdk-acmpca Extensions types: docs.rs/aws-sdk-acmpca → types::Extensions
  • X.509 EKU OIDs: RFC 5280 §4.2.1.12