Short-Lived Agent Certificates Need an Availability Contract
11 min read
A certificate can expire exactly as intended while the platform fails operationally. The issuer created a replacement, the filesystem received it, and the application continued presenting the previous identity. Short lifetime bounded the old credential's validity; it did not complete the handover.
For an AI platform, certificate management is therefore part of workload scheduling and availability engineering. Agent workers may wait on tools, hold connections across multiple steps, or resume after an interruption. Their identity lifecycle must account for those execution patterns. Successful issuance is an intermediate state. The useful outcome is a verified connection using an acceptable identity before the previous one becomes unusable.
IBM's Agentic security: Managing risk in autonomous workflows white paper places certificate lifecycle management alongside controls for non-human identities. This article develops one operational consequence of that direction: a short-lived certificate requires an explicit adoption and failure contract. The design below is an independent platform pattern, not a claim of a newly released Vault–Guardium integration. IBM white paper.
Separate transport identity from delegated authority
In this reference architecture, an agent worker uses mutual TLS to connect to a tool service. The certificate establishes a workload identity at the transport boundary. A separate authorization layer decides whether that identity may perform the requested operation on the requested resource. A valid certificate does not encode every permission implied by an agent's current task.
That separation matters for autonomous execution. A task may lose approval while the worker's certificate remains valid. Conversely, a task may remain approved while its worker needs a replacement certificate. Coupling those lifecycles would force every permission change through certificate issuance or leave authority changes waiting for expiry.
The platform therefore maintains an identity mapping and evaluates current task authority at the tool boundary. Certificate subjects and alternative names come from a controlled workload registry. Model-generated text does not choose an arbitrary identity or request a broader certificate role. The model can request a tool operation; the platform owns enrollment and credential acquisition.
Vault's PKI secrets engine supplies issuance roles and certificate APIs. This article uses ordinary PKI concepts and a Community-oriented reference configuration; it does not depend on Enterprise Agentic IAM, Enterprise-only PKI extensions, or an assumed HCP entitlement. The reproduction target is Vault 2.2.2, rather than an unspecified latest version. Vault 2.2.2 release.

Treat replacement as a sequence with observable boundaries
The proposed sequence has six stages: authenticate the workload, request a bounded certificate, validate the returned material, stage a complete bundle, activate a new client context, and prove adoption through a fresh connection. Each stage can fail independently. A single “rotation successful” metric would conceal where progress stopped.
Validation checks the certificate and private key match, the identity and intended usage are correct, the chain is trusted, and enough validity remains for activation. Bundle staging keeps the key and certificate together. Publishing two files independently creates a window in which a consumer might load a new certificate with an old key.
A practical implementation writes an immutable generation directory and atomically changes a pointer to that generation on the same filesystem. The loader resolves the generation once and reads both files from it. Following a mutable pointer separately for each file can still cross generations. File publication and application adoption remain different operations even when the filesystem switch is atomic.
The worker then constructs a new TLS context and tests it against the intended tool endpoint. Activation occurs only after validation succeeds. Existing connections need a separate drain or termination policy; replacing a file cannot retroactively change the certificate presented during an earlier handshake. The local experiment below examines context adoption, not every possible connection-pool implementation.
A bounded Vault configuration for a disposable lab
The following shell example targets Vault 2.2.2 with Python 3 and OpenSSL available. It creates a loopback-only development server, a disposable root and one narrowly named client role. Development mode uses an in-memory server and a lab root token; it is unsuitable as a production deployment. Vault server command.
This example was checked against the documented API but was not executed against Vault during this study. The certificate-consumer experiment in the next section was executed locally. Keeping that distinction visible prevents an API-reviewed example from being mistaken for an integration-tested deployment.
#!/bin/sh
set -eu
umask 077
lab=$(mktemp -d)
export VAULT_ADDR=http://127.0.0.1:18249
export VAULT_TOKEN=disposable-local-lab-only
vault server -dev -dev-listen-address=127.0.0.1:18249 \
-dev-root-token-id="$VAULT_TOKEN" >"$lab/server.log" 2>&1 &
server_pid=$!
cleanup() { kill "$server_pid" 2>/dev/null || true; rm -rf "$lab"; }
trap cleanup EXIT HUP INT TERM
attempt=0
until vault status >/dev/null 2>&1; do
attempt=$((attempt + 1))
[ "$attempt" -lt 30 ] || exit 1
sleep 1
done
vault secrets enable -path=agent-pki pki >/dev/null
vault secrets tune -max-lease-ttl=24h agent-pki >/dev/null
vault write agent-pki/root/generate/internal \
common_name=Disposable-Agent-Lab ttl=24h >/dev/null
vault write agent-pki/roles/worker \
allowed_domains=worker.agent.test allow_bare_domains=true \
allow_subdomains=false allow_glob_domains=false \
allow_ip_sans=false allow_localhost=false \
server_flag=false client_flag=true ttl=10m max_ttl=15m >/dev/null
vault write -format=json agent-pki/issue/worker \
common_name=worker.agent.test ttl=10m >"$lab/issued.json"
python3 - "$lab" <<'PY'
import json, pathlib, sys
folder = pathlib.Path(sys.argv[1])
data = json.loads((folder / "issued.json").read_text())["data"]
for filename, field in [("client.pem", "certificate"),
("client.key", "private_key"),
("ca.pem", "issuing_ca")]:
(folder / filename).write_text(data[field] + "\n")
PY
openssl verify -CAfile "$lab/ca.pem" -purpose sslclient "$lab/client.pem"
openssl x509 -in "$lab/client.pem" -noout -serial -dates
The role constrains the permitted DNS identity and requests client rather than server usage. Production enrollment additionally requires a workload authentication method and an ACL granting only the intended issuance path. Root issuance in this lab intentionally bypasses that enrollment design. Role configuration is not a substitute for caller authorization. PKI role and issuance API, Vault policies.
Production PKI also needs a deliberate trust hierarchy and key-protection strategy. The disposable online root keeps the example small; it is not a recommendation for a production root ceremony. Intermediate lifetime, trust distribution and issuer replacement belong in the operational design before short leaf lifetimes become a fleet-wide dependency. PKI operational considerations.
A local experiment: files changed, identity did not
The accompanying Python lab generated a disposable CA, a tool-server certificate and two client certificates. A local TLS server required a client certificate and reported the serial it observed. All connections used the loopback interface; no cloud resources or production credentials were involved.
The first client context loaded certificate serial 0B. After the files at the original paths were replaced with certificate 0C and its matching key, a fresh connection made through the original context still presented 0B. A newly constructed context presented 0C. File replacement had succeeded in both cases. Adoption occurred only in the new context.
The minimal loading operation is explicit:
import ssl
def build_client_context(ca_file, certificate_file, private_key_file):
context = ssl.create_default_context(cafile=ca_file)
context.load_cert_chain(certificate_file, private_key_file)
return context
Python documents certificate-chain loading as an operation on an SSLContext, which is then used to create TLS sockets. The tested implementation used Python 3.14.6 with OpenSSL 3.6.3. These observations describe that experiment; other runtimes and client libraries require their own adoption tests. Python SSL documentation.
Additional checks rejected a mismatched certificate/key pair and rejected the leaf at a simulated verification time after its expiry. Client-purpose verification succeeded while the certificate remained valid. The expiry check used OpenSSL's verification-time option; it did not wait for a live connection to expire or demonstrate automatic session termination. OpenSSL verify.
This distinction changes the platform's success metric. An issuance counter belongs to the certificate service. An adoption counter belongs to the worker or connection layer. A useful handover record associates the issued serial, activated generation, successful probe and time remaining. Without that relationship, a healthy issuer can coexist with a fleet approaching authentication failure.
Calculate the failure budget before choosing a lifetime
A short lifetime creates a deadline for recovery. A proposed planning model is remaining validity > detection + issuance retries + distribution + activation + safety margin. The terms must reflect measured tail behaviour, clock uncertainty and the target service's validation policy. The inequality is an engineering budget, not a Vault guarantee.
For example, a worker that begins replacement with six minutes remaining cannot safely tolerate a five-minute issuer outage if distribution, activation and its safety margin require another two minutes. Increasing retry frequency does not create missing time. The platform must start earlier, reduce recovery latency, change the lifetime, or accept a defined interruption.
A fleet also needs jitter and retry bounds. Synchronized replacement can turn a normal restart into concentrated issuance demand. The proposed controller spreads requests within a safe interval and limits retries so an unhealthy issuer does not attract unlimited work. Long-lived recovery credentials should not become an undocumented escape hatch from the intended identity boundary.
AI orchestration adds admission control. Before starting a consequential tool sequence, the worker can require enough credential runway for the next bounded operation and recovery path. A lengthy reasoning phase need not reserve an equally lengthy certificate lifetime if execution can checkpoint and reacquire identity safely. Checkpoint data must exclude private keys and preserve task authorization separately.
The issuer chain has its own deadline
Leaf replacement can appear healthy while an intermediate approaches expiry. The proposed readiness check therefore examines the usable chain, not just the newest leaf's expiration. A certificate issued with ten minutes remaining is not a useful recovery artifact if the required intermediate stops validating in two minutes. Vault documents issuer controls for rejecting or truncating leaf validity beyond the issuer's expiry. Issuer lifetime behaviour.
Issuer rotation also changes the distribution problem. A worker may receive a correctly signed replacement while the target still lacks the intended trust chain. The platform needs a staged transition: distribute the required trust, verify acceptance, switch issuance, observe adoption, and retire the old trust only after the agreed overlap. These stages are a proposed rollout sequence rather than an assumption about automatic target updates.
Rollback needs equally careful language. Returning to an older bundle may recover an availability failure caused by a malformed replacement, provided the old identity remains valid and acceptable. It is inappropriate after that identity has been revoked or its key is suspected of compromise. The controller should distinguish a technical activation failure from a security-driven invalidation before selecting a recovery path.
A restart must also prove which generation it loaded. Recording only the most recently issued serial can hide workers that recovered from an older volume snapshot. An observed handshake serial, tied to a worker instance and activation generation, makes that discrepancy visible. The same evidence supports incident investigation without sending certificate private keys to the monitoring system.
Expiry and revocation need target-specific behaviour
Issuing a replacement certificate does not extend the validity encoded in the previous certificate. Nor does replacement automatically make the previous certificate unusable before expiry. The platform must decide whether overlapping identities are acceptable and how compromise changes that decision.
Vault's PKI guidance describes short-lived certificates and revocation mechanisms, including CRLs and OCSP. Their usefulness depends on distribution and client behaviour. Certificate issuance alone does not configure every relying party to check status, refresh cached material or reject connections when status services are unavailable. PKI revocation considerations.
The availability contract should state the status-check policy, cache bounds, failure handling and connection lifetime for each tool integration. An aggressive failure policy may interrupt work during a status-service outage. A permissive policy may retain access longer than the incident response assumes. These are risk decisions requiring explicit ownership, not incidental library defaults.
The local study did not exercise CRL or OCSP propagation, issuer failover, existing-session invalidation or a production pool. Those remain acceptance tests for the actual deployment. Reporting that boundary is essential: a passing fresh-handshake test is strong evidence about adoption and limited evidence about incident containment.
Make the contract visible in the developer platform
A useful internal developer platform exposes certificate readiness as part of workload health. Its record includes the active serial, expiry runway, last successful replacement, last verified connection and reason for degraded state. Application teams need actionable states such as issuance unavailable or adoption unconfirmed, rather than a generic authentication error after expiry.
The platform team owns issuer availability, enrollment controls and the replacement mechanism. Tool owners define acceptable identity, authorization and session behaviour. Agent-runtime owners define checkpointing, retries and admission boundaries. An integration is ready when those responsibilities meet in a tested handover, including failure cases.
Short-lived certificates can reduce the duration of a usable credential. Their operational value depends on a larger contract: the correct workload acquires the correct identity, adopts it before the deadline, and stops or degrades predictably when that process fails. For an AI platform, that contract belongs beside workload scheduling and tool authorization—not hidden inside a certificate issuance job.