Around Go: DevOps and reliability · 3 MIN READ

IAM: give a job one narrow, short-lived identity

Separate authentication, authorization and credential lifetime in a delivery workflow.

A green build does not authorize a deployment. Each job needs an identity, a target and a bounded permission set. Keep production credentials out of source, course exports and lab files.

Go for DevOps and reliability · A MAP OF THE IDEA

  1. Identify principal and target
  2. Constrain trust claims
  3. Limit actions and lifetime
  4. Test allowed and denied actions

Useful when

  • Separate authentication, authorization and credential lifetime in a delivery workflow.
  • Keep an explicit contract and retain both successful and denied observations.

Watch out

  • An identity can authenticate successfully and still be denied a resource action. Test that denial deliberately.

Implementation & operation cost: Real provider and network evidence requires an owned disposable environment; local files describe a contract without performing the integration.

01

Identify the principal and target

Record the CI job identity, environment and intended action before choosing permissions. A pull request from a fork should not receive deployment rights. Separate artifact-read, staging-deploy and production-promote roles. Restrict both the allowed actions and resource scope; a role name alone does not establish the boundary.

02

Prefer a short-lived exchange

A workload identity can exchange an identity token for a short-lived role session. Bind trust to the expected issuer, audience, repository and protected environment. Inspect the trust policy as well as the permission policy. Avoid storing a long-lived administrator key in a workflow variable. Rotation and expiration reduce exposure but do not replace authorization.

03

Prove denial as well as success

In an owned disposable account, verify that the staging role can inspect its own target and is denied production changes. Record the principal, resource, attempted action and redacted audit event. Never paste tokens into logs. The local shell deliberately has no cloud authentication or egress; write the expected access matrix here, then perform the integration test in your own isolated environment.

text
principal          staging/read  staging/deploy  production/deploy
ci-verify          allow         deny            deny
ci-staging         allow         allow           deny
ci-production      allow         deny            allow after approval
Read the code

Read each row as a distinct principal, not as one shared token. Verification has no deployment rights. Staging can change only staging. The production row still requires a separately approved job and a matching trust policy; this matrix is a design artifact, not evidence that a cloud policy was installed.

TAKE THIS WITH YOU

An operational identity is a narrow authorization contract with a lifetime, not a reusable administrator secret.

Check your understanding

What should constrain a workload identity exchange?

Go to the source

Progress stays in this browser. No account needed.