Skip to content

Address bug where aws v4 signatures get their service/region swapped in creds.#43

Merged
mjbraun merged 2 commits intomainfrom
awsv4-swapped-bug
Mar 11, 2026
Merged

Address bug where aws v4 signatures get their service/region swapped in creds.#43
mjbraun merged 2 commits intomainfrom
awsv4-swapped-bug

Conversation

@timflyio
Copy link
Contributor

@timflyio timflyio commented Mar 4, 2026

There's a bug in the aws v4 processor. It reads the existing signature and then updates it with a new signature. It extracts the region and service fields from the old signature in the wrong order, so when it generates a new signature, they are swapped to service then region. Unfortunately we have active use cases that depend on this behavior. So this commit introduces an optional fix, with the default behavior being to preserve the field swapping bug behavior.

  • Add new flag to the processor "no_swap", defaulting to false. When not present or fault the existing swapping behavior is preserved. When it is true, the fields are not swapped.

…in creds.

There's a bug in the aws v4 processor. It reads the existing signature and then updates it with a new signature. It extracts the region and service fields from the old signature in the wrong order, so when it generates a new signature, they are swapped to service then region. Unfortunately we have active use cases that depend on this behavior. So this commit introduces an optional fix, with the default behavior being to preserve the field swapping bug behavior.

- Add new flag to the processor "no_swap", defaulting to false. When not present or fault the existing swapping behavior is preserved. When it is true, the fields are not swapped.
@mjbraun mjbraun self-requested a review March 11, 2026 16:14
@timflyio timflyio marked this pull request as ready for review March 11, 2026 17:20
@mjbraun mjbraun merged commit a9e6f35 into main Mar 11, 2026
1 check passed
@mjbraun mjbraun deleted the awsv4-swapped-bug branch March 11, 2026 20: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.

2 participants