forked from opensearch-project/opensearch-py
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support for AWS Sigv4 for UrlLib3. (opensearch-project#547)
* WIP: Added support for AWS Sigv4 for UrlLib3. Signed-off-by: dblock <[email protected]> * Refactored common implementation. Signed-off-by: dblock <[email protected]> * Added sigv4 samples. Signed-off-by: dblock <[email protected]> * Updated CHANGELOG. Signed-off-by: dblock <[email protected]> * Add documentation. Signed-off-by: dblock <[email protected]> * Use the correct class in tests. Signed-off-by: dblock <[email protected]> * Renamed samples. Signed-off-by: dblock <[email protected]> * Split up requests and urllib3 unit tests. Signed-off-by: dblock <[email protected]> * Rename AWSV4Signer. Signed-off-by: dblock <[email protected]> * Clarified documentation of when to use Urllib3AWSV4SignerAuth vs. RequestHttpConnection. Signed-off-by: dblock <[email protected]> * Move fetch_url inside the signer class. Signed-off-by: dblock <[email protected]> * Added unit test for Urllib3AWSV4SignerAuth adding headers. Signed-off-by: dblock <[email protected]> * Added unit test for signing to include query string. Signed-off-by: dblock <[email protected]> --------- Signed-off-by: dblock <[email protected]> Signed-off-by: roma2023 <[email protected]>
- Loading branch information
Showing
19 changed files
with
1,677 additions
and
1,766 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
## AWS SigV4 Samples | ||
|
||
Create an OpenSearch domain in (AWS) which support IAM based AuthN/AuthZ. | ||
|
||
``` | ||
export AWS_ACCESS_KEY_ID= | ||
export AWS_SECRET_ACCESS_KEY= | ||
export AWS_SESSION_TOKEN= | ||
export AWS_REGION=us-west-2 | ||
export SERVICE=es # use "aoss" for OpenSearch Serverless. | ||
export ENDPOINT=https://....us-west-2.es.amazonaws.com | ||
poetry run aws/search-urllib.py | ||
``` | ||
|
||
This will output the version of OpenSearch and a search result. | ||
|
||
``` | ||
opensearch: 2.3.0 | ||
{'director': 'Bennett Miller', 'title': 'Moneyball', 'year': 2011} | ||
``` |
Oops, something went wrong.