Skip to content

Conversation

@zoewangg
Copy link
Contributor

@zoewangg zoewangg commented Sep 26, 2023

Motivation and Context

TIME_OFFSET attribute is required to determine if an exception is clockskew exception or not when the SDK unmarshalls the error, eg: https://github.com/aws/aws-sdk-java-v2/blob/master/core/protocols/aws-json-protocol/src/main/java/software/amazon/awssdk/protocols/json/internal/unmarshall/AwsJsonProtocolErrorUnmarshaller.java#L86. W/o TIME_OFFSET, clockskew error is not retried.

Modifications

Set TIME_OFFSET attribtue in SRA signind methods

Testing

Updated existing tests and verified integ tests passed with this change

Screenshots (if appropriate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist

  • I have read the CONTRIBUTING document
  • Local run of mvn install succeeds
  • My code follows the code style of this project
  • My change requires a change to the Javadoc documentation
  • I have updated the Javadoc documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed
  • I have added a changelog entry. Adding a new entry must be accomplished by running the scripts/new-change script and following the instructions. Commit the new file created by the script in .changes/next-release with your changes.
  • My change is to implement 1.11 parity feature and I have updated LaunchChangelog

License

  • I confirm that this pull request can be released under the Apache 2 license

@zoewangg zoewangg requested a review from a team as a code owner September 26, 2023 17:02
@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

Bug C 4 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot E 2 Security Hotspots
Code Smell A 440 Code Smells

84.8% 84.8% Coverage
3.8% 3.8% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

@zoewangg zoewangg merged commit 66f79ff into feature/master/sra-identity-auth Sep 26, 2023
@zoewangg zoewangg deleted the zoewang/fixClockSkew branch September 26, 2023 19:26
sugmanue added a commit that referenced this pull request Nov 6, 2023
* Set TIME_OFFSET attribtue in SRA signin methods (#4483)

* Verify that execution attributes set by old interceptors can be read by new signers. (#4494)

* Move S3Presigner fully to SRA with HttpSigner (#4569)

* Remove derived attribute logic for PRESIGNER_EXPIRATION (#4602)

* Remove derived attribute logic for PRESIGNER_EXPIRATION

Because of the 2 instant() calls in the write/read mappings, a basic
write this attribute and read it back, would give different values.

Since this attribute should only be set/read explicitly by our
presigner code, we don't need this mapping logic at all.

Also, update S3PresignerTest to assert isEqualTo instead of isCloseTo
and remove unnecessary override

* Remove PRESIGNER_EXPIRATION mirroring test

* Enable SRA Auth for S3

* Make follow up changes from PR 4396 (#4454)

* Make SigingStage updates similar to AsyncSigningStage.
* Simplify (Async)SigningStageTests based on updated logic.
* Minor typos

* If authType=none don't use the old signer, even if overridden  (#4523)

* Add authType=none tests to AwsExecutionContentBuilderTest

Some of these tests are failing. Will fix them in next commit

* If authType=none don't use the old signer, even if overridden

* Update signing stage logic for authType=none

* Add asserts on identity resolution for authType=none

* Add a missing http-auth-aws dependecy to aws-core

* Add a changelog entry

---------

Co-authored-by: Zoe Wang <[email protected]>
Co-authored-by: Matthew Miller <[email protected]>
Co-authored-by: Jaykumar Gosar <[email protected]>
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