Methods to Enroll Kibana

Hi there,
Is there a way to enroll kibana other than the mentioned 2 below:-

  1. bin/elasticsearch-create-enrollment-token
  2. copy the enrollment token from the elasticsearch stdout

Note: I am using docker to deploy these two.

But the issue is, due to some reasons I cannot use both these 2 methods.
Is there any other method to get the enrollment token through API.
I tried with Kibana enroll API but it's not working.

Also Can I set the password for the kibana_system manually by sttting some env variables to get to the login page of kibana UI.

thanks

Is there any other method to get the enrollment token through API.

bin/elasticsearch-create-enrollment-token uses an HTTP connection to connect to the cluster to submit API requests to Elasticsearch. Since using the default connection doesn't work for you, you could also use the command from any other Elasticsearch directory and pass the --url parameter to specify the base URL that the tool uses. This command does not have to be run in docker or in the local node:

bin/elasticsearch-create-enrollment-token -s kibana --url "https://my_deployment:9200"

Can I set the password for the kibana_system manually by sttting some env variables to get to the login page of kibana UI.

You can set the elastic user's password using the ELASTIC_PASSWORD environment variable, which bootstraps the elastic password. Then, you can use a curl command authenticated by the elastic user to set the password of the kibana_system user.

Hi @tsullivan ,
The thing is due to some reason I do not have access to the docker container directories.
This is why I am trying to use kibana enroll API _security/enroll/kibana to generate enrollment token.
Is this possible?

You can download Elasticsearch to your workstation to access the bin/elasticsearch-create-enrollment-token. command. Run the command from your workstation using the --url flag, and you won't have to access the Docker container directories.

Thanks for the suggestion @tsullivan but It does not fit my use-case.
Just want to know if the enrollment can be done using /_security/enroll/kibana Enroll Kibana API | Elasticsearch Guide [8.8] | Elastic
Please throw some light on this.

Thanks

Hi @ANUBHAV_GUPTA , as it says in the documentation you've linked to, that API is intended for internal use only by Kibana. Because of that, you should not call it directly in your workflow.

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