HARMONY-1938: Update code to omit Authorization header when redirected to a presigned S3 URL #55
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Jira Issue ID
HARMONY-1938
Description
The latest service library changes were not working when attempting to download a file that resulted in a redirect to a pre-signed S3 URL. The issue was that the Authorization header with the EDL bearer token was being sent to the redirect location which had conflicting query parameters (Signature and X-Amz-Algorithm indicate a different authorization method).
Now the library will pass in the Authorization header unless one of those query parameters is present in the request.
Local Test Steps
This cannot be tested locally - it needs to be tested in an AWS environment.
You can currently see the broken behavior in the Harmony SIT environment with https://harmony.sit.earthdata.nasa.gov/C1233800302-EEDTEST/ogc-api-coverages/1.0.0/collections/blue_var/coverage/rangeset?subset=lat(20%3A60)&subset=lon(-140%3A-50)&granuleId=G1233800343-EEDTEST&outputCrs=EPSG%3A31975&format=image%2Fpng
PR Acceptance Checklist