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)