← Back to The Lab

Making infrastructure trust identities instead of secrets

A concrete federation configuration, and the work still needed to extend it.

Tinkering

The itch

A deployment credential tends to outlive the reason it was created. It gets copied into a CI setting, granted enough permissions to make the build work, and eventually becomes something somebody has to remember to rotate.

I’m exploring a different starting point: let a workload prove what it is, then give it temporary access to a narrow set of resources.

The experiment

The foryour.fans repository contains a concrete GitHub Actions to Google Cloud federation configuration. Terraform defines the trust relationship; the image-build workflow requests an OIDC token and exchanges it for a short-lived access token.

The workflow asks for a thirty-minute access token. It uses that token to authenticate to the container registry, rather than storing a Google service-account private key.

This is verified configuration in the repository. Reading it does not prove that the cloud resources are currently applied or that a recent workflow run succeeded.

The architecture

GitHub Actions workflow
    → signed OIDC identity
    → Google Cloud federation checks
    → temporary service-account access
    → one container registry repository

The configured trust condition checks the originating repository. The federated identity receives registry write access scoped to one repository. This build identity does not receive deployment permissions from this configuration.

The unresolved work

This is one trust relationship, not an environment with no permanent secrets. Kubernetes and networking integrations need their own issuer, audience, identity mapping, and authorization decisions.

The provider maps the workflow’s repository and Git ref, but its acceptance condition checks the repository alone. Mapping a claim is not the same as enforcing a condition on it. Restricting access to an approved release context is an architectural question still worth exploring.

The next experiment

Test both sides of the boundary: an intended workflow should succeed, and a workflow outside the intended trust conditions should fail. Then evaluate where a similar exchange can replace an existing credential without widening access.

The takeaway

Short-lived credentials reduce how long access survives. Explicit trust conditions and narrow permissions determine what that access can do. Both parts need a design.