Skip to content

Refactor AWSSigV4 auth to support different AWSCredentialProviders - #1389

Merged
vamsimanohar merged 2 commits into
opensearch-project:2.xfrom
vamsimanohar:refactor-sigv4-auth
Mar 3, 2023
Merged

vamsimanohar merged 2 commits into
opensearch-project:2.xfrom
vamsimanohar:refactor-sigv4-auth

Conversation

@vamsimanohar

@vamsimanohar vamsimanohar commented Mar 3, 2023 •

Copy link
Copy Markdown
Member

Description

Refactored sigv4auth support to use credential Providers.

Check List

  • New functionality includes testing.
    • All tests pass, including unit test, integration test and doctest
  • New functionality has been documented.
    • New functionality has javadoc added
    • New functionality has user manual doc added
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@vamsimanohar
vamsimanohar requested a review from a team as a code owner March 3, 2023 01:17
anirudha
anirudha previously approved these changes Mar 3, 2023
kavithacm
kavithacm previously approved these changes Mar 3, 2023
@codecov-commenter

codecov-commenter commented Mar 3, 2023 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.38%. Comparing base (a32bcbe) to head (56b32fa).
⚠️ Report is 398 commits behind head on 2.x.

Additional details and impacted files
@@            Coverage Diff            @@
##                2.x    #1389   +/-   ##
=========================================
  Coverage     98.38%   98.38%           
- Complexity     3698     3699    +1     
=========================================
  Files           345      345           
  Lines          9113     9119    +6     
  Branches        585      586    +1     
=========================================
+ Hits           8966     8972    +6     
  Misses          142      142           
  Partials          5        5           
Flag Coverage Δ
sql-engine 98.38% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment on lines +67 to +69
LOG.info(awsCredentialsProvider.getClass());
LOG.info("Access Key: {}", awsCredentials.getAWSAccessKeyId());
LOG.info("Secret Key: {}", awsCredentials.getAWSSecretKey());

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.

Are you sure that you want to log your passwords as plain text?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Thanks for pointing out...I was splitting a big PR and left these lines.

@vamsimanohar
vamsimanohar dismissed stale reviews from kavithacm and anirudha via a34ceec March 3, 2023 02:25
@vamsimanohar
vamsimanohar force-pushed the refactor-sigv4-auth branch 2 times, most recently from a34ceec to a8dcece Compare March 3, 2023 02:28
@vamsimanohar
vamsimanohar force-pushed the refactor-sigv4-auth branch from a8dcece to 93a82a8 Compare March 3, 2023 02:35
@vamsimanohar vamsimanohar self-assigned this Mar 3, 2023
@vamsimanohar vamsimanohar added backport main maintenance Improves code quality, but not the product labels Mar 3, 2023
@vamsimanohar
vamsimanohar merged commit 8583fd1 into opensearch-project:2.x Mar 3, 2023
opensearch-trigger-bot Bot pushed a commit that referenced this pull request Mar 3, 2023
…1389)

* Refactor AWSSigV4 auth to support different AWSCredentialProviders

Signed-off-by: Vamsi Manohar <[email protected]>

* Added unit tests for sts assume role credentials provider

Signed-off-by: Vamsi Manohar <[email protected]>

---------

Signed-off-by: Vamsi Manohar <[email protected]>
(cherry picked from commit 8583fd1)
vamsimanohar added a commit that referenced this pull request Mar 7, 2023
…1389)

* Refactor AWSSigV4 auth to support different AWSCredentialProviders

Signed-off-by: Vamsi Manohar <[email protected]>

* Added unit tests for sts assume role credentials provider

Signed-off-by: Vamsi Manohar <[email protected]>

---------

Signed-off-by: Vamsi Manohar <[email protected]>
(cherry picked from commit 8583fd1)
vamsimanohar added a commit that referenced this pull request Mar 7, 2023
…1389) (#1396)

* Refactor AWSSigV4 auth to support different AWSCredentialProviders

Signed-off-by: Vamsi Manohar <[email protected]>

* Added unit tests for sts assume role credentials provider

Signed-off-by: Vamsi Manohar <[email protected]>

---------

Signed-off-by: Vamsi Manohar <[email protected]>
(cherry picked from commit 8583fd1)

Co-authored-by: vamsi-amazon <[email protected]>
matthewryanwells pushed a commit to Bit-Quill/opensearch-project-sql that referenced this pull request Mar 10, 2023
…pensearch-project#1389) (opensearch-project#1396)

* Refactor AWSSigV4 auth to support different AWSCredentialProviders

Signed-off-by: Vamsi Manohar <[email protected]>

* Added unit tests for sts assume role credentials provider

Signed-off-by: Vamsi Manohar <[email protected]>

---------

Signed-off-by: Vamsi Manohar <[email protected]>
(cherry picked from commit 8583fd1)

Co-authored-by: vamsi-amazon <[email protected]>
Signed-off-by: Matthew Wells <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport main maintenance Improves code quality, but not the product

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants