Skip to content

[Feature] Adjusts request signing timestamps - #3906

Open
kai-ion wants to merge 1 commit into
mainfrom
timechange
Open

[Feature] Adjusts request signing timestamps #3906
kai-ion wants to merge 1 commit into
mainfrom
timechange

Conversation

@kai-ion

@kai-ion kai-ion commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

Issue #, if available:

Description of changes:
Wire clock-skew correction into the legacy and smithy client pipelines

Check all that applies:

  • Did a review by yourself.
  • Added proper tests to cover this PR. (If tests are not applicable, explain.)
  • Checked if this PR is a breaking (APIs have been changed) change.
  • Checked if this PR will not introduce cross-platform inconsistent behavior.
  • Checked if this PR would require a ReadMe/Wiki update.

Check which platforms you have built SDK on to verify the correctness of this PR.

  • Linux
  • Windows
  • Android
  • MacOS
  • IOS
  • Other Platforms

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

@kai-ion
kai-ion force-pushed the timechange branch 3 times, most recently from 1b3f4d1 to 969f1d6 Compare August 31, 2026 19:25
@kai-ion
kai-ion marked this pull request as ready for review August 31, 2026 20:08
@@ -138,6 +134,7 @@ AWSClient::AWSClient(const Aws::Client::ClientConfiguration& configuration,
m_hash(Aws::Utils::Crypto::CreateMD5Implementation()),
m_requestTimeoutMs(configuration.requestTimeoutMs),
m_enableClockSkewAdjustment(configuration.enableClockSkewAdjustment),
m_clientSkew(Aws::MakeShared<Aws::Internal::ClientSkew>(AWS_CLIENT_LOG_TAG, std::chrono::milliseconds(0))),

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why does it need to be a a shared pointer, why cant it just be a stack variable?

@@ -320,6 +309,10 @@ HttpResponseOutcome AWSClient::AttemptExhaustively(const Aws::Http::URI& uri,
{TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}});
if (outcome.IsSuccess())
{
if (m_enableClockSkewAdjustment && outcome.GetResult())

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are we only measuring clockskew if the result is success? wouldnt we also want to measure for failures?


// A MockAWSClient whose error responses carry a service error code via the x-amzn-errortype header
// (the header a JSON error marshaller reads), so a clock-skew retry can be exercised end to end.
class ClockSkewMockAWSClient : public MockAWSClient

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do you need this in addition to mock aws client? why do you need to override BuildAWSError when supplying a expected response to a public API is how that class is supposed to be used?

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