You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're using requests-auth-aws-sigv4 to sign requests for an Opensearch cluster. One common syntax for the api is to add ?v to the end of a url to get a verbose response. This seems to break when sigv4 signing the request.
INFO:console_link.models.cluster:Performing request: GET https://cluster-endpoint.com:443/_cat/indices/_all?v
DEBUG:requests_auth_aws_sigv4:Starting authentication with amzdate=20240924T032547Z
DEBUG:requests_auth_aws_sigv4:Request URL: ParseResult(scheme='https', netloc='cluster-endpoint.com:443', path='/_cat/indices/_all', params='', query='v', fragment='')
Traceback (most recent call last):
...
File "/root/lib/console_link/console_link/middleware/clusters.py", line 27, in cat_indices
r = cluster.call_api(cat_indices_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/lib/console_link/console_link/models/cluster.py", line 155, in call_api
r = session.request(
^^^^^^^^^^^^^^^^
File "/.venv/lib64/python3.11/site-packages/requests/sessions.py", line 575, in request
prep = self.prepare_request(req)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/.venv/lib64/python3.11/site-packages/requests/sessions.py", line 484, in prepare_request
p.prepare(
File "/.venv/lib64/python3.11/site-packages/requests/models.py", line 371, in prepare
self.prepare_auth(auth, url)
File "/.venv/lib64/python3.11/site-packages/requests/models.py", line 602, in prepare_auth
r = auth(self)
^^^^^^^^^^
File "/.venv/lib64/python3.11/site-packages/requests_auth_aws_sigv4/__init__.py", line 114, in __call__
qs = dict(map(lambda i: i.split('='), p.query.split('&')))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: dictionary update sequence element #0 has length 1; 2 is required
The signature succeeds if the query parameter is formatted with a value, e.g. https://cluster-endpoint.com:443/_cat/indices/_all?v=true
The text was updated successfully, but these errors were encountered:
We're using
requests-auth-aws-sigv4
to sign requests for an Opensearch cluster. One common syntax for the api is to add?v
to the end of a url to get a verbose response. This seems to break when sigv4 signing the request.The signature succeeds if the query parameter is formatted with a value, e.g.
https://cluster-endpoint.com:443/_cat/indices/_all?v=true
The text was updated successfully, but these errors were encountered: