aws-elasticsearch-connector
aws-elasticsearch-connector copied to clipboard
Authentication fails on get requests #17
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!
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!
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.
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.