Skip to content

Conversation

@rcoh
Copy link
Collaborator

@rcoh rcoh commented Nov 14, 2025

Motivation and Context

#4397

The SigV4 support for event streams did not unframe the message before trying to read the initial event. This mean that if an initial event was sent, it ended up going to the unmarshaller where it subsequently caused an error.

Description

The previous attempt at this wrapped the Unmarshaller with a SigV4Unmarshaller. This didn't quite work in practice.

Previously, SigV4 support worked by transforming the receiver type:

Receiver<T, E> → Receiver<SignedEvent<T>, SignedEventError<E>>

This approach had a fundamental flaw: the receiver's internal buffering logic didn't understand SigV4 envelopes. When it buffered a message, it would buffer the unwrapped inner message, losing the signature.

The new design introduces SigV4Receiver<T, E> as a wrapper around Receiver<SignedEvent<T>, SignedEventError<E>>.

This allows us to both capture the initial message signature (which will be required to actually verify it) as well as providing a clean place to handle the details.

This also meant that I could back out all the previous customization changes, so those are now deleted.

Testing

The tests were cleaned up. Most were moved to a rstest to handle all the individual test behaviors.

Checklist

  • For changes to the smithy-rs codegen or runtime crates, I have created a changelog entry Markdown file in the .changelog directory, specifying "client," "server," or both in the applies_to key.
  • For changes to the AWS SDK, generated SDK code, or SDK runtime crates, I have created a changelog entry Markdown file in the .changelog directory, specifying "aws-sdk-rust" in the applies_to key.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@rcoh rcoh requested review from a team as code owners November 14, 2025 21:35
@github-actions
Copy link

A new generated diff is ready to view.

A new doc preview is ready to view.

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