-
Notifications
You must be signed in to change notification settings - Fork 175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] AsyncOpenSearch Authorization Error When Using AWSV4SignerAsyncAuth #698
Comments
I don't see anything immediately obvious here - I have a working sample both sync and async in https://github.com/dblock/opensearch-python-client-demo, try running that one, and we can then narrow down the differences? It doesn't use |
I went through both the sync and async examples and simplified the calls to just make the Once again the sync session works, and the async session fails in the same way, with a 403. The only changes I made were to skip using urlparse, opting to just pass the host url directly, and removing calls other than ping()
vs.
One things I do notice with this is that the While that may be related to the issue I am having (permissions to make get requests vs head requests), it seems like undesired behavior for the package. also @dblock : in the async example |
I will double check and confirm the |
Update: turns out our security team locked down @dblock feel free to close this issue, unless you want to use it to track the different in behavior between the sync/async services. |
That is bizarre. I double checked my version and it shows 2.4.1. Although that is not the latest, the ping code in the async client has not been touched in 7 years (according to blame). Have you been able to run the async ping() and confirm that it calls |
@vcastane, you're right that the For the code causing this issue, see the links above. |
I'm glad we narrowed it down! Let's get the PR finished. |
What is the bug?
Generating an AsyncOpenSearch client with AWSV4SignerAsyncAuth/AsyncHttpConnection causes authorization errors despite valid credentials using an assumed session
How can one reproduce the bug?
Authorization differences can be seen when comparing a sync opensearch client to an async opensearch client:
Sync Opensearch:
This gets the expected
200
response and aTrue
When attempting to recreate the same behavior with the AsyncOpenSearch client as below:
I get the following error:
I believe I am using the various tooling correctly, but there appears to be a problem with the AsyncAuthSigner.
What is the expected behavior?
Async generated auths are valid, same as sync auths.
What is your host/environment?
Linux
version 2.4.2
Do you have any screenshots?
N/A
Do you have any additional context?
N/A
The text was updated successfully, but these errors were encountered: