Skip to content

[pull] series/0.19 from disneystreaming:series/0.19 - #113

Merged
pull[bot] merged 1 commit into
innFactory:series/0.19from
disneystreaming:series/0.19
Sep 29, 2026
Merged

pull[bot] merged 1 commit into
innFactory:series/0.19from
disneystreaming:series/0.19

Conversation

@pull

@pull pull Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

The SigV4 signing name and the endpoint host were both derived from
`endpointPrefix`, which is only correct for services where the two happen
to coincide.

They are separate things. `aws.auth#sigv4`'s `name` is defined as "the
signature version 4 service signing name to use in the credential scope
when signing requests", so the signing name now comes from there, falling
back to `arnNamespace` and then `endpointPrefix`. The host keeps using
`endpointPrefix` -- the field documented for endpoint resolution -- and
falls back to `arnNamespace`, which is DNS-safe by construction, for the
services that omit it.

This fixes two failure modes:

- Services whose prefix and signing name differ were signed with the
  wrong credential scope and rejected by AWS with "Credential should be
  scoped to correct service". SES v2 is hosted at
  `email.<region>.amazonaws.com` but must be signed as `ses`; SageMaker
  is hosted at `api.sagemaker.<region>.amazonaws.com` but signs as
  `sagemaker` (#1568).

- Services with no `endpointPrefix` fell back to the *operation* name for
  the host, producing nonsense like `ListRegions.us-east-1.amazonaws.com`
  (#1532). The Account API's own endpoint tests confirm the expected host
  is `account.us-east-1.amazonaws.com`, so this needs no rule-set
  evaluation.

Adds fixture services to `sampleSpecs/aws_example.smithy` covering each
combination of `endpointPrefix`, `arnNamespace` and sigv4 name seen in
the wild, plus DynamoDB (where all three agree) as a no-regression case.
Four of the five new assertions fail without this change.

Verified against real AWS with read-only calls: Account.ListRegions and
Account.GetAccountInformation reach `account.us-east-1.amazonaws.com`
signed as `account`, and SageMaker.ListEndpoints reaches
`api.sagemaker.us-east-1.amazonaws.com` signed as `sagemaker`.

Also skips traits from the `aws.endpoints` namespace when generating
hints, mirroring the existing treatment of `smithy.rules`. Those traits
have no published Scala bindings, so any service carrying them -- the
Account API among them, via `aws.endpoints#standardPartitionalEndpoints`
-- generated a reference to `aws.endpoints.StandardPartitionalEndpoints`
that did not compile. That made the #1532 service unusable even with the
host fix in place.

Note: `X-Amz-Target` is still set for every protocol though it belongs to
awsJson1_0/1_1 only. Left alone deliberately -- the header is part of the
canonical request, so changing it alters every signature, which does not
belong in a correctness fix.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
@pull pull Bot locked and limited conversation to collaborators Sep 29, 2026
@pull pull Bot added the ⤵️ pull label Sep 29, 2026
@pull
pull Bot merged commit b714b5c into innFactory:series/0.19 Sep 29, 2026
1 of 9 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant