Teleport Workload Identity issues short-lived cryptographic identities to workloads — services, Kubernetes pods, and other processes — in a format compatible with the SPIFFE (Secure Production Identity Framework For Everyone) standard. These identities, called SVIDs (SPIFFE Verifiable Identity Documents), allow workloads to authenticate to each other and to external APIs without relying on static credentials. Unlike the Zero Trust Access feature of Machine Identity, which routes traffic through the Teleport Proxy, Workload Identity identities are used directly between workloads. Teleport acts as the certificate authority and policy engine, but the communication itself is workload-to-workload.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/gravitational/teleport/llms.txt
Use this file to discover all available pages before exploring further.
How it works
Teleport Workload Identity establishes a root certificate authority within your Teleport cluster. This CA issues short-lived X.509 certificates and JWT tokens that carry a SPIFFE ID — a URI that uniquely identifies the workload within your trust domain. A SPIFFE ID looks like:tbot agent runs in proximity to your workloads. It authenticates to the Teleport cluster using a supported join method and then either:
- Writes SVID files (certificate, private key, and trust bundle) to a directory or Kubernetes Secret for the workload to read, or
- Exposes a SPIFFE Workload API — a standardized gRPC socket that workloads connect to in order to receive SVIDs and trust bundles automatically. This is the approach used by SPIFFE SDKs and service meshes like Envoy and Istio.
tbot can perform Workload Attestation — verifying properties of the process requesting an SVID (such as its Unix UID/GID or Kubernetes pod labels) before issuing credentials. This eliminates the need for a bootstrapping secret within the workload itself.
SPIFFE concepts
SPIFFE IDs and trust domains
Every workload identity is encoded as a SPIFFE ID — a URI of the form:example.teleport.sh). The workload path is a hierarchical string you define to identify the workload.
Common structuring strategies:
- Logical — based on service name and team:
spiffe://example.teleport.sh/svc/payments/processor - Physical — based on location:
spiffe://example.teleport.sh/eu/uk/london/vm-a3847f - Hybrid — using namespace prefixes:
spiffe://example.teleport.sh/svc/paymentsandspiffe://example.teleport.sh/phy/london/vm-a3847f
SVIDs: X.509 and JWT
SPIFFE defines two SVID formats:- X.509-SVID — An X.509 certificate with the SPIFFE ID in the URI Subject Alternative Name (URI SAN) field. Used for mutual TLS (mTLS) between workloads.
- JWT-SVID — A signed JSON Web Token with the SPIFFE ID in the
subclaim. Used for authenticating to APIs, including cloud provider identity federation endpoints (AWS, GCP, Azure).
tbot.
Configuring Workload Identity
Step 1: Create a WorkloadIdentity resource
Theworkload_identity resource defines the SPIFFE ID and any attestation rules for a workload. Create a file called workload-identity.yaml:
Step 2: Grant a bot access to issue SVIDs
Create a role that allows the bot to request SVIDs for the workload identity you created:Step 3: Configure tbot to expose the Workload API
Add theworkload-identity-api service to your tbot.yaml to expose a SPIFFE Workload API socket:
/opt/machine-id/workload.sock will serve SPIFFE SVIDs to any process that connects to it. Restrict the socket’s permissions so that only your workload process can read it.
Reload tbot to apply the new configuration:
Step 4: Connect your workload to the Workload API
Configure your workload to use the socket. If you are using a SPIFFE SDK, set the environment variable:workload-identity-x509 output service:
svid.pem, svid_key.pem, and ca.pem (trust bundle) to the directory. Long-running workloads must watch these files and reload them on change to handle renewals.
Workload Attestation
Workload Attestation allowstbot to restrict which processes can receive an SVID based on characteristics of the requesting process. This eliminates the need for any bootstrapping secret inside the workload.
Unix attestation
When using a Unix domain socket listener,tbot can attest workloads based on:
| Attribute | Description |
|---|---|
workload.unix.uid | The UID of the user running the process |
workload.unix.gid | The primary GID of the user running the process |
workload.unix.pid | The PID of the process |
workload_identity resource:
conditions block is a separate rule. At least one rule must pass for the SVID to be issued. Within a single conditions block, all conditions must pass.
Testing with tbot spiffe-inspect
Before connecting your actual workload, verify the Workload API is working correctly:Integration with Envoy and service meshes
tbot’s Workload API is compatible with the Envoy Secret Discovery Service (SDS) protocol. Envoy can be configured to fetch mTLS certificates from the tbot socket, enabling transparent mTLS between services without modifying application code.
Any service mesh or sidecar that supports the SPIFFE Workload API (including Linkerd and Istio integrations via the SPIFFE CSI driver) can use tbot as its SVID source.
Cloud provider federation
JWT SVIDs issued by Teleport Workload Identity can authenticate to AWS, GCP, and Azure through their respective identity federation mechanisms:- AWS OIDC Federation — Use JWT SVIDs with AWS’s OIDC identity provider
- AWS Roles Anywhere — Use X.509 SVIDs with AWS Roles Anywhere
- GCP Workload Identity Federation — Use JWT SVIDs with GCP’s identity federation
- Azure Federated Credentials — Use JWT SVIDs with Azure AD federated identity credentials
Next steps
Getting Started
Issue your first bot certificate and access a server or Kubernetes cluster from CI/CD.
tbot Reference
Full tbot configuration reference including all service types and output destinations.
RBAC
Use roles and label matchers to control which workloads can receive which SVIDs.
tctl Reference
Manage bots, tokens, and workload identity resources from the command line.
