From e2c6f4c8e96df4decd9ae44c5be0e75e3426eb0e Mon Sep 17 00:00:00 2001 From: aetter Date: Mon, 11 Oct 2021 11:04:59 -0700 Subject: [PATCH 1/2] Add Dashboards header for legacy Kibana OSS scripts --- _troubleshoot/index.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/_troubleshoot/index.md b/_troubleshoot/index.md index fc11a6b6..f4e5820c 100644 --- a/_troubleshoot/index.md +++ b/_troubleshoot/index.md @@ -16,6 +16,21 @@ This page contains a list of common issues and workarounds. If you encounter the error `FATAL Error: Request Timeout after 30000ms` during startup, try running OpenSearch Dashboards on a more powerful machine. We recommend four CPU cores and 8 GB of RAM. +## Requests to OpenSearch Dashboards fail with "Request must contain a osd-xsrf header" + +If you run legacy Kibana OSS scripts against OpenSearch Dashboards---for example, curl commands that import saved objects from a file---they might fail with the following error: + +```json +{"status": 400, "body": "Request must contain a osd-xsrf header."} +``` + +In this case, your scripts likely included the `"kbn-xsrf: true"` header. Switch it to the `osd-xsrf: true` header: + +``` +curl -XPOST -u 'admin:admin' 'https://DASHBOARDS_ENDPOINT/api/saved_objects/_import' -H 'osd-xsrf:true' --form file=@export.ndjson +``` + + ## Multi-tenancy issues in OpenSearch Dashboards If you're testing multiple users in OpenSearch Dashboards and encounter unexpected changes in tenant, use Google Chrome in an Incognito window or Firefox in a Private window. From b97b254678c0dd2404fa127291c977af0dfb6630 Mon Sep 17 00:00:00 2001 From: aetter Date: Mon, 11 Oct 2021 15:28:19 -0700 Subject: [PATCH 2/2] Present tense --- _troubleshoot/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_troubleshoot/index.md b/_troubleshoot/index.md index f4e5820c..681d0b63 100644 --- a/_troubleshoot/index.md +++ b/_troubleshoot/index.md @@ -24,7 +24,7 @@ If you run legacy Kibana OSS scripts against OpenSearch Dashboards---for example {"status": 400, "body": "Request must contain a osd-xsrf header."} ``` -In this case, your scripts likely included the `"kbn-xsrf: true"` header. Switch it to the `osd-xsrf: true` header: +In this case, your scripts likely include the `"kbn-xsrf: true"` header. Switch it to the `osd-xsrf: true` header: ``` curl -XPOST -u 'admin:admin' 'https://DASHBOARDS_ENDPOINT/api/saved_objects/_import' -H 'osd-xsrf:true' --form file=@export.ndjson