Open
Description
When trying to perform elastic search queries with the latest version 9.0.0, the IAM authentication fails with the message "The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details."
After troubleshooting, I found that if I used version 8.1.3 the authentication with IAM works successfully. Somewhere between 8.1.3 and 9.0.0 the authentication broke for IAM
Activity
nkeating-mutualofenumclaw commentedon Jul 7, 2020
The problem appears to be in
AmazonConnection.js line 17: req.headers.host = req.hostname
It appears to work if changed to: req.headers.Host = req.hostname
jpadhye commentedon Jul 7, 2020
Encountered same issue.
compwright commentedon Jul 9, 2020
@nkeating-mutualofenumclaw @elastic/elasticsearch changed how headers work internally in v7.7.1. Which version are you using? Does v9 work if you upgrade to the latest version of @elastic/elasticsearch?
compwright commentedon Jul 9, 2020
Also FYI this dependency is noted in package.json:
So you should get a warning from NPM if you're running @elastic/elasticsearch < 7.8.
fimbulvetr commentedon Jul 10, 2020
I am getting the same error. We are running
As we are running AWS ES @ 6.8, the documentation for the elasticsearch client says we should run 6.8 client version if we are using 6.8 server version, so we cannot upgrade to client version 7.8 ( See https://github.com/elastic/elasticsearch-js#compatibility ); Therefore, the solution of using the latest
@elastic/elasticsearch
is not an option for us.Thanks
dobrynin commentedon Jul 14, 2020
@compwright perhaps you should deprecate v8.3.0 as it was a breaking change.
jimmone commentedon Oct 19, 2020
I am getting authorization error aswell even when using AdministratorAccess policy:
User: <arn> is not authorized to perform: es:ESHttpPost
I am using the following versions: