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
This commit is contained in:
Ioannis Kakavas 2021-06-23 22:58:46 +03:00 committed by GitHub
parent 00a1ae1b04
commit 82e7fbda53
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
31 changed files with 927 additions and 23 deletions

View file

@ -0,0 +1,47 @@
--
: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