Open Danipulok opened 1 month ago
Do other requests against an AWS instance work, aka if the ID doesn't have a special character in it?
Let's narrow it down.
curl
or awscurl
and make sure that works, some examples in https://code.dblock.org/2022/07/11/making-sigv4-authenticated-requests-to-managed-opensearch.html. I'm seeing the same bug happen, only when using AWSV4SignerAsyncAuth
@fabiopedrosa thanks a lot for the comment, could not find a time for the asked code. So when "AsyncHttpConnection" is not used everything's good?
I narrowed down the bug to this line in helpers\asyncsigner.py
, the URL needs to be signed before encoding its URL-entities:
from urllib.parse import unquote
aws_request = AWSRequest(
method=method,
url=unquote(url),
data=body,
)
I've created a PR for this issue to be fixed
[Catch All Triage - 1, 2]
@nathaliellenaa want to take this?
Sure, I can take this one!
What is the bug?
AWS + special characters in 'id' result in:
How can one reproduce the bug?
What is the expected behavior?
When using localhost openseach run via docker everything's okay. So I guess there's a problem with
AWSV4SignerAsyncAuth
somewhereWhat is your host/environment?
Win10 Python 3.12.3 opensearch-py==2.7.0 boto3==1.35.2
Do you have any additional context?
Maybe it's a bug in
boto3.Session
? If yes, please tell me, I will open the issue there. And I consider this as an issue at all since with non-aws and localhost everything's okay. With all other ID like "foo" everything's okay with the same code, so it's not a credentials problem