Skip to content

Commit

Permalink
fix(endpoint): join authScheme signingRegionSet values instead of tak…
Browse files Browse the repository at this point in the history
…ing first only (#4056)
  • Loading branch information
kuhe authored Oct 20, 2022
1 parent e8d7c68 commit 751245a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/middleware-signing/src/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ export const awsAuthMiddleware =

// TODO(identityandauth): call authScheme resolver
const authScheme: AuthScheme | undefined = context.endpointV2?.properties?.authSchemes?.[0];

const multiRegionOverride: string | undefined =
authScheme?.name === "sigv4a" ? authScheme?.signingRegionSet?.[0] : undefined;
authScheme?.name === "sigv4a" ? authScheme?.signingRegionSet?.join(",") : undefined;

const signer = await options.signer(authScheme);

Expand Down
3 changes: 2 additions & 1 deletion packages/types/src/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ export interface AuthScheme {
*/
signingRegion: string;
/**
* TODO usage?
* @example ["*"]
* @exammple ["us-west-2", "us-east-1"]
*/
signingRegionSet?: string[];
/**
Expand Down

0 comments on commit 751245a

Please sign in to comment.