support sigv4[a] and non-rule endpoint resolution in generic clients - #687
Conversation
- add sigv4 - add basic endpoints w/o rules - add default http client
|
|
||
| // AWSCredentialIdentity is the [auth.Identity] carrying AWS credentials | ||
| // through the auth pipeline. | ||
| type AWSCredentialIdentity struct { |
There was a problem hiding this comment.
not sure where to put this nit question: with support of sigv4(a) and non-rule ep resolution for user's own client, should we concern min go version in smithy go like go v2 now?
There was a problem hiding this comment.
these two things wouldn't matter for that, but also i thought we've been enforcing the same minimum version in smithy-go that we have been in the sdk
| + " declares itself as a replacement target."); | ||
| } | ||
|
|
||
| var existing = replacedBy.get(target); |
There was a problem hiding this comment.
Is it possible integration A and B replaces each other mutually? The answer might be no if replaces type is only used from sdk side
There was a problem hiding this comment.
if used in the intended way, no. you could have two integrations in a single codebase replacing each other but that wouldn't make sense
| // The aws-http-auth signers support implicit payload hashing, but in the | ||
| // client pipeline the body is carried on the separate Stream field, so it has | ||
| // to be hashed here instead. | ||
| func Hash(r *smithyhttp.Request, props *smithy.Properties) ([]byte, error) { |
There was a problem hiding this comment.
So my understanding is this func collapsed/ported all payload hash workflow originated from go v2's sigv4 and runs unsigned payload only when it presents in prop. Can it cover all unsigned cases? For example dynamicPayloadSigningMiddleware applies unsigned payload only for TLS schemed operations like s3.PutObject
There was a problem hiding this comment.
no this is just signing the payload all the time no matter what, which should work for sigv4. the dynamic middleware you're referencing is basically for weird unmodeled AWS behavior
without depending on aws-sdk-go-v2
@Replacesannotation lets one GoIntegration suppress another, so the SDK can swap in its own auth scheme/HTTP client/endpoint resolver over the generic defaultswired up
there wil be a downstream PR that adds
@Replacesin SDK codegen where necessary, verified that this doesn't affect the output of the generated SDK at all with those.