Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop auth_info on redirect #487

Merged
merged 1 commit into from
Jan 29, 2025
Merged

Drop auth_info on redirect #487

merged 1 commit into from
Jan 29, 2025

Conversation

jklukas
Copy link
Contributor

@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