SEC09-BP01 Implement secure key and certificate management
Digital certificates and their private keys establish trust in network communications and prove the identity of services, devices, and users. Proper certificate management means that you provision, distribute, renew, and revoke certificates without exposing private key material or letting certificates lapse. Automate these tasks, as manual certificate handling can cause security incidents.
Desired outcome:
-
You have a certificate management system that provisions, deploys, stores, renews, and revokes certificates across a public key infrastructure (PKI).
-
Your certificate private keys are protected from disclosure and are never accessible to human identities.
-
Your certificates renew automatically before expiration, which helps prevent service disruption caused by expired certificates.
-
Your certificate management integrates with the services that need TLS certificates for secure communication and machine identity.
Common anti-patterns:
-
Teams perform manual steps during certificate deployment or renewal.
-
Teams build a private certificate authority without planning the certificate authority (CA) hierarchy.
-
Public resources use self-signed certificates.
-
Teams store certificate private keys in insecure locations or share them through insecure channels.
-
Certificate expiration dates go unmonitored, which leads to unexpected downtime.
Benefits of establishing this best practice:
-
Automated deployment and renewal reduce operational effort and remove the manual steps where most certificate failures start.
-
Encryption of data in transit becomes the default, because valid certificates are readily available.
-
Certificate actions taken by the CA are auditable, which increases security and traceability.
-
Separating CA responsibilities across hierarchy layers isolates duties and limits the impact of unauthorized access.
Level of risk exposed if this best practice is not established: High
Implementation guidance
Certificates follow a lifecycle where a certificate authority (CA) issues them, systems deploy them, and they expire on a fixed date unless something renews them. An unrenewed certificate can take a service offline until someone notices and reissues it. A private key copied to a shared location or handled by a person might let an unauthorized party impersonate the service. Automated provisioning and renewal remove the manual steps where these kinds of failures originate.
The trust model determines which kind of certificate to issue. Public-facing endpoints need publicly trusted certificates, because browsers and operating systems already trust the issuing CA. Internal services can use certificates from a private CA that you operate, which gives you control over the trust chain, certificate contents, and validity periods. Publicly trusted certificates are simpler to run but bound by public CA rules. A private CA gives you flexibility for short-lived certificates or non-TLS uses, at the cost of operating the CA yourself.
AWS provides two general-purpose PKI services.
AWS Certificate Manager provisions, deploys, and renews
certificates. It
integrates
with many AWS services so certificates reach load balancers and
endpoints without manual handling. ACM issues publicly trusted
certificates from
Amazon Trust Services
A private CA is a hierarchy. A root CA sits at the top, signs some intermediate CA certificates, then stays out of day-to-day issuance. Intermediate CAs sign the end-entity certificates that your services and devices present. This structure limits exposure, because if an intermediate CA is affected, you can revoke it without replacing the root and everything beneath it. We recommend deploying each level into a separate account so the impact of unauthorized access stays small and CA activity is easier to isolate in audit logs. Plan the hierarchy before you issue any certificates, as restructuring a live CA is disruptive.
Certificate and key algorithms change over time. Use certificates that a service issues and renews for you, and remove self-signed certificates and any certificate that never expires, because both must be replaced manually when an algorithm or validity rule changes. With ACM, AWS Private CA, AWS KMS, and AWS Secrets Manager, you can change algorithms and rotate key material without redesigning the workload. This crypto agility looks more like making configuration changes than performing costly migrations or deprecations.
Implementation steps
-
Select the certificate services for your use case: Use AWS Certificate Manager for publicly trusted certificates on web servers, load balancers, and other public endpoints. Choose AWS Private CA when you need your own CA hierarchy or exportable certificates, then issue end-entity certificates through ACM. For embedded devices provisioned at scale, use AWS IoT Core. For mutual TLS at the edge of your services, use native support in Amazon API Gateway or Application Load Balancer.
-
Design your CA hierarchy and account layout: Place the root CA in a dedicated account used only to issue intermediate CA certificates. Create intermediate CAs in separate accounts to issue certificates to your services, users, and devices. For resiliency, cross-Region replication, and cross-account sharing decisions, follow Planning your AWS Private CA deployment.
-
Automate certificate renewal: ACM provides managed renewal for the certificates it issues and for the integrated services that use them, so certificates rotate before expiration without manual action. Not all certificates qualify for managed renewal, including imported certificates, so you may need custom automation so those rotate on the same schedule.
-
Establish logging and audit trails: Confirm the accounts that hold your certificate authorities are covered by a CloudTrail trail with log file integrity validation, and set retention to match your organization's compliance policies. Generate and review audit reports that list issued and revoked certificates on a regular cadence.
-
Configure certificate revocation: Provision storage for the certificate revocation list (CRL) so clients can check whether a certificate is still valid. See Planning a certificate revocation list (CRL) to configure the CRL based on your requirements.
Resources
Related best practices:
Related documents:
Related videos:
Related tools:
Related workshops: