Skip to content

Conversation

@gosar
Copy link
Contributor

@gosar gosar commented Oct 16, 2023

Motivation and Context

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.

Modifications

*Remove derived attribute logic for PRESIGNER_EXPIRATION
*Also, update S3PresignerTest to assert isEqualTo instead of isCloseTo and remove unnecessary override

Testing

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

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
@gosar gosar requested a review from a team as a code owner October 16, 2023 21:35
@gosar gosar requested a review from millems October 16, 2023 21:37
@gosar gosar enabled auto-merge (squash) October 17, 2023 21:04
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 16 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@gosar gosar merged commit 5f0f441 into feature/master/sra-identity-auth-testing Oct 17, 2023
@gosar gosar deleted the gosar/sra-ia-s3presigner-isCloseTo branch October 17, 2023 21:36
sugmanue pushed a commit that referenced this pull request Oct 31, 2023
* 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
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