A service must prove who it is: workload identity and Kubernetes Pod Certificates

Kubernetescybersecurityworkload identity

Learn how bearer JWTs, X.509 certificates, and proof of private-key possession differ—and how to decide whether a service needs Pod Certificates without rushing into a migration

One request, two different kinds of proof

A service receives a request for protected data. The network alone does not prove who sent it: the service sees only the credentials presented with the request. If a pass can be copied, the person checking it cannot distinguish an exact copy from the original.

Workload identity is a way for one program to prove to another which program is making a request. Systems with many services use it so they do not have to rely on shared passwords or trust the network itself. Kubernetes is a platform for running and managing containerized applications, and Pod Certificates give programs running on it a built-in path for requesting certificates as identity evidence. A certificate issuer and the rules of trust still have to be configured.

The subject matters now because the foundations of Pod Certificates and Cluster Trust Bundles reached general availability, or GA, in Kubernetes 1.37. This gives the foundation a stable release status. It does not provide a universal ready-made public key infrastructure, or PKI, and it is not an instruction to replace every JWT.

Why a token copy is enough for an attacker

Suppose billing-worker calls reports-api with a JWT for its service account—a Kubernetes identity used by the workload. A JWT is a cryptographically signed token with fields describing an identity, an expiration time, and an intended recipient. reports-api can validate the signature, issuer, expiration, and aud claim.

A bearer credential means the recipient treats whoever presents a valid token as the identity represented by that token. Its signature protects the contents against undetected changes, but it does not prove that the request came from the original holder. A copied token can be reused while it continues to pass the configured checks.

Kubernetes limits service account JWTs by time and binds them to a specific object and intended audience. The aud claim identifies the intended recipient, but this restriction helps only when the recipient actually validates the claim. These bindings reduce risk, but they are not proof of possession of a separate secret.

A short-lived JWT may be sufficient for many scenarios when the token is protected, permissions are minimal, the recipient validates it correctly, and refresh works reliably.

What proof of private-key possession changes

The other model begins with a key pair. The private key must remain secret, while the public key can be shared. The owner creates a digital signature with the private key, and another party verifies it with the public key.

An X.509 certificate binds that public key to an identity. A certificate authority, or CA, signs this statement. A service can accept the certificate as evidence when its chain leads to a known trust anchor and when its identity, intended use, and validity period match the service’s expectations.

The certificate itself is not secret. During authentication, the holder must also prove control of the matching private key. This is proof of possession. A copied certificate without its private key is not enough to provide that proof.

X.509 certificates are commonly used with TLS. In a typical server-authenticated TLS connection, the server presents a certificate and proves control of the matching key, while the client validates that evidence. The protocol also protects the communication channel. With mTLS, both sides do the same. Authorization remains a separate step: proving an identity does not grant access to every resource.

Where Pod Certificates fit

A Pod is a unit in which Kubernetes runs one or more application containers. Pod Certificates establish a standard built-in path for obtaining a certificate for that workload.

The Pod specification declares the required certificate and signer. After the Pod is scheduled to a node, the node agent, kubelet, generates a private key and creates a PodCertificateRequest for the named signer controller. The signer decides whether to issue the certificate. After issuance, kubelet writes the private key and certificate chain into the container filesystem.

The boundary in which the private key must be protected includes the application process, the node, kubelet, and the mounted Pod files. The team must determine who can read those files and how the application handles the key. Trust in the asserted identity separately depends on the signer and the trusted certificates.

Cluster Trust Bundles distribute trust anchors—the certificates from which applications begin validating a chain of trust. These are usually root CA certificates. Kubelet updates key, certificate, and trust files, but the application must detect changes and reload the updated material.

Automatic rotation is built into the foundation, but the application must handle those updates correctly. GA also does not install a universal signer for every use case or guarantee that reports-api supports the required TLS or mTLS mode.

Three conclusions to avoid

  • A certificate does not eliminate credential theft. If an attacker obtains the private key and the matching certificate, the attacker can prove possession of the key. Key protection, short lifetimes, rotation, and incident response still matter.
  • Being a bearer credential does not make every JWT unacceptable. A short-lived token with minimal permissions and an aud claim that the recipient actually validates can fit the threat model.
  • GA does not mean a complete PKI is already running. You still need a compatible recipient, a signer, issuance rules, protected keys, trusted certificates, tested rotation, and a failure-response plan.

Safely examining the scenario with an AI agent

Before delegating analysis, explain the distinction in your own words: a copied valid bearer token can be reused, whereas a certificate without its matching private key is not enough to provide proof of possession. A confident agent response is not a substitute for verification.

  1. Map a synthetic scenario. Provide only a fictional Pod description, the JWT lifetime and audience, the location where the key would be created, and known information about the signer and trusted certificates.

    • Permitted: label token, key, certificate, signer, and trusted roots on a flow diagram.
    • Prohibited: sharing real tokens, keys, kubeconfig files, or logs; connecting to a cluster; or running commands.
    • Stop if: the input contains a secret or it is unclear where the key is created and who can access it.
    • Artifact and verification: a credential-flow diagram. Independently map every label back to the scenario and the official Kubernetes material.
  2. Draft a decision record. Provide a non-secret threat model, the credential types supported by reports-api, and requirements for lifetimes, rotation, and key protection.

    • Permitted: compare a short-lived JWT, X.509, and the answer “insufficient information.”
    • Prohibited: inventing a signer, compatibility, or permissions, or planning production changes.
    • Stop if: recipient support, the key-protection boundary, or the source of trust is unknown.
    • Artifact and verification: a short record containing a choice, supporting facts, risks, and open questions. Check every argument against a source, and test future behavior only in a disposable environment.

A compact decision guide

CriterionJWT may be sufficientConsider X.509Stop when
Copying riskA narrow audience and short validity window are acceptableA certificate copy without the key must not be enoughThe threat model is undefined
CompatibilityThe service already validates JWTs and the aud claimThe service supports the required TLS/mTLS modeSupport is unknown
Secret protectionThe token is protected and refreshed quicklyThe key stays inside a defined protected boundaryKey access is unknown
LifecycleIssuance and refresh already workA signer, trusted certificates, and a rotation test existNo one owns these components

In the fictional learning scenario, reports-api validates a JWT that expires after ten minutes and has an aud claim restricted to that API. The team is considering X.509 but has not verified mTLS support, the private-key access boundary, or the availability of a signer. The correct conclusion for now is there is not enough information to migrate. Those questions should be resolved first, and the proposed solution should then be tested in a disposable cluster.

Sources