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 Documentation | Document how to enable CI OIDC exchange, configure audiences and self-managed issuers, provide network and certificate requirements, and understand rate limits, indexes, and release prerequisites.Modified files (3)
Latest Contributors(2)
| |||||||||
| CI OIDC Exchange | Configure the chart to render OIDC_TOKEN_EXCHANGE_ENABLED, OIDC_TOKEN_AUDIENCE, OIDC_TRUST_FORWARDED_FOR, and OIDC_EXTRA_ISSUERS for the appropriate deployments, including validation and safe defaults.Modified files (4)
Latest Contributors(2)
|
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
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-132
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|
currents.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 value |Nothing 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.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 such a policy follows in a later change. The rest of this PR needs the release with the exchange.Related
Tested
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