Skip to content

Commit

Permalink
Stop populating SessionMode by default for the SDK-created S3 express…
Browse files Browse the repository at this point in the history
… sessions.

This value already matched the service-side default, and was already not sent by most SDK languages.
  • Loading branch information
millems committed Jan 30, 2025
1 parent 02319ad commit 4489294
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .changes/next-release/bugfix-AmazonS3-6b41d5e.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"type": "bugfix",
"category": "Amazon S3",
"contributor": "",
"description": "Stopped populating SessionMode by default for the SDK-created S3 express sessions. This value already matched the service-side default, and was already not sent by most SDK languages."
}
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ SessionCredentials getCredentials(S3ExpressIdentityKey key, IdentityProvider<Aws
Duration requestApiCallTimeout = clientSetTimeoutIfExists(serviceClientConfiguration).orElse(DEFAULT_API_CALL_TIMEOUT);

return CreateSessionRequest.builder().bucket(bucket)
.sessionMode(SessionMode.READ_WRITE)
.overrideConfiguration(o -> o.credentialsProvider(provider)
.apiCallTimeout(requestApiCallTimeout)).build();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ private static void verifyGetObject(S3ExpressSessionAuth s3ExpressSessionAuth) {

private static void verifySessionHeaders() {
verify(1, getRequestedFor(urlMatching("/.*session"))
.withHeader("x-amz-create-session-mode", equalTo("ReadWrite"))
.withoutHeader("x-amz-create-session-mode")
.withHeader("x-amz-content-sha256", equalTo("UNSIGNED-PAYLOAD")));
}

Expand Down

0 comments on commit 4489294

Please sign in to comment.