Enroll Kibana using the Elasticsearch "_security/enroll/kibana" API

Hi,
I am generating an enrollment token using
curl -k https://username:password@address:9200/_security/enroll/kibana

Now, If I am using the token in Kibana enrollment token pagafter starting, am getting error as:-

Enter a valid enrollment token.

I am using docker for running both elasticsearch and kibana on separate VMs.

thanks.

Hi,
Did you mean you are generating an enrollment token to use in Kibana using the bin/elasticsearch-create-enrollment-token command?

If so, the command would look like:

bin/elasticsearch-create-enrollment-token -s kibana

Do I understand that your enrollment workflow only work when using curl, but not when you are using Kibana in the browser?

When using curl, does the connection go directly to a local instance in Docker? If so, does the curl command also work if you use the same hostname you're using in the browser?

hi @tsullivan ,
I am not using bin/elasticsearch-create-enrollment-token -s kibana for enrollment token.
I am trying to generate enrollment token using this api curl -k https://username:password@address:9200/_security/enroll/kibana

Am getting this as a response:-

{"token":{"name":"enroll-process-token-1689217091241","value":"AAEAAWVsYXN0aWMva2liYW5hL2Vucm9sbC1wcm9jZXNzLXRva2VuLTE2ODkyMTcwOTEyNDE6RXRpYkRBNkRRQ2FaT0JXZWtKR3c5QQ"},"http_ca":"MIIFWTCCA0GgAwIBAgIUGfvqxF0PgFt/9atGGNguFDjNCgkwDQYJKoZIhvcNAQELBQAwPDE6MDgGA1UEAxMxRWxhc3RpY3NlYXJjaCBzZWN1cml0eSBhdXRvLWNvbmZpZ3VyYXRpb24gSFRUUCBDQTAeFw0yMzA3MTMwMjU3MjhaFw0yNjA3MTIwMjU3MjhaMDwxOjA4BgNVBAMTMUVsYXN0aWNzZWFyY2ggc2VjdXJpdHkgYXV0by1jb25maWd1cmF0aW9uIEhUVFAgQ0EwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQClQaMDSR09KfyyBopU/aDNNBsOnKN7JpMV7OyXxZo2Zn2C6NCrPKOEtgjTELl2HpURFsmYoXmiec9MZk08mYZYFWTA6KJkAnx1Z3gssyVmwh6k6ETkUE0bvEX8/oBxZu9/QMQrz6cEFKNd4qE6BGlFDgUUcaMEYwOq4sV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N7Of+G0zDl6UobPr+ByUEqzJ/yPDHH2n3TbwN3FyzWfiQR8Nwjxo73yeGmCGtZtRtvP4xCi5aPof+xgoJT+jxRp123bhQxtL1R+JH}

And when I am pasting this token value in the kibana page, then I get invalid token.
Is the API `_security/enroll/kibana`` not used for enrolling kibana?
Please enlighten me If I am missing something.

thanks

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.