Skip to content

Do not include auth header when redirecting to other domain or when switching to insecure protocol#334

Merged
jonesbusy merged 1 commit into
oras-project:mainfrom
jonesbusy:feature/do-not-include-auth-header-other-domain
Jun 21, 2025
Merged

Do not include auth header when redirecting to other domain or when switching to insecure protocol#334
jonesbusy merged 1 commit into
oras-project:mainfrom
jonesbusy:feature/do-not-include-auth-header-other-domain

Conversation

@jonesbusy

@jonesbusy jonesbusy commented Jun 21, 2025

Copy link
Copy Markdown
Collaborator

Description

Do not send credentials to other demain. Also now S3 reject Authorization header when signature is passed throught URL

<Error>
  <Code>InvalidArgument</Code>
  <Message>Only one auth mechanism allowed; only the X-Amz-Algorithm query parameter, Signature query string parameter or the Authorization header should be specified</Message>
</Error>

Testing done

Submitter checklist

  • I have read and understood the CONTRIBUTING guide
  • I have run mvn license:update-file-header, mvn spotless:apply, pre-commit run -a, mvn clean install before opening the PR

@jonesbusy jonesbusy added the bug Something isn't working label Jun 21, 2025
@codecov

codecov Bot commented Jun 21, 2025

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 92.30769% with 1 line in your changes missing coverage. Please review.

Project coverage is 88.00%. Comparing base (0161a89) to head (682edfa).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/main/java/land/oras/auth/HttpClient.java 92.30% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main     #334      +/-   ##
============================================
+ Coverage     87.91%   88.00%   +0.09%     
- Complexity      617      627      +10     
============================================
  Files            39       39              
  Lines          1886     1893       +7     
  Branches        208      211       +3     
============================================
+ Hits           1658     1666       +8     
  Misses          135      135              
+ Partials         93       92       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jonesbusy jonesbusy force-pushed the feature/do-not-include-auth-header-other-domain branch 2 times, most recently from a3c5059 to 178a003 Compare June 21, 2025 15:52
Signed-off-by: Valentin Delaye <jonesbusy@users.noreply.github.com>
@jonesbusy jonesbusy force-pushed the feature/do-not-include-auth-header-other-domain branch from 178a003 to 682edfa Compare June 21, 2025 16:08
@jonesbusy jonesbusy marked this pull request as ready for review June 21, 2025 16:22
@jonesbusy jonesbusy merged commit 9aa33c6 into oras-project:main Jun 21, 2025
5 checks passed
@jonesbusy jonesbusy deleted the feature/do-not-include-auth-header-other-domain branch January 11, 2026 07:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant