Rotating a workload certificate may change its key and serial while retaining its logical service identity. A trust-domain migration can change the identity itself, requiring policy updates at every accepting peer. A green handshake does not prove the caller has the right scope, and a policy that trusts every certificate from a CA may grant far more access than intended. Test issuance, bundle delivery, name validation, authorization, expiry, and removal of the retired identity as separate gates.
mTLS workload identities: test both authentication and authorization on rotation
Operational decision
A pricing worker moves from one internal trust domain to another. The platform distributes the new trust bundle to the inventory API before issuing the worker a new identity. The API temporarily accepts both exact workload identities for read-only price lookup, while only the currently approved identity can submit price changes. The team verifies a positive lookup and negative write using each identity, plus a certificate from the same CA belonging to an unrelated worker. A wrong-service certificate must fail policy even if its TLS chain is valid. After workloads report the new identity and no old sessions remain, the API removes the old principal and old trust root according to the migration plan. Simulate loss of the workload identity agent: new Pods should fail in a declared way rather than starting with a stale broad credential, while already running Pods follow their configured renewal and expiry behavior. Record identity issuance time, certificate lifetime, policy generation, and peer rejection results. If the mesh proxy hides certificate details from the application, collect the evidence from the proxy and an application-path request, not only from a controller status page.
Pricing identity migration
New bundle distributed before new leaf issued
Exact old and new identities scoped by operation
Unrelated same-CA identity denied
Positive read and negative write checked end to end
Identity agent outage behavior observed
Old principal and root removed after client migrationCost and verification
For W workloads and P accepting policies, migration review can approach O(W × P) unless identity usage is indexed. Dual-policy overlap expands the accepted principal set, so keep it short and auditable. Measure certificate age, agent renewal failures, authorization denials by identity, old-identity sessions, and time until retired trust is removed. More frequent rotation reduces credential lifetime but increases issuer and control-plane load.
Common Mistakes
- Do not treat a valid TLS chain as permission for every API method.
- Do not change trust domain before receiving peers accept the new bundle.
- Do not keep the retired workload principal in policy indefinitely.
Connected lessons
- DevOps: delivery, infrastructure, and reliable operations
- Mesh identity: require encrypted peers and narrow service access
- Federated workload identity: replace standing cloud keys with scoped trust
- Private CA rotation: overlap trust before changing issuers
- Service account tokens: mount only when the workload needs Kubernetes API access
