fix(egress): emit preserve_auth into the generated routes
test / integration-docker (pull_request) Successful in 20s
test / unit (pull_request) Successful in 39s
lint / lint (push) Successful in 53s
test / integration-firecracker (pull_request) Successful in 3m31s
test / coverage (pull_request) Successful in 27s
test / publish-infra (pull_request) Has been skipped
tracker-policy-pr / check-pr (pull_request) Failing after 12m58s
test / integration-docker (pull_request) Successful in 20s
test / unit (pull_request) Successful in 39s
lint / lint (push) Successful in 53s
test / integration-firecracker (pull_request) Successful in 3m31s
test / coverage (pull_request) Successful in 27s
test / publish-infra (pull_request) Has been skipped
tracker-policy-pr / check-pr (pull_request) Failing after 12m58s
The flag from #453 was parsed off the manifest and honored by the addon, but `_route_to_yaml_fields` never wrote it, so it was dropped on the way to the proxy and has never worked end to end. Every registry route silently kept the unconditional Authorization strip. That is the whole of the Docker Hub / GHCR "unauthorized" blocker in #392: podman fetched a valid 2658-byte bearer from auth.docker.io, the proxy stripped it, and registry-1.docker.io answered the resulting anonymous request with a fresh WWW-Authenticate challenge — which reads exactly like a credential problem rather than a serializer gap. Found by diffing a bottle's rendered routes.yaml against its manifest: preserve_auth was in the manifest and absent from the output. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -255,6 +255,8 @@ def _route_to_yaml_fields(r: Route) -> dict[str, object]:
|
||||
fields["matches"] = matches_data
|
||||
if r.git_fetch:
|
||||
fields["git"] = {"fetch": True}
|
||||
if r.preserve_auth:
|
||||
fields["preserve_auth"] = True
|
||||
if (
|
||||
r.outbound_detectors is not None
|
||||
or r.inbound_detectors is not None
|
||||
@@ -335,6 +337,8 @@ def egress_render_routes(
|
||||
lines.append(" git:")
|
||||
if git_dict.get("fetch") is True:
|
||||
lines.append(" fetch: true")
|
||||
if f.get("preserve_auth") is True:
|
||||
lines.append(" preserve_auth: true")
|
||||
if "dlp" in f:
|
||||
dlp_dict: dict[str, object] = f["dlp"] # type: ignore
|
||||
lines.append(" dlp:")
|
||||
|
||||
Reference in New Issue
Block a user