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

add modeled endpoint resolver generation #456

Merged
merged 2 commits into from
Oct 4, 2023

Conversation

lucix-aws
Copy link
Contributor

@lucix-aws lucix-aws commented Oct 2, 2023

  • Adds modeled endpoint resolver generation
  • Adds AuthSchemeDefinition, which controls codegen of runtime components
    • Right now this is only auth options, future changes will add schemes, adapters, etc.
  • Add discrete integrations for each modeled auth scheme that we support by default
    • Bearer was tacked on to the existing integration
  • Adds core runtime types for SRA I&A:
    • auth.Option, auth.Identity, auth.IdentityResolver
    • transport/http.AuthScheme, transport/http.Signer
    • adds definitions for existing schemes (sigv4, sigv4a, bearer, anonymous)

@@ -63,6 +63,7 @@ public final class SmithyGoDependency {
public static final GoDependency SMITHY_DOCUMENT = smithy("document", "smithydocument");
public static final GoDependency SMITHY_DOCUMENT_JSON = smithy("document/json", "smithydocumentjson");
public static final GoDependency SMITHY_SYNC = smithy("sync", "smithysync");
public static final GoDependency SMITHY_AUTH = smithy("auth");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: do we want to alias this as smithyauth? since we do that in a lot of other places, and maybe consuming applications want to use auth?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just for our own importation of it though, it doesn't affect how other people choose to alias it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe I misunderstood what you're saying - I'm fine with smithyauth regardless.

}

// NewSigV4AScheme returns a SigV4A auth scheme that uses the given Signer.
func NewSigV4AScheme(signer Signer) AuthScheme {
Copy link
Contributor

@isaiahvita isaiahvita Oct 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looking at the Signer interface, it looks fairly generic. yet the SRA spec states that the SigV4 and SigV4A auth scheme have SigV4 and SigV4A specific signer types. is the spec mistaken?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where are you seeing that? Let's discuss offline.

@lucix-aws lucix-aws merged commit 33bc804 into feat-sraauth Oct 4, 2023
1 check passed
@lucix-aws lucix-aws deleted the feat-sraauth-resolver branch October 4, 2023 18:14
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