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

fix: Fix signing region source #1845

Merged
merged 3 commits into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -80,20 +80,6 @@ extension EndpointResolverMiddleware: ApplyEndpoint {
builder.withProtocol(protocolType)
}

if let signingName = signingName {
attributes.signingName = signingName
attributes.selectedAuthScheme = selectedAuthScheme?.getCopyWithUpdatedSigningProperty(
key: SigningPropertyKeys.signingName, value: signingName
)
}

if let signingRegion = signingRegion {
attributes.signingRegion = signingRegion
attributes.selectedAuthScheme = selectedAuthScheme?.getCopyWithUpdatedSigningProperty(
key: SigningPropertyKeys.signingRegion, value: signingRegion
)
}

if let signingAlgorithm = signingAlgorithm {
attributes.signingAlgorithm = SigningAlgorithm(rawValue: signingAlgorithm)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ public struct SigV4AAuthScheme: AuthScheme {

// Set signing name and signing region flags
updatedSigningProperties.set(key: SigningPropertyKeys.signingName, value: context.signingName)
updatedSigningProperties.set(key: SigningPropertyKeys.signingRegion, value: context.signingRegion)
updatedSigningProperties.set(
key: SigningPropertyKeys.signingRegion,
value: signingProperties.get(key: SigningPropertyKeys.signingRegion) ?? context.signingRegion
)

// Set expiration flag
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ public struct SigV4AuthScheme: AuthScheme {

// Set signing name and signing region flags
updatedSigningProperties.set(key: SigningPropertyKeys.signingName, value: context.signingName)
updatedSigningProperties.set(key: SigningPropertyKeys.signingRegion, value: context.signingRegion)
updatedSigningProperties.set(
key: SigningPropertyKeys.signingRegion,
value: signingProperties.get(key: SigningPropertyKeys.signingRegion) ?? context.signingRegion
)

// Set expiration flag
//
Expand Down
Loading