Skip to content

AwsRequestOverrideConfiguration being dropped and replaced in all API operations #514

@abrav9595

Description

@abrav9595

Security issue notifications

If you discover a potential security issue in the Amazon S3 Encryption Client we ask that you notify AWS Security via our vulnerability reporting page. Please do not create a public GitHub issue.

Problem:

I want to use AwsRequestOverrideConfiguration to override request credentials on every S3 request. However, it was not working. When looking into the code , I noticed that the overrideConfiguration is being replaced for every request with API_NAME_INTERCEPTOR:

  1. MultipartUploadObjectPipeline
  2. PutEncryptedObjectPipeline
  3. GetEncryptedObjectPipeline

We used withRequestCredentialsProvider in SDK V1 and wanted to migrate to SDKV2 with the same behavior using AwsRequestOverrideConfiguration . But with this being dropped, we are blocked.

Solution:

I think the solution is a little simple. I see that its only adding builder.addApiName(API_NAME) here. This should be changed to something like:

.overrideConfiguration(clientProvidedConfiguration.toBuilder()
    .addApiName(API_NAME)
    .build())
.build()

This would ensure that the client provided overrides are NOT dropped.

Out of scope:

n/a

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions