Repository navigation
Conversation
…-ENG-132] The director's `POST /oidc/token` gives a CI job a record key for 6 hours in exchange for the OIDC token of its CI provider. It is off unless `OIDC_TOKEN_EXCHANGE_ENABLED=true`. - `currents.oidcTokenExchange.enabled` (false), `audience` (empty: the URL of `domains.recordApiHost`) and `trustForwardedFor` (false) set `OIDC_TOKEN_EXCHANGE_ENABLED`, `OIDC_TOKEN_AUDIENCE` and `OIDC_TRUST_FORWARDED_FOR` on the director. Nothing is rendered while `enabled` is false, whatever the other two are. - `docs/eks/quickstart.md` has a section on the network access it needs, the audience, client addresses and the indexes the scheduler creates; `docs/configuration.md` is regenerated; the changelog lists the values. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011baD3hG81A9qbFYrSn1ysE
|
| Topic | Details | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Deployment Guidance | Document configuration, networking, issuer and certificate requirements, audience isolation, policy behavior, indexes, and rollout prerequisites for both optional exchanges.Modified files (3)
Latest Contributors(2)
| |||||||||
| CI OIDC Exchanges | Enable CI jobs to exchange provider OIDC tokens for record keys or API tokens through independently configurable director endpoints, with audience validation, forwarded-address controls, issuer support, and server-side API policy settings.Modified files (4)
Latest Contributors(2)
|
Merger ✅ Ready to Merge
MERGE: the PR delivers the OIDC exchange chart values, templates, validation, and documentation, with CI having run and no unresolved discussions.
3 tasks done
…ENG-132] The audience of the CI OIDC token is a fixed string, not a URL: Currents cloud uses `currents:record-key`, and an install uses a name of its own, such as `currents:record-key:acme`. - `currents.oidcTokenExchange.audience` has no default. Templating fails with a message that says what to set when `enabled` is true and it is empty. It no longer falls back to the URL of `domains.recordApiHost`. - The docs and the changelog say to pick a name, to set the same value as `CURRENTS_OIDC_AUDIENCE` in the CI jobs, and not to use `currents:record-key`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011baD3hG81A9qbFYrSn1ysE
The reporter uses `CURRENTS_OIDC_AUDIENCE` only to request the token on GitHub Actions, and to show it in its missing-key hint. When the job supplies the token (GitLab CI, CircleCI, Buildkite, Bitbucket Pipelines), the audience is whatever the job asked its provider for, so the job uses the install's name there. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011baD3hG81A9qbFYrSn1ysE
…ization [P-ENG-132] The project a job names only selects the organization and its trust policy. The key it gets works for the whole organization for 6 hours, so the docs no longer say that it is limited to that project. Keys expire after six hours, and MongoDB's TTL cleanup removes their documents later. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011baD3hG81A9qbFYrSn1ysE
The director trims `OIDC_TOKEN_AUDIENCE`, so a value of only spaces passed the chart's `required` check and left the exchange answering that it is not configured. The chart now trims the audience before checking it, and renders the trimmed value. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011baD3hG81A9qbFYrSn1ysE
…tLab and GHES [P-ENG-132] The director and the server read OIDC_EXTRA_ISSUERS, a list of provider=issuer entries. The chart renders it on both when the list is not empty, and fails templating for an entry that is not github= or gitlab= with an https issuer. Document the network access to the listed hosts and NODE_EXTRA_CA_CERTS for an internal CA, and change the notes that said self-hosted GitLab and GitHub Enterprise are not supported. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011baD3jW7wFPFbKF1o7FCeC
… [P-ENG-132] The scheduler now builds the unique partial index on recordKeyHash, so the note that on-prem looks keys up by hash without an index is gone. In an issuer only the host is lowercase; the path keeps its case. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011baD3jW7wFPFbKF1o7FCeC
…TS_OIDC_AUDIENCE [P-ENG-132] Checked the OIDC_EXTRA_ISSUERS rules, NODE_EXTRA_CA_CERTS and the required audience against the currents code; this is the only difference. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011baD3jW7wFPFbKF1o7FCeC
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011baD3hG81A9qbFYrSn1ysE
…P-ENG-146] currents.oidcApiTokens.enabled and audience render OIDC_API_TOKEN_EXCHANGE_ENABLED and OIDC_API_TOKEN_AUDIENCE on the director. policiesEnabled renders OIDC_API_POLICIES_ENABLED on the server. Nothing is rendered while they are off. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011baD3hG81A9qbFYrSn1ysE
agoldis
marked this pull request as ready for review
November 20, 2026 19:36
…s of the OIDC values [P-ENG-146] Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011baD3hG81A9qbFYrSn1ysE
baz-app
Bot
dismissed
their stale review
November 20, 2026 19:45
Baz withdrew its approval because this pull request is no longer ready to merge.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Owner: @agoldis
Linear: P-ENG-146
What
Adds the settings of the CI OIDC token exchange (
POST /oidc/tokenon the director) as chart values, off by default:currents.oidcTokenExchange.enabledfalseOIDC_TOKEN_EXCHANGE_ENABLED=truecurrents.oidcTokenExchange.audience""OIDC_TOKEN_AUDIENCE. Required whenenabledis true, no default: templating fails while it is empty. A name you choose, such ascurrents:record-key:acme, not a URL. The CI jobs set the same value asCURRENTS_OIDC_AUDIENCEcurrents.oidcTokenExchange.trustForwardedForfalseOIDC_TRUST_FORWARDED_FOR=true. Only for a proxy or load balancer that appends the client address toX-Forwarded-Forand passes on none the caller wrote; otherwise a caller can fake its address and get around the limit per address. It also applies to the API token exchangecurrents.oidcTokenExchange.extraIssuers[]OIDC_EXTRA_ISSUERSon the director and the server: self-managed GitLab and GitHub Enterprise Server instances whose jobs may exchange tokens, asprovider=issuerentries (a list, or a comma-separated string), at most 20. Rendered whenever the list is not empty, whether or notenabledis true, because the server reads it too. An entry that is notgithub=orgitlab=with anhttps://issuer fails templating; the services check the other rules at start and refuse to start with an invalid valueNothing is rendered while
enabledis false, whatever the other two are, exceptextraIssuersbelow. Docs: a new section indocs/eks/quickstart.md,docs/configuration.mdregenerated with./scripts/build-docs.sh, and an entry under[Unreleased]inCHANGELOG.md.The audience is a fixed name, not a URL, so a DNS change never affects it (Andrew's decision): Currents cloud uses
currents:record-key, and an install picks its own. The docs say not to pickcurrents:record-keyitself, because a token made for the cloud would then be accepted.API tokens (P-ENG-146)
Adds the settings of the API token exchange (
POST /oidc/api/tokenon the director), read from the source of releaserelease/2026-11-20-001. All are off by default and render nothing while off.currents.oidcApiTokens.enabledfalseOIDC_API_TOKEN_EXCHANGE_ENABLED=truetrueturns it on; off,/oidc/api/tokenanswers 404./oidc/api/revokeis served either way. Independent ofoidcTokenExchange.enabledcurrents.oidcApiTokens.audience""OIDC_API_TOKEN_AUDIENCEenabledis true. The director does not start when it equalsOIDC_TOKEN_AUDIENCE, so the chart fails templating when both exchanges are on with the same namecurrents.oidcApiTokens.policiesEnabledfalseOIDC_API_POLICIES_ENABLED=truetruelets admins add API token trust policies in the dashboard; listing and removing them work either way. Nothing in the dashboard or director reads itextraIssuers(OIDC_EXTRA_ISSUERS) andtrustForwardedForalready cover the API token exchange: the director reads both for either exchange.trustForwardedForis now also rendered when only the API exchange is on. Docs: a new section indocs/eks/quickstart.md,docs/configuration.mdregenerated with helm-docs, and an entry inCHANGELOG.md. The chart version is not bumped; release commits do that.Needs images of a release that includes the API token exchange.
Checked before writing
Indexes. On-prem builds them itself. The scheduler runs
runMigrations({ syncIndexes: true })at startup (packages/scheduler/src/init.ts), which creates every index the release declares. ForrecordKeysthe release declares the unique partial index onrecordKeyHash(the lookup by hash), the TTL index onexpiresAt(expireAfterSeconds: 0) and the partial index onissuedFor.policyId, and foroidcTrustPoliciesits unique index. So there is no manual step, and the docs list the four indexes. Keys from the exchange expire after six hours, and MongoDB's TTL cleanup removes their documents later. The next release's upgrade notes should list the newrecordKeysindexes.Reporter audience. The reporters' default audience is
currents:record-key, and on GitHub Actions, where the reporter requests the token itself, they take another fromCURRENTS_OIDC_AUDIENCE(the CLI also has--oidc-audience). The reporter also showsCURRENTS_OIDC_AUDIENCEin its missing-key hint when it is set. On GitLab CI, CircleCI, Buildkite and Bitbucket Pipelines the job supplies the token, so the audience is whatever the job asks its provider for. An install picks its own name, so on-prem does need a client setting: the docs say to use the install's name in each of those places, and not to pickcurrents:record-keyitself, because a token made for the cloud would then be accepted. Reporters: currents-reporter#511, currents-playwright#1107.Do not merge this before the server change and the reporter releases that use the fixed audience name.
Network. The director must reach the providers' public discovery and key endpoints over https: GitHub Actions, GitLab.com, CircleCI, Buildkite and Bitbucket Pipelines. Air-gapped installs are not supported. Self-managed GitLab and GitHub Enterprise Server are supported through
extraIssuers: the director pods must reach each listed host, which can be private or internal, and an issuer with a certificate from an internal CA needsNODE_EXTRA_CA_CERTSon the director. The docs show thedirector.env,director.volumesanddirector.volumeMountsvalues for it.Release. The
extraIssuerspart needs images of a currents release that contains currents#5011 (the director accepts the issuers) and currents#5012 (the server reads the setting and stores a policy for a listed issuer). The dashboard form for adding a policy has a Server selector for them. The rest of this PR needs the release with the exchange.Related
Tested
helm templateonci/lint-values.yaml: default render has noOIDC_*variable;enabledwith an audience renders the two director variables;policiesEnabledrendersOIDC_API_POLICIES_ENABLEDon the server only;enabledwith no audience fails templating; equal audiences with both exchanges on fail templating; with only the API exchange on,trustForwardedForrendersOIDC_TRUST_FORWARDED_FOR.helm lintpasses. helm-docs leavesdocs/configuration.mdclean.helm lintwithci/lint-values.yaml, without the exchange and with it on with an audience: passes.helm template: off, noOIDC_*variable; on with an audience,OIDC_TOKEN_EXCHANGE_ENABLEDandOIDC_TOKEN_AUDIENCEwith that value; on with no audience, an empty one or one of only spaces (the director trims it), rendering fails with a message that says what to set; spaces around a valid name are trimmed;OIDC_TRUST_FORWARDED_FORonly whentrustForwardedForis true; nothing whenenabledis false with the others set. Only the director deployment gets them.extraIssuers(rendered withhelm template): empty, noOIDC_EXTRA_ISSUERS; a list of two entries, and a comma-separated string, renderOIDC_EXTRA_ISSUERSwith the entries joined by commas on the director and the server deployments and nowhere else; withenabledtrue and an audience it renders next to the other variables;bitbucket=https://xandgitlab=http://xfail templating with a message that gives an example.helm lintpasses, andhelm-docsleavesdocs/configuration.mdclean../scripts/build-docs.shleaves nothing uncommitted. Not run:ct install, which needs the cluster of the CI job.🤖 Generated with Claude Code
https://claude.ai/code/session_011baD3hG81A9qbFYrSn1ysE