-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
Authentication fails on get requests #17 #18
base: master
Are you sure you want to change the base?
Authentication fails on get requests #17 #18
Conversation
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. |
This fixes the signing header for elastic search requests, as the lowercase "host" header causes header size issues and invalidates the signing.