Workload identity and privileged access
Workload identity identifies an executing service or process; privileged-access management controls elevated actions and sessions. Authentication establishes an identity, while authorization determines which resources and actions that identity can use.
Identities, credentials and permissions
A credential supplies evidence used in authentication. A permission defines an allowed operation over a resource. Possessing a valid credential therefore does not specify every action the authenticated identity can perform.
SPIFFE defines workload identities and associated identity documents and interfaces. Vault can issue dynamic credentials. These mechanisms connect executing software to authentication material, but the financial application still needs an authorization decision for the requested account, dataset or action.
A human administrator and an automated service also have different operating lifecycles. A service needs issuance, renewal and recovery that work without a person handling every credential. A privileged human session needs an accountable actor and controls appropriate to its approved purpose.
How a workload proves who it is
A SPIFFE ID is a string that uniquely identifies a workload. It takes the form spiffe://trust domain/workload identifier, for example spiffe://acme.com/billing/payments. The trust domain corresponds to the trust root of a system. All workloads in the same trust domain are issued identity documents that can be verified against its root keys. The SPIFFE documentation advises keeping environments with different security practices, such as staging and production, in distinct trust domains.
An SVID is the document with which a workload proves its identity. It contains a single SPIFFE ID and is valid if signed by an authority within that ID’s trust domain. It is either an X.509 certificate or a JWT. X.509-SVIDs are advised whenever possible because tokens are susceptible to replay. JWT may be the only option when an L7 proxy or load balancer sits between two workloads.
The Workload API does not require the calling workload to know its own identity or hold an authentication token. No authentication secret therefore needs to be deployed with the application. Private keys and certificates are short-lived and rotated frequently and automatically. Workloads can request new keys and trust bundles before the current keys expire.
Two platform mechanisms follow a parallel pattern. In Kubernetes v1.22 and later, a Pod assigned a ServiceAccount receives a short-lived token through the TokenRequest API, mounted as a projected volume, and the kubelet rotates it before expiry. The API server checks signature, expiry, audience and whether referenced objects, such as the Pod, still exist. Long-lived service account token Secrets do not expire or rotate and are not recommended.
AWS STS AssumeRole returns temporary credentials. They last from 900 seconds up to the role’s maximum session duration, which can be set from 1 to 12 hours, with a default of 3600 seconds. Role chaining limits the session to one hour.
Each mechanism gives a verifiable identity with a lifetime. None says what the workload may do to an account. STS session policies can narrow permissions to the intersection with the role’s identity-based policy, but that is a policy decision, separate from the credential’s lifetime.
Dynamic secrets and leases
The Vault database secrets engine generates database credentials dynamically from configured roles, so services no longer need hardcoded credentials. Each service accesses the database with unique credentials. The SQL username therefore traces activity to a specific service instance.
Vault creates a lease, with a duration and renewability, for every dynamic secret and service-type token. All dynamic secrets must have a lease. This forces consumers to check in routinely and makes audit logs more valuable. Once the lease expires, Vault can automatically revoke the data.
Renewal is advisory. The increment is counted from the current time and the backend can ignore it, so the returned lease must be inspected rather than assumed. Revoking a lease invalidates the secret immediately and prevents further renewals. Revoking a token revokes every lease created with it. Lease IDs are prefixed by the request path, so operators can revoke a tree of secrets, for example with vault lease revoke -prefix aws/. The KV store of arbitrary secrets issues no leases.
Static roles work differently. A static role maps one Vault role to one database username, and Vault stores the password and rotates it on a schedule. Anyone with the proper Vault policies can access that database account, so the username no longer points to a single service instance.
A lease limits how long an issued credential stays valid and provides a revocation handle. It does not limit what the database account may select, update or delete.
A balance reader and an administrator
Take a service credential that permits reading balances and an administrator role that permits changing configuration. Neither permission, by itself, authorizes transferring a customer’s money. The payment operation has a separate resource and action scope.
Rotating the balance reader’s credential changes the authentication material. It does not decide whether the service should gain payment permission. Revoking payment permission changes authorization; it need not mean that the identity ceases to exist for every other operation.
An access record therefore needs the identity, credential or session context, requested resource, requested action and decision. Logging only successful authentication leaves the financial permission question unanswered.
Keys and administrative authority
Cryptographic key management introduces another boundary. Authority to administer stored objects need not include authority to decrypt their contents. Likewise, permission to request a protected key operation does not automatically authorize a financial transaction involving the recovered data.
A complete access path identifies the issuer, policy authority, credential lifetime and application enforcement point. A secrets store can serve several workflows without making their permissions equivalent.
Worked example: a settlement service and an emergency database fix
All lifetimes and values below are illustrative and do not describe a specific product configuration.
| Step | Who acts | Credential and lifetime | What the record proves | What it does not prove |
|---|---|---|---|---|
| a. Settlement pod starts | Kubernetes, for the settlement Pod | Projected service-account token, short-lived, rotated, bound to the Pod | The Pod held a cluster-issued identity that can be verified | That the service may read trades |
| b. Pod authenticates to Vault | Settlement service; Vault issues | Dynamic database credential, 1-hour TTL (illustrative) | A unique SQL username was issued to that instance under a lease | That the SQL grants are least privilege |
| c. Pod reads unsettled trades | Settlement service | Same credential within its lease | The query arrived under a traceable SQL username | That the read was authorized for those rows |
| d. Production incident | On-call DBA, with approver | Privileged credential for the approved incident window (illustrative) | Approval was granted and the session was recorded | That every statement was necessary or correct |
| e. After the fix | Privileged-access process and reviewer | Privileged credential rotated; session record retained | The credential was replaced and the session reviewed | That no equivalent access persists by another path |
The settlement path proves issuance, lifetime and traceability, not authorization of the trade read. The DBA path adds an accountable actor, approval and a reviewable trail. Rotation after the fix changes authentication material. It does not confirm that the actions taken were correct.
Human privileged access versus workload identity
| Aspect | Workload identity | Human privileged access |
|---|---|---|
| Who is accountable | A service or process, named by a SPIFFE ID or service account | A named person; privileged accounts restricted to defined personnel or roles |
| How credentials are issued | Automated, through the Workload API, projected tokens, STS or Vault | Through an approval workflow with controlled credential handling |
| Typical lifetime | Short-lived, renewed or rotated automatically | Bounded by the approved purpose; revoked when no longer appropriate |
| Approval | No person handles each credential; issuance follows configured policy | Required before privileged use, including emergency access |
| Evidence kept | Token or SVID claims, lease records, SQL username | Approval record, recorded session, privileged-function log |
| Typical failure | Issuer outage, expired or revoked credential, clock skew, failed reload | Access not revoked, unapproved session, unlogged privileged actions |
NIST SP 800-53 AC-6 applies least privilege to users and to processes acting on their behalf, so workload identity does not remove the obligation. For people, AC-6(5) restricts privileged accounts to defined personnel or roles, and AC-6(9) requires logging the execution of privileged functions. AC-2(7) requires administering privileged accounts under a defined scheme, monitoring role assignments and changes, and revoking access when assignments are no longer appropriate.
Credential lifetime and recovery
Short-lived credentials constrain how long a particular issued credential remains usable under its validity rules. They also require a working renewal path when new credentials are needed. Cached authority, expiration and alternate access determine the effect of an issuer outage.
What changes across deployments is the trust domain, issuer, policy and recovery arrangement. The distinction between identity, evidence of identity and permission remains necessary in each deployment.
Failure tests worth running
- Issuer outage: check which operations continue on already issued credentials and what fails when renewal is impossible.
- Expired credential: check that an expired token, SVID, STS credential or Vault lease is rejected at the enforcement point.
- Revoked lease: check that revocation, including prefix revocation, invalidates the secret immediately and blocks renewal.
- Clock skew: check whether skewed clocks cause valid credentials to be rejected or expired ones to be accepted.
- Bootstrap recovery after total outage: check how issuers, trust bundles and policies are restored without relying on lost secrets.
- Service cannot reload rotated credentials: check whether the service keeps using stale material after rotation and whether a reload or restart restores access safely.
Questions about principal
Does being on a private network establish trust?
No. Network location alone does not establish the requested resource permission.
Does rotating a credential revoke every permission?
No. Credential lifecycle and authorization policy must be evaluated separately.
Does a short-lived credential limit what an attacker can do with it?
It limits how long the credential can be used, not what it can reach. Roles, policies and database grants still determine the scope.
Does a valid SVID say what a workload may do?
No. It proves the SPIFFE ID, signed within its trust domain. Authorization remains a separate decision.
Do all Vault secrets have leases?
No. Dynamic secrets and service-type tokens do. Secrets stored in the key-value engine issue no leases, so lease renewal and revocation do not apply to them.
Sources and method
- SPIFFE Overview SPIFFE project
- Secrets engines HashiCorp
- AWS Key Management Service Amazon Web Services
- Zero Trust Architecture, SP 800-207 NIST
- SPIFFE Concepts SPIFFE project
- Service Accounts Kubernetes project
- AssumeRole, AWS Security Token Service API Reference Amazon Web Services
- Lease, renew, and revoke HashiCorp
- Database secrets engine HashiCorp
- Security and Privacy Controls for Information Systems and Organizations, SP 800-53 Rev. 5 NIST
Read next
- Private connectivity, encryption and authorization protect different boundaries
A private connection is not encryption or permission. Trace the separate boundaries protected by network paths, cryptography and identity.
- AI assistants connect permissions as well as data
Connecting an AI assistant to financial tools also connects permissions. Trace the authority behind retrieval, recommendations and actions.
- Two clouds can share one failure dependency
Two cloud deployments can fail through one shared dependency. Examine the identity, network and recovery systems behind apparent redundancy.
