[AIENG-679] Unify GitHub Actions OIDC onto the generic OIDC flow - #1366
[AIENG-679] Unify GitHub Actions OIDC onto the generic OIDC flow#1366gokul-cloudbees wants to merge 4 commits into
Conversation
…legacy flag in the header for older way
|
Should we modify the Java part? I guess we need to do the same thing there, too. smart-tests-cli/src/main/java/com/launchableinc/ingest/commits/Main.java Lines 87 to 125 in c57ddb1 |
| # The header tells Intake to take the legacy branch; without it the token would be verified | ||
| # through the generic path. | ||
| if os.getenv(LEGACY_GITHUB_OIDC_KEY): | ||
| click.secho( |
There was a problem hiding this comment.
This warning is within authentication_headers method, meaning that CLI will print it every time API is called. It might be annoyed, so can we think about a way to reduce the frequency?
Java commit-ingester source changed in 58359b5 but the checked-in jar was not rebuilt, failing the "Check exe_deploy.jar is up to date" CI step. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
|
||
| if (System.getenv("EXPERIMENTAL_GITHUB_OIDC_TOKEN_AUTH") != null) { | ||
| authenticator = new GitHubIdTokenAuthenticator(); | ||
| if (System.getenv("SMART_TESTS_GITHUB_OIDC_TOKEN_AUTH") != null) { |
There was a problem hiding this comment.
| // and matches the normalized `repo:OWNER/REPO` subject against trusted_oidc_subjects. The | ||
| // audience is required because the generic path enforces `aud` for GitHub's issuer. | ||
| String audience = System.getenv("SMART_TESTS_OIDC_AUDIENCE"); | ||
| if (audience == null || audience.isEmpty()) { |
There was a problem hiding this comment.
| audience = GitHubIdTokenAuthenticator.DEFAULT_OIDC_AUDIENCE; | ||
| } | ||
| authenticator = new GitHubIdTokenAuthenticator(audience, false); | ||
| } else if (System.getenv("EXPERIMENTAL_GITHUB_OIDC_TOKEN_AUTH") != null) { |
There was a problem hiding this comment.
|
In the following code, we first check if smart-tests-cli/smart_tests/commands/verify.py Lines 202 to 226 in 1fc2b8e |
|
The following comments are just trivial changes, so you don't have to address them, but the last comment here might be critical, so you can focus on it. |
Summary
Routes GitHub Actions OIDC through the same generic flow used for Jenkins. The legacy path is preserved behind an explicit opt-in.
Changes