-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Streamline experience when loading dashboards from modules #8032
Comments
@guyboertje FYI, this is what we're doing on the Beats side: elastic/beats#4964 |
@tsg - Thank you. |
@suyograo - Can I suggest that we namespace |
@suyograo - is it an error to have only one of the pair [id, auth]? |
Yes, we can do that.
Yes. |
I initially did the same, but later during the work I decided to allow |
Coded as @tsg suggested ^. |
Pull here: #8059 |
Closed with #8059 |
We should make it easier to use modules with Elastic cloud, especially when there are multiple URLs (Kibana and ES) and credentials involved as in the cloud case.
To this end, we should add 2 extra flags for the CLI:
cloud.id
is of the form: $HOST$ES_UUID$KIB_UUID` in base64 encoded form.When this is specified, here's what we do:
$
delimiter, and then construct the Kibana and ES URL from that. The port for cloud will always be9243
for both ES and Kibana endpoints.var.elasticsearch.host
variable. it will also overwritevar.elasticsearch.password
andvar.elasticsearch.username
usingcloud-auth
.Decoding algorithm
From @tsg (elastic/beats#4959)
The cloud-id, to be passed to the
--cloud.id
flag, looks something like this:staging:dXMtZWFzdC0xLmF3cy5mb3VuZC5pbyRjZWM2ZjI2MWE3NGJmMjRjZTMzYmI4ODExYjg0Mjk0ZiRjNmMyY2E2ZDA0MjI0OWFmMGNjN2Q3YTllOTYyNTc0Mw==
This can be decomposed using the following algorithm:
Everything up to the first
:
is ignored. This is an optional user friendly token that can be used to more easily identify the cloud ID. If no:
is present, then the IS is passed as is to the next step.The rest of the ID is base64 decoded:
us-east-1.aws.found.io$cec6f261a74bf24ce33bb8811b84294f$c6c2ca6d042249af0cc7d7a9e9625743
There are three parts, separated by
$
, in order:host:
us-east-1.aws.found.io
es-id:
cec6f261a74bf24ce33bb8811b84294f
kibana-id:
c6c2ca6d042249af0cc7d7a9e9625743
The
es-id
andkibana-id
are parsed as URLs, andhost
is appended to their host parts. Thehttps
scheme and port443
are added:es-url:
https://cec6f261a74bf24ce33bb8811b84294f.us-east-1.aws.found.io:443
kibana-url:
https://c6c2ca6d042249af0cc7d7a9e9625743.us-east-1.aws.found.io:443
The resulting
es-url
andkibana-url
are used to overwrite the settingsvar.elasticsearch.host
andvar.kibana.host
The text was updated successfully, but these errors were encountered: