-
Notifications
You must be signed in to change notification settings - Fork 103
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 codegen and TS integration points for config
#881
Conversation
5738163
to
9b86eed
Compare
experimentalIdentityAndAuth
core codegen and TS implementationsconfig
config
config
266f716
to
77cf3cd
Compare
77cf3cd
to
8e6b9d7
Compare
@@ -0,0 +1,64 @@ | |||
{ | |||
"name": "@smithy/experimental-identity-and-auth", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why does the package name include the word experimental? Doesn't that complicate promoting this to non-experimental later?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking when the feature is ready to move out of experimental (code is stable), this package would be deprecated.
The code from this package would then be moved to the relevant packages (e.g. @smithy/types
, individual middleware packages, etc.) and be published as production code.
This package should NOT be used in any production code at all.
Other alternatives being considered are alpha
/ beta
tags, or a combination of semver and tags.
8e6b9d7
to
a99cbd4
Compare
I reviewed the TS code 👍 . For the Java code, I'd want to see the output diff to evaluate it. |
5ec9696
to
95cc17b
Compare
3e02005
to
e2d9bec
Compare
config
config
config
config
config
config
57456c0
to
7491d79
Compare
…and-auth package Add interfaces and implementations for `experimentalIdentityAndAuth` in an NPM package. This will be reorganized into proper packages once feature development for `experimentalIdentityAndAuth` is complete.
…for `config` Update `RuntimeConfigGenerator` to generate: - `httpAuthSchemeProvider` that points to the `default*HttpAuthSchemeProvider` implementation. - `httpAuthSchemes` that creates a `DefaultIdentityProviderConfiguration` that houses all the registered auth schemes with default identity providers and signers. Update `ServiceBareBonesClientGenerator` to generate: - `httpAuthSchemeProvider` that points to the `*HttpAuthSchemeProvider` interface - `httpAuthSchemes` that points to the `IdentityProviderConfiguration` interface - Any `ConfigField`s registered through `HttpAuthScheme`s The 2 integration points are defined in `HttpAuthTypeScriptIntegration`: - `getHttpAuthScheme()` which registers an auth scheme - `customizeSupportedHttpAuthSchemes()` which is an open-ended method that allows complete access to the `SupportedAuthSchemesIndex`. This allows for adding, removing, mutating, replacing any aspect of the registered `HttpAuthScheme`s. An `HttpAuthScheme` contains all the information needed to generate code for an HTTP auth trait, from configuration fields, auth option properties, auth scheme provider properties, default identity providers, and default signers. Also added `SupportedHttpAuthSchemesIndex` which registers auth schemes that can be code generated. Note that this is NOT the same as all of the auth schemes actually being used by the service: that still depends on the auth traits in the model.
e2d9bec
to
ba0cdee
Compare
Issue #, if available:
N/A.
Description of changes:
NOTE: All of these are under the
experimentalIdentityAndAuth
feature flagStart implementing core code generation and TypeScript package for the client
config
. This change introduces:httpAuthSchemes
andhttpAuthSchemeProvider
and corresponding runtime config defaultsHttpAuthSchemeProvider
and interfaces per client@smithy/experimental-identity-and-auth
package, which will be reorganized into proper packages and deprecated after feature development is complete.0.x.x
, and never have a major version bump.Testing:
@httpApiKeyAuth
support #883@httpBearerAuth
support #884@aws.auth#sigv4
support #885aws-sdk-js-v3
TODO:
@httpApiKeyAuth
)If one or more of the packages in the
/packages
directory has been modified, be sureyarn changeset add
has been run and its output hasbeen 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.