* 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]>
23 lines
521 B
Markdown
23 lines
521 B
Markdown
## 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}
|
|
```
|