aws-elasticsearch-connector icon indicating copy to clipboard operation
aws-elasticsearch-connector copied to clipboard

Authentication fails on get requests #17

Open nkeating-mutualofenumclaw opened this issue 5 years ago • 7 comments

This fixes the signing header for elastic search requests, as the lowercase "host" header causes header size issues and invalidates the signing.

After diving further into this, I found that the lowercase host works, as long as there's not also an upper case host. I've modified the code to leave the lowercase host, but added a check for the uppercase Host and if present delete it from the object. This allows code that used the uppercase Host to still work

Tried this pr out as I was having similar authentication issues, and this fixed my problem. Thanks!

joshferrell avatar Jul 08 '20 02:07 joshferrell

This should not be the case if the correct version of @elastic/elasticsearch (>= 7.8.0) is being used. However this may help with backward compatibility. I guess I need to come up with a way to test this library with multiple versions of elasticsearch. Thanks for the PR and for your research into this bug!

compwright avatar Jul 09 '20 19:07 compwright

Is there anything more that's needed for this code to be merged?

@nkeating-mutualofenumclaw yes, need tests to confirm that it does indeed fix errors with older versions of elasticsearch, and doesn't break when used with the current version of elasticsearch.

compwright avatar Jul 15 '20 18:07 compwright

Is this something I need to do? It appears to work for myself and the other person on this thread. Not sure what the next steps should be.

@nkeating-mutualofenumclaw yes, please.

compwright avatar May 16 '22 19:05 compwright