How to Use and Automate PKI in DevOps

As public TLS certificate validity periods shrink toward 47 days and static secrets remain exploitable years after leaking, manual certificate management cannot keep pace with modern CI/CD pipelines and Kubernetes workloads. This guide explains what DevOps PKI is, where certificate issuance fits across tools like cert-manager, HashiCorp Vault, Istio, and SPIFFE, and how to automate certificate lifecycle management with short-lived credentials, key rotation, and mutual TLS (mTLS) while avoiding common deployment pitfalls.

Every static API key or long-lived certificate in a pipeline is a credential that outlives the job that needed it.
Key Takeaways
  • DevOps PKI is certificate issuance, renewal, and revocation automated inside your build and runtime tooling.
  • Certificates come from a certificate authority (CA) through an enrollment protocol or a Kubernetes controller, are renewed well before expiry and have their keys rotated.
  • Short-lived workload certificates let services authenticate each other without shared secrets.

Pipelines and clusters run on credentials, and static secrets stay valid long after they leak. GitGuardian found that 64% of valid secrets leaked from 2022 were still exploitable four years later.

At the same time, public Transport Layer Security (TLS) certificate lifetimes keep shrinking. CA/Browser Forum Ballot SC-081v3 implemented the following deadlines for lifetime cuts:

  • March 15, 2026: The maximum validity dropped from 398 to 200 days.
  • March 15, 2027: The maximum validity drops to 100 days.
  • March 15, 2029: The maximum validity drops to 47 days.

Manual renewal cannot keep pace. DevOps public key infrastructure (PKI) closes that gap, and it’s how teams keep credential lifetimes shorter than the exposure window.

In this article, you'll learn what DevOps PKI is, why short-lived certificates matter, where PKI fits in the toolchain, how to automate it, and the failure patterns to avoid.

What Is DevOps PKI?

DevOps PKI is public key infrastructure managed through code and automation. Instead of relying on IT teams, certificates get issued, renewed, and revoked by the same automation that builds and deploys your software.

Applications, services, and workloads get the certificates they need for authentication without waiting for manual approval. This automation also handles certificate renewals, key rotation, and revocation throughout the software lifecycle.

The traditional PKI model doesn't scale. A developer requests a certificate, waits for an admin to issue it, and receives one that could be valid for a year or longer. That works fine for a handful of servers — but it falls apart when pipelines and workloads need certificates across hundreds or thousands of deployments. Ticket queues simply can't cover that surface at machine speed.

The underlying standard is X.509 (RFC 5280), which defines the certificate and revocation-list formats used across internet PKI. Its stated goal is deterministic, automated identification, authentication, access control, and authorization. The old ticket-based model works against that goal.

NIST SP 1800-16 recommends centralized certificate management that covers certificate authorities, discovery, inventory, monitoring, reporting, enrollment, installation, renewal and revocation. DevOps PKI applies this through automation and allows teams to more consistently manage certificate lifecycles across their environment.

See your security gap before attackers do.

See continuous trust in action on a platform that includes RADIUS, PKI and AI security.

Customize Your Video Demo

Why PKI for DevOps Means Short-Lived Certificates

Long-lived credentials sit in files, config maps, and continuous integration (CI) variables for months. Every copy is another chance to leak. Short lifetimes shrink that window.

The industry has converged on this approach.

  • HashiCorp Vault documentation states that keeping certificate time-to-live (TTL) values relatively short makes revocations less likely to be needed, which allows ephemeral certificates.
  • SPIFFE (Secure Production Identity Framework for Everyone) takes the same approach: all SPIFFE Verifiable Identity Document (SVID) private keys and certificates are short-lived and rotated frequently and automatically, which limits the exposure from a compromised credential.
  • Public TLS is moving in the same direction under Ballot SC-081v3, passed in April 2025.

Short TTLs do not remove certificate revocation. A certificate can still become invalid before its validity period ends because of a name change, a change in the subject-to-CA association, or compromise (or suspected compromise) of the private key.

Keep a certificate revocation list (CRL) or Online Certificate Status Protocol (OCSP) path in place for exactly those cases.

Where PKI Fits in the DevOps Toolchain

PKI shows up at several points in a DevOps toolchain, and each tool controls certificate lifetime differently. The table below shows what each one issues or uses, and how it manages lifetime:

Tool

What It Issues or Uses

How Lifetime Is Controlled

cert-manager

TLS certificates for Kubernetes or OpenShift workloads from Let’s Encrypt, Vault, or private PKI

Default 90-day duration; renews at two-thirds of lifetime

Kubernetes Certificates API

A CertificateSigningRequest asks a named signer to sign a certificate

spec.expirationSeconds requests a lifetime; minimum 600 seconds

HashiCorp Vault PKI secrets engine

Dynamic X.509 certificates without manual key and certificate signing request (CSR) generation

Short TTLs make revocations less likely, allowing ephemeral certificates

Istio

istiod CA signs workload certificates after the agent creates a key and CSR

Agent monitors expiration and rotates certificates and keys periodically

GitHub Actions OpenID Connect (OIDC)

Short-lived cloud tokens for a single job, not certificates

Expires automatically after the job

Sigstore

Fulcio issues short-lived signing certificates bound to an OIDC identity

Certificates are short-lived; signing events are logged in Rekor

Note: For enrollment with an external CA, the Automatic Certificate Management Environment (ACME) is a standard protocol a CA and an applicant use to automate verification and issuance.

How to Automate DevOps PKI Certificate Management

Start with a central service, because scattered certificates are the root problem:

  1. Inventory every certificate, CA, and owner in one central service. A PKI-as-a-service platform gives you that single source of truth.
  2. Choose an issuing CA and enroll through ACME.
  3. Declare certificates as code. A cert-manager Certificate resource is a human-readable definition of a certificate request; cert-manager generates the private key, obtains a signed certificate from an Issuer or ClusterIssuer, and stores both in the Secret named in secretName.
  4. Set lifetimes and renewal windows. The default spec.duration is 90 days, and renewal fires at two-thirds of lifetime unless renewBefore or renewBeforePercentage is set.
  5. Rotate private keys at renewal. cert-manager v1.18 changed the default rotationPolicy from Never to Always, so a new key is generated each time unless you set rotationPolicy: Never.
  6. Replace stored pipeline secrets with short-lived OIDC tokens where the cloud supports it. GitHub Actions OIDC exchanges tokens valid for a single job instead of long-lived secrets.
  7. Keep a revocation path for key compromise.

Revocation is the part of PKI that looks simplest on paper and gets riskiest in practice. This short video walks through why revoking on a single alert can backfire — and what context-aware revocation looks like:

Using Mutual TLS for Service-to-Service Trust

In mutual TLS (mTLS), both sides of a connection present certificates and verify each other. This differs from standard TLS, where only the server proves its identity. A service certificate can carry both server and client authentication roles (the id-kp–serverAuth and id-kp–clientAuth extended key usages defined in RFC 5280).

The SPIFFE Workload API gives a workload its SPIFFE ID, private key, short-lived certificate, and trust bundle without requiring a prior authentication secret.

Istio automatically upgrades traffic between its proxies to mTLS, but a mesh-wide peer authentication policy with an unset mode defaults to PERMISSIVE, which accepts both mutual TLS and plaintext traffic. Set the mode to STRICT deliberately, or workloads keep accepting plaintext traffic.

The security plan that scales with you.

Our solutions can scale from mid-market to global enterprises. Compare options and see how our solutions protect you from costly breaches and ensure peace of mind.

Check Our Prices

Common DevOps PKI Automation Failures

Five failure patterns come up repeatedly in DevOps PKI:

  • Expired certificates nobody owned: No inventory means no one sees the expiry date coming. A central certificate service covering discovery, inventory, reporting, monitoring, and renewal prevents this.
  • Renewal that reuses the old key: cert-manager v1.18 now generates a new key by default unless rotationPolicy: Never is set explicitly.
  • Mesh left in permissive mode: An Istio mesh-wide peer authentication policy with an unset mode defaults to PERMISSIVE, accepting both mutual TLS and plaintext traffic.
  • Requested lifetime rejected: In Kubernetes v1.22 and later, spec.expirationSeconds on a CertificateSigningRequest must be at least 600 seconds.
  • Static secrets left in pipelines: Leaked static secrets that haven’t been revoked still remain exploitable years later.

Automate Certificate Lifecycle Management With JoinNow Dynamic PKI

Certificates cause trouble when they are scattered, managed manually, and long-lived. Centralizing certificate issuance, shortening lifetimes, automating renewal and rotation, and keeping a revocation path in place all keep credentials from outliving the jobs that need them.

JoinNow Dynamic PKI automates certificate issuance, renewal, and revocation across your environment. It can issue, renew, or revoke certificates in real time based on identity, mobile device management (MDM), and security signals.

Dynamic PKI supports these enrollment protocols:

  • Enrollment over Secure Transport (EST)
  • ACME, including ACME Device Attestation (ACME DA)
  • Simple Certificate Enrollment Protocol (SCEP), including Dynamic SCEP

The managed PKI behind it is backed by a hardware security module (HSM).

Schedule a demo to see how JoinNow Dynamic PKI fits your environment.


Frequently Asked Questions

How does PKI work with Kubernetes?

cert-manager requests certificates from an Issuer or ClusterIssuer and stores the signed certificate and private key in the Secret named in secretName. The Kubernetes Certificates API takes a different route: a CertificateSigningRequest resource asks a named signer to sign a certificate, and that request can be approved or denied before signing.

Is PKI the same as secrets management?

No. Secrets managers store credentials, while a PKI issues certificates bound to private keys. HashiCorp Vault’s PKI secrets engine bridges the two by generating dynamic X.509 certificates, so services get certificates without the manual process of generating a private key and CSR.

How often should DevOps certificates be rotated?

There is no single rule. cert-manager defaults to 90-day certificates and renews at two-thirds of lifetime unless renewBefore or renewBeforePercentage is set. Public TLS maximums are shrinking under CA/Browser Forum Ballot SC-081v3: 200 days from March 15, 2026, down to 47 days from March 15, 2029.

Can certificates replace API keys in CI/CD pipelines?

For service identity, often yes. The SPIFFE Workload API gives a workload its SPIFFE ID, private key, short-lived certificate, and trust bundle without a prior authentication secret. GitHub Actions OIDC goes further, exchanging short-lived tokens valid for a single job instead of stored cloud credentials.