Workload Identity Meets Supply Chain Security: Teleport's Sigstore Integration

It’s no secret that the software development life cycle is becoming more complex.

With a plethora of libraries, frameworks, and now AI coding agents and assistants, we can build far more ambitious software in a fraction of the time. This is fantastic! But with it come greater opportunities for accidental or malicious security bugs and vulnerabilities to sneak in undetected, with potentially devastating consequences for your users and their trust in your company.

One particularly memorable example of this is the SUNBURST attack, which in 2020 saw tens of thousands of SolarWinds customers including government and healthcare agencies impacted by a highly sophisticated backdoor, injected into the popular Orion software package at build-time.

Thankfully there is a growing ecosystem of tools around the problem of securing the software supply chain; from your laptop, through CI, all the way to the production environment.

These tools are built on a foundation of trust established with cryptographic signatures. In order to trust that the container image running in production is the same as when it left CI, or that the results of a vulnerability scan haven't been tampered with, we must sign them and securely distribute the key material needed to verify these signatures.

What is Sigstore?

Sigstore is a framework and suite of tools for signing software artifacts such as binaries and container images, as well as "attestations" of the software's origin, dependencies, build process, test results, and pretty much anything you can represent using the in-toto format.

There are a number of other projects in this space (e.g. Notary), but Sigstore is emerging as a leader and is the core technology behind GitHub's artifact attestation and npm's package provenance features.

It offers a novel solution to one of the hardest problems in artifact signing: key distribution. With traditional signing solutions, you typically need to create and distribute long-lived signing keys or certificates. Rotating and revoking these credentials is difficult, so teams frequently put it off until it's too late.

Sigstore takes a very different approach with its "keyless" mode, which leverages single-use certificates bound to an OIDC identity (e.g. a Google account or GitHub Actions token). In the same way Teleport removes static credentials from human and machine infrastructure access, Sigstore removes them from code signing and verification.

Sigstore also records its signatures in a public transparency log for auditability, which makes it possible to monitor for unauthorized use of your identity or a compromise of the Sigstore infrastructure itself.

Getting started with Sigstore is easy. To try it out locally, use cosign to sign a container image. It will open a browser window for you to log in with your Google, Microsoft, or GitHub account, and push the signature up to your container registry.

$ cosign sign $IMAGE

Consumers can then check you really have signed the image with cosign verify:

$ cosign verify $IMAGE \
  --certificate-identity daniel.upton@goteleport.com \
  --certificate-oidc-issuer https://accounts.google.com

Note that we didn't need to figure out how to share our public key.

What does this have to do with Machine & Workload Identity?

Teleport Machine & Workload Identity replaces static credentials with SPIFFE-compliant cryptographic identities and short-lived certificates, enabling secure, policy-based authentication and mutual TLS between workloads and services.

Using tbot's SPIFFE Workload API, applications can obtain cryptographically verifiable identity documents called "SVIDs" (X.509 certificates or JWTs) which can be used to authenticate with other systems, or be exchanged for cloud credentials (for example, by using AWS Roles Anywhere or GCP Workload Identity Federation).

When an application requests a SVID, tbot performs a process called workload attestation to discover information about it such as the container image and Kubernetes pod labels. Teleport can use this information to decide whether or not to issue the SVID.

Now, tbot can also discover container image signatures as part of the attestation process, and they can be incorporated into the credential issuance decision.

In other words: by using the Sigstore integration, you can bake supply chain security into your workload identity. You could, for example, lock down access to your microservices, databases, or cloud accounts to only software built and signed in your trusted CI environment or that has passed a scan for CVEs and other common vulnerabilities. This massively reduces the surface for and potential impact of supply chain attacks.

Getting started

There are broadly three steps required to enable Teleport's Sigstore integration:

  1. Create a SigstorePolicy object that describes how and by whom artifacts must be signed and attested.
  2. Call the sigstore.policy_satisfied function from your WorkloadIdentity rules to ensure the policy's requirements are met before issuing SVIDs.
  3. Enable tbot's Sigstore attestor, which discovers image signatures for Kubernetes, Docker, and Podman workloads from an OCI registry.

Demo

Let's take a peek at how this looks in practice. To follow along, see the full example code here.

We're sorry, an error has occurred while generating this content.
?url=%2Fblog%2F_next%2Fstatic%2Fmedia%2Fsigstore-integration.10bd4a1b
  1. Cosign (or another Sigstore-compatible tool) generates a private key and certificate signing request. It sends the CSR and an OIDC identity token to Fulcio, Sigstore’s certificate authority.

  2. Fulcio checks the identity token and issues a short-lived X.509 certificate, attesting the OIDC identity. Cosign uses the private key to sign the artifact and then throws private key away so it can’t be used again.

  3. Cosign records the signature and other metadata in the Rekor transparency log.

  4. It then uploads the signature, certificate, and proof of transparency log inclusion to an OCI registry.

  5. At runtime, a workload process calls tbot’s SPIFFE Workload API to obtain a SVID.

  6. tbot uses the local Kubernetes, Docker, or Podman API to discover which container image digest the workload is running.

  7. It then queries the OCI registry to find the relevant signatures and attestations.

  8. tbot includes these signatures in the information sent to the Teleport auth server when requesting a SVID.

  9. The auth server evaluates the WorkloadIdentity rule expression which calls the sigstore.policy_satisfied function.

  10. The SigstorePolicy is used to determine the “trusted roots” that will be used to verify the signature. This includes Fulcio and Rekor’s certificate chains as well as any custom RFC 3161 timestamp authorities.

  11. If the required artifact signature and attestations are present and correct, the auth server issues the SVID and tbot returns it to the workload process.

Next Steps: Strengthen Your Supply Chain with Workload Identity

Modern software supply chains are only as secure as the workloads that build and deploy them. Eliminating static secrets and adopting cryptographic identity, especially with open standards like SPIFFE, is foundational to reducing risk and increasing automation across your CI/CD pipelines and service meshes.

Teleport Machine & Workload Identity makes it easy to provision and enforce identity for every non-human actor in your infrastructure. With native SPIFFE support, short-lived certificates, and granular access policies, you can secure service-to-service communication without managing secrets.

Teleport
View Profile

5 Smart API Gateway Strategies to Unlock Developer ...

Introducing the Anaconda Community Channel: Expand ...