The Simplest Way to Make Harness and OIDC Work Like They Should
You pair harness and oidc to run build pipelines without stored static keys. The pipeline requests a short token from your identity provider for each run. This workflow lets your team ship code and reach cloud resources with less risk. You stop copying long-lived keys into pipeline settings or project stores. Instead, each job proves who started it and gets a fresh token. How harness and oidc share identity and permissions During a build or deploy, the pipeline needs to reach your cloud accou
Your coding agents run with your access.
Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.
You pair harness and oidc to run build pipelines without stored static keys. The pipeline requests a short token from your identity provider for each run. This workflow lets your team ship code and reach cloud resources with less risk. You stop copying long-lived keys into pipeline settings or project stores. Instead, each job proves who started it and gets a fresh token.
How harness and oidc share identity and permissions
During a build or deploy, the pipeline needs to reach your cloud accounts. With harness and oidc, the platform acts as an identity client or issuer. First, a user logs in through an identity provider to start a job. The identity provider checks the user and sends back a signed identity token. That token holds claims about the user, the group, and the project.
Next, the pipeline step needs permission to talk to a cloud service. The pipeline sends its signed token to the target cloud identity service. The cloud service checks the signature against the public keys of the issuer. It also reads the token claims to check the project and branch names. If the claims match your trust rules, the cloud returns a temporary credential. The pipeline uses that temporary credential to push an app or run commands. When the job ends, the token expires on its own.
Common failure modes and how to scope roles
Many teams set up trust rules that are far too wide at first. A common mistake is trusting any job from the whole account or project. If one test pipeline breaks, an attacker can assume the production cloud role. Shared service accounts create the same risk across your build steps. Everyone uses the same wide role, so logs never show who ran what.
Unlogged database queries and shell steps during a deploy make audits even harder. A token might let a pipeline connect to a production database for migrations. Standard cloud logs show the role login, but they miss the exact queries. If a script reads customer emails or card numbers, you need clear logs.
End-to-End Encryption + Harness Security Features: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
You can fix role sprawl by scoping trust rules to tight subject claims. Require the cloud role to check the exact project, pipeline, and branch name. Give production roles only to jobs that run from protected release branches. Use a separate role with read permissions for pull request test runs. Also restrict network paths so build runners only reach the hosts they need. Short token lifetimes limit the time window if a job leaks a token.
Auditing database and server steps in deploy pipelines
Cloud roles solve the cloud API step, but pipelines also touch internal systems. Deploy jobs run schema changes on databases and run scripts on servers. Passing static database passwords into pipeline variables brings back the old secret problem. Teams should tie every database session and server command back to the caller. Masking rules can also rewrite sensitive fields like phone numbers in job output. When you link identity claims to every command, audits stay fast and simple.
Check database and API queries on the wire
Identity tools, roles, and network rules decide who opens a session. Setup alone cannot check what each query does or mask sensitive values in a response once a session starts. When workflows touch Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, or internal HTTP APIs, hoop.dev runs beside those services as an open-source proxy, a sidecar for your Postgres or API. It inspects requests coming in and results going back on the wire.
Your login details and client tools stay as they are while hoop.dev guardrails refuse bad deletes or drops before they run. On responses, hoop.dev data masking rewrites matched sensitive values in memory. Furthermore, hoop.dev holds SOC 2 Type II, is MIT licensed, and writes every query and decision to an audit trail that generates evidence for HIPAA, GDPR, and PCI DSS. See the source on GitHub.
Frequently asked questions
Why should teams replace static cloud keys in pipelines with OIDC tokens?
Static keys never expire until a person rotates them by hand. If a build log leaks a static key, attackers can use it anywhere. Short tokens expire after the job runs and only work for one role.
How do you stop a test pipeline from using a production role?
You lock down the trust policy on the target cloud role. Set the rule to check the subject claim for the exact branch name. Only allow the production role when the claim matches your main release branch.
What happens when an identity token expires during a long deploy job?
The pipeline step will fail to start new requests after the time limit. You should set the token duration to match your longest valid deploy step. Most teams keep this window under one hour to keep risk low.
Related guides
In this post