1

I have an elasticsearch instance hosted on elastic cloud through GCP using "Elastic Cloud (Elasticsearch managed service)".

I am trying to run elasticdump from npm to pull and push data, but I am having no luck. I am not positive I am connecting properly (the only way I have found that got me anywhere was to put one of the users username and password in the url, such as

https://<user>:<pass>@<urltoelastic>:<port>/<index>

Which finally didnt give me an unauthorized response, but I got back a dump of an html page that in short said:

Please upgrade your browser
This Kibana installation has strict security requirements enabled that your current browser does not meet.
Since this is an unsafe inline script, this code will not run in browsers that support content security policy(CSP). This is intentional as we check for the existence of __kbnCspNotEnforced__ in bootstrap.
window.__kbnCspNotEnforced__ = true;

Does anyone know what steps I need to take in order to get elasticdump to be able to connect to my hosted elasticsearch?

rriovall
  • 406
  • 3
  • 8
aescript
  • 1,775
  • 4
  • 20
  • 30
  • This is because elasticdump uses curl or equivalent (ie. not a browser) for querying elasticsearch index and the Kibana UI. This is an issue for Kibana when it uses a Content Security Policy to prevent the browser from running unsafe script. You can create an issue in elasticdump repo and ask for the implementation of headless browser that supports CSP. In the meantime, if you have access to kibana.yml, you can try to set `csp.strict: false` (whch is not recommended for security concerns obviously), or override the code involved in `elastic/kibana:src/core/server/rendering/views/template.tsx` – EricLavault Nov 24 '21 at 16:17
  • 1
    Make sure that elasticdump targets the elasticsearch instance not the kibana one. – Val Nov 25 '21 at 14:03

0 Answers0