Projected token
A bounded, expiring service-account JWT in a projected volume.
Chapter 13 of 16 · Application/workload user · orders-api
Authenticate a pod with a projected service-account token bound to namespace, service account, audience, and lifetime.
kubectl for optional client dry-run and a platform-supplied Kubernetes auth design; no cluster apply.
An EKS pod identity is bounded by service account, namespace, audience, and token lifetime.
| Owner | Consumer-facing responsibility |
|---|---|
| You own | States the consumer contract and proves reload and degraded behavior. |
| Platform team owns | Owns runtime identity, integration components, rollout, and operational health. |
| Vault owns | Owns server-side trust, policy, engines, audit, and Vault service health. |
A bounded, expiring service-account JWT in a projected volume.
The intended verifier accepted by token request and Vault.
A Kubernetes API check validating a service-account token.
Vault constraints on service-account names and namespaces.
kubectl -n lockbox create token orders-api --audience=vault --duration=10m --output=jsonpath='{.status.expirationTimestamp}'
kubectl -n lockbox get serviceaccount orders-api -o jsonpath='{.metadata.name}{"\n"}'
vault read -format=json auth/kubernetes/role/orders-api | jq '{service_accounts:.data.bound_service_account_names,namespaces:.data.bound_service_account_namespaces}'| Symptom | Pod login gets invalid audience or service account not authorized. |
|---|---|
| Likely causes | Audience, mount, namespace, service account, reviewer, issuer, or cluster trust mismatch. |
| Inspect safely | Inspect projection, service account, namespace, role metadata, events, and time. |
| Do not print | Projected JWT, TokenReview body, Vault token, pod environment, or secret volume. |
Break it: Change the projected audience or service account.
Fix it: Restore the platform-approved audience, namespace, service account, auth mount, and role bounds.
Escalate with time, endpoint, auth path, role, mount, namespace when relevant, status code, request ID, and sanitized error class. Never attach a credential or response body.
Platform-supplied external configuration is represented by reserved example inputs; this lab applies nothing.
$0; offline validation with no external resource changes
Use the tracked example and offline validator; real GitLab, AWS, and Kubernetes configuration remains platform-owned.
Statically validate the example objects without contacting a cluster.
cd learn-vault/labs/kubernetes-auth
python3 validate_manifests.py
Optional approved context: kubectl apply --dry-run=client -f service-account.yaml -f pod-projection.yaml creates nothing, but kubectl may still contact the current API server for discovery or schema validation.
Complete every item in the Verify section using metadata-only evidence; no secret value appears in terminal output or tracked files.
Use the Failure drill and Break it / fix it evidence fields. Stop before broadening policy, weakening identity or TLS checks, or copying secret-bearing diagnostics.
Client dry-run creates nothing. Delete only an explicitly created disposable namespace if you went beyond the course.
The EKS contract uses dedicated projected identity and exact namespace/service-account bounds; AWS permission remains separate.
No. AWS exchange and Vault validation are separate trust paths.
It narrows which verifier should accept the token.
The pod should receive only its explicit bounded projection.
Exact service account, namespace, policy, and TTL.
Kubernetes auth is strong when projected identity is bounded and the Vault role matches the exact workload.