elasticsearch/docs/java-rest/high-level/security/enroll_kibana.asciidoc
Ioannis Kakavas 82e7fbda53
Add the Enroll Kibana API (#72207)
This change adds the Enroll Kibana API that enables a Kibana instance to
configure itself to communicate with a secured elasticsearch cluster
2021-06-23 22:58:46 +03:00

47 lines
1.6 KiB
Text

--
:api: kibana-enrollment
:request: KibanaEnrollmentRequest
:response: KibanaEnrollmentResponse
--
[id="{upid}-{api}"]
=== Enroll Kibana API
Allows a kibana instance to configure itself to communicate with a secured {es} cluster.
include::../execution.asciidoc[]
[id="{upid}-{api}-response"]
==== Enroll Kibana Response
The returned +{response}+ allows to retrieve information about the
executed operation as follows:
["source","java",subs="attributes,callouts,macros"]
--------------------------------------------------
include-tagged::{doc-tests-file}[{api-kibana-response]
--------------------------------------------------
<1> The password for the `kibana_system` user
<2> The CA certificate that has signed the certificate that the cluster uses for TLS on the HTTP layer,
as a Base64 encoded string of the ASN.1 DER encoding of the certificate.
[id="{upid}-{api}-execute-async"]
==== Asynchronous Execution
This request can be executed asynchronously using the `security().enrollClientAsync()`
method:
["source","java",subs="attributes,callouts,macros"]
--------------------------------------------------
include-tagged::{doc-tests-file}[{api}-execute-async]
--------------------------------------------------
A typical listener for a `KibanaEnrollmentResponse` looks like:
["source","java",subs="attributes,callouts,macros"]
--------------------------------------------------
include-tagged::{doc-tests-file}[{api}-execute-listener]
--------------------------------------------------
<1> Called when the execution is successfully completed. The response is
provided as an argument
<2> Called in case of failure. The raised exception is provided as an argument