Repository navigation
Conversation
kdacosta0
marked this pull request as ready for review
November 6, 2026 12:25
kdacosta0
marked this pull request as draft
November 6, 2026 12:25
PR Summary by QodoPreserve caller-supplied URLs in Windows environment scripts
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
…dows tas-env-variables.ps1 always overwrote OIDC_ISSUER_URL with a value derived from the cluster, even when the caller had already set one. The derived value guesses the Keycloak realm path, and that guess only holds for RHBK, which serves under /realms; legacy RH-SSO serves under /auth/realms. A caller that knows its own issuer URL had it discarded on Windows while tas-env-variables.sh honoured it everywhere else, so Windows runs failed to authenticate for a reason unrelated to the test. Guard the derivation the same way the shell script already does, and read the route host from .status.ingress[0].host to match it. .spec.host is the requested hostname and is empty when the route lets OpenShift generate one; the status field always carries the admitted host. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
… scripts Guarding OIDC_ISSUER_URL alone fixed one of five instances of the same bug, and only in one of the two Windows scripts. tas-env-variables.sh derives a value from `oc` only when the variable is unset, for all six variables. Both Windows scripts unconditionally overwrote TUF_URL, FULCIO_URL, REKOR_URL and REKOR_UI_URL. This matters because e2e.yml exports exactly those four from kubectl and then sources the env script: on Linux they survive, on Windows they were discarded and re-derived from a cluster that may answer differently. Guard all six in both scripts, and switch the .bat route lookup to .status.ingress[0].host to match. The .bat needs the flat goto form for OIDC_ISSUER_URL rather than a parenthesised if: cmd expands %OIDC_ROUTE% when it parses the block, so composing the URL inside one would read it before the for loop had set it. The single-step lookups are safe on one line because `set X=%%i` takes the for variable rather than an expanded %VAR%. Neither script can be executed on macOS, so this is reviewed, not run. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
kdacosta0
force-pushed
the
SECURESIGN-6182-windows-oidc-issuer-url
branch
from
November 9, 2026 12:29
a950a12 to
4bf9c9a
Compare
kdacosta0
marked this pull request as ready for review
November 9, 2026 12:50
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.
Jira: SECURESIGN-6182
The bug
tas-env-variables.shderives a value fromoconly when the variable is unset, for all six variables it manages. Both Windows scripts ignored what the caller had already set and unconditionally overwrote it.This is not cosmetic.
.github/workflows/e2e.ymlexportsTUF_URL,REKOR_URL,FULCIO_URLandREKOR_UI_URLfromkubectland then sources the env script. On Linux those survive; on Windows all four were discarded and re-derived from a cluster that may answer differently — or not at all.For
OIDC_ISSUER_URLthe overwrite was worse than losing a value: the derived URL guesses the Keycloak realm path, and that guess only holds for RHBK, which serves under/realms. Legacy RH-SSO serves under/auth/realms, so a caller that knew its own issuer URL had it silently replaced with a wrong one.Parity after this PR
.sh.ps1.batOIDC_ISSUER_URLOIDC_CLIENT_IDTUF_URLFULCIO_URLREKOR_URLREKOR_UI_URLAll three scripts now have six guards each.
No Go code touched. A
release-1.5backport is #110.🤖 Generated with Claude Code