From 7551c4dc7f86bdba7186413b7331788504c4c303 Mon Sep 17 00:00:00 2001 From: James Rodewig <40268737+jrodewig@users.noreply.github.com> Date: Wed, 21 Oct 2020 09:44:48 -0400 Subject: [PATCH] [DOCS] Avoid trailing newline in apikey base64 encoding (#63720) (#64002) Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com> Co-authored-by: Jurgen Braam --- .../docs/en/rest-api/security/create-api-keys.asciidoc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/x-pack/docs/en/rest-api/security/create-api-keys.asciidoc b/x-pack/docs/en/rest-api/security/create-api-keys.asciidoc index b00921ffad7..81cb861d972 100644 --- a/x-pack/docs/en/rest-api/security/create-api-keys.asciidoc +++ b/x-pack/docs/en/rest-api/security/create-api-keys.asciidoc @@ -143,3 +143,12 @@ NOTE: If your node has `xpack.security.http.ssl.enabled` set to `true`, then you curl -H "Authorization: ApiKey VnVhQ2ZHY0JDZGJrUW0tZTVhT3g6dWkybHAyYXhUTm1zeWFrdzl0dk5udw==" http://localhost:9200/_cluster/health -------------------------------------------------- // NOTCONSOLE + +One way to create the _credentails_ from CLI on an Unix-like system is as the follows: + +[source,shell] +---- +# Please note the use of "-n" to instruct echo to not print the trailing newline character. +# It should return VnVhQ2ZHY0JDZGJrUW0tZTVhT3g6dWkybHAyYXhUTm1zeWFrdzl0dk5udw== +echo -n "VuaCfGcBCdbkQm-e5aOx:ui2lp2axTNmsyakw9tvNnw" | base64 +----