Skip to content

Drop auth_info on redirect#487

Merged
jklukas merged 1 commit intomainfrom
klukas/auth-fixes
Jan 29, 2025
Merged

Drop auth_info on redirect#487
jklukas merged 1 commit intomainfrom
klukas/auth-fixes

Conversation

@jklukas
Copy link
Member

@jklukas jklukas commented Jan 29, 2025

In particular, this addresses a case where a user-facing registry redirects to blob storage in S3, providing a URL that includes various X-Amz-* query parameters. S3 refuses requests that have both Authentication header and authentication query parameters.

I think this is generally safe to do. If the redirect is to a different path under the same registry, then the request to new location would include another authentication challenge and the same authentication helper rules would be applied, restoring auth. If the redirect is to a different domain, then I wouldn't expect the same authentication to be accepted anyway, so dropping auth info seems generally desirable.

In particular, this addresses a case where a user-facing registry redirects
to blob storage in S3, providing a URL that includes various `X-Amz-*` query
parameters. S3 refuses requests that have both Authentication header and
authentication query parameters.
@jklukas jklukas merged commit cc0c1bf into main Jan 29, 2025
5 checks passed
@jklukas jklukas deleted the klukas/auth-fixes branch January 29, 2025 19:05
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.

2 participants