You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Validate issuer/URL by scheme and host instead of string prefix
is_issuer_known accepted any issuer that started with the expected string
"https://ci.eclipse.org". A string-prefix check treats the issuer as opaque
text, so URLs that only begin with those characters but resolve to a different
host were accepted -- e.g. a userinfo form ("https://ci.eclipse.org@other.host")
or a suffix form ("https://ci.eclipse.org.other.host"). The issuer is then used
for OIDC discovery, so it must genuinely point at the expected host.
Match issuers/URLs on their parsed scheme and host (f"{scheme}://{hostname}")
against a base-URL constant:
- models.is_issuer_known: compare against JENKINS_ISSUER_BASE_URL, mirroring how
the GitHub issuer is matched against GITHUB_ISSUER.
- cli add-workload: apply the same scheme+host comparison to both the GitHub
(GITHUB_BASE_URL) and Jenkins (JENKINS_ISSUER_BASE_URL) cases, replacing the
bare netloc equality and startswith checks. This also enforces the https
scheme on the GitHub repo URL.
Rename the constant JENKINS_ISSUER_PREFIX to JENKINS_ISSUER_BASE_URL and add
GITHUB_BASE_URL.
Add tests for the userinfo/suffix host constructions, non-https and malformed
issuers, and the disguised/non-https URLs in the CLI (asserting no network call
or DB write happens for a rejected URL). Update the authentication flow in
DESIGN.md to describe host-based validation.
Signed-off-by: Lukas Puehringer <lukas.puehringer@eclipse-foundation.org>
Assisted-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0 commit comments