Skip to content

transport: validate bearer realm url#2196

Open
1seal wants to merge 1 commit intogoogle:mainfrom
1seal:fix/realm-domain-binding
Open

transport: validate bearer realm url#2196
1seal wants to merge 1 commit intogoogle:mainfrom
1seal:fix/realm-domain-binding

Conversation

@1seal
Copy link

@1seal 1seal commented Jan 27, 2026

ref #2193

this change parses and validates the bearer realm value (scheme + host), and rejects cross-domain realm hosts before any credential-bearing token request is made. the check is bound to the registry effective domain (e.g. "registry-1.docker.io" and "auth.docker.io" are allowed).

tests included:

  • rejects realm host mismatch
  • rejects "http" realm for secure registries

open questions:

  • should the default binding be exact host match, or effective domain match?
  • should there be an explicit allowlist/option for registries that intentionally use a separate auth host?

reject cross-domain bearer realm urls before sending credentials, and add regression tests.
@1seal
Copy link
Author

1seal commented Feb 12, 2026

hi @Subserial — this adds realm URL validation to prevent credentials from being sent to an attacker-controlled token service. minimal change, regression test included. happy to address any feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant