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
While attempting to sign a request to ElasticSearch in which a document id contained a "/" an incorrect signature was produced, resulting in the call to fail.
@markbastian Sorry for late response. We've retired this library from internal use so it doesn't get actively monitored. That said, I'd be happy to take a PR and have a look at the test failure. Can you open?
While attempting to sign a request to ElasticSearch in which a document id contained a "/" an incorrect signature was produced, resulting in the call to fail.
The failed case looked like so:
https://search-my-es-domain.us-east-1.es.amazonaws.com/index/_doc/foo%2Fbar
The "foo%2Fbar" id is the correct url encoding of the document with internal ElasticSearch id of "foo/bar".
Per This document from Amazon the correct behavior is that "Each path segment must be URI-encoded twice."
This means the canonical-url should encode the above id as "foo%252Fbar" with a canonical uri of:
I was able to get my request to succeed with the following code changes to
aws-sig4.auth/canonical-uri
and I believe this is a more correct solution:I attempted to create a PR but certain test fail, including the following path "/%20/foo". However, I am unsure if the test is correct.
The text was updated successfully, but these errors were encountered: