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

feat(experimentalIdentityAndAuth): Add generic @aws.auth#sigv4 support #885

Merged
merged 3 commits into from
Sep 1, 2023

Conversation

syall
Copy link
Contributor

@syall syall commented Aug 18, 2023

Issue #, if available:

N/A.

Description of changes:

NOTE: All of these are under the experimentalIdentityAndAuth feature flag

NOTE: Dependent on #881

  • Adding config properties region and credentials:
    /**
     * The AWS region to which this client will send requests.
     */
    region?: string | __Provider<string>;
    
    /**
     * The credentials used to sign requests.
     */
    credentials?: AwsCredentialIdentity | AwsCredentialIdentityProvider;
  • @smithy/experimental-identity-and-auth package: add the temporary SigV4Signer implementation (still need to resolve numerous signingProperties for backward compatibility)
  • Add back operations that support @aws.auth#sigv4 in the generic client test

Testing:

  • @aws.auth#sigv4 client codegen diff given the following model changes: https://gist.github.com/syall/a595c7738c380176a528ff29016f1c2c#file-awsauthsigv4-trait-client-diff
     //   auth scheme support is implemented
     // @httpApiKeyAuth(name: "X-Api-Key", in: "header")
     // @httpBearerAuth
    -// @sigv4(name: "weather")
    +@sigv4(name: "weather")
     // @auth([sigv4])
     @paginated(inputToken: "nextToken", outputToken: "nextToken", pageSize: "pageSize")
     service Weather {
    @@ -28,10 +28,12 @@ service Weather {
             // experimentalIdentityAndAuth
             // OnlyHttpApiKeyAuth
             // OnlyHttpBearerAuth
    +        OnlySigv4Auth
             // OnlyHttpApiKeyAndBearerAuth
             // OnlyHttpApiKeyAndBearerAuthReversed
             // OnlyHttpApiKeyAuthOptional
    -        // SameAsService
    +        OnlySigv4AuthOptional
    +        SameAsService
         ]
     }
  • No codegen diff for aws-sdk-js-v3

If one or more of the packages in the /packages directory has been modified, be sure yarn changeset add has been run and its output has
been committed and included in this pull request. See CONTRIBUTING.md.


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@syall syall force-pushed the add-generic-sigv4-support branch 4 times, most recently from bc1ab44 to 8e0130e Compare August 22, 2023 00:13
@syall syall force-pushed the add-generic-sigv4-support branch 3 times, most recently from b6e5a42 to a904c72 Compare August 22, 2023 23:56
@syall syall force-pushed the add-generic-sigv4-support branch from a904c72 to af7016e Compare August 31, 2023 19:46
@syall syall marked this pull request as ready for review August 31, 2023 19:49
@syall syall requested review from a team as code owners August 31, 2023 19:49
@syall syall force-pushed the add-generic-sigv4-support branch from af7016e to 90cb5e3 Compare August 31, 2023 23:07
@syall syall force-pushed the add-generic-sigv4-support branch from 90cb5e3 to 1502607 Compare September 1, 2023 21:39
@syall syall merged commit 697310d into smithy-lang:main Sep 1, 2023
@syall syall deleted the add-generic-sigv4-support branch September 7, 2023 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants