Hi there,
I am using latest Elasticsearch and Kibana version through Elastic Cloud.
I wish to embed a Kibana dashboard into a HTML, but I seem to have encountered some problems.
I have tried the options to setup the NGINX headers.
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Host $proxy_add_x_forwarded_for;
proxy_set_header X-Found-Cluster <CLUSTER_ID>;
proxy_set_header Authorization "Bearer <API TOKEN>";
proxy_pass <KIBANA URL>;
With those settings, I get the error:
{"ok":false,"message":"Unknown resource."}
When I do not pass the Host
and X-Found-Cluster
proxy_headers, I get the following error:
{
"statusCode":401,
"error":"Unauthorized",
"message":"[security_exception] missing authentication credentials for REST request [/_security/_authenticate], with { header={ WWW-Authenticate={ 0=\"Basic realm=\\\"security\\\" charset=\\\"UTF-8\\\"\" & 1=\"Bearer realm=\\\"security\\\"\" & 2=\"ApiKey\" } } }"
}
The API Key was generated with the Python Elasticsearch SDK and the User that creates this API key is Superuser on Elasticsearch.
es_security = SecurityClient(es)
api_key = es_security.create_api_key({
"name": "my_api_key_name", # Normally dynamic, now hardcoded for demo
"role_descriptors": {
"superuser-role": {
"cluster": ["all"],
"index": [
{
"names": ["*"], # All indices to test
"privileges": ["all"] # All Privileges to test
}
]
}
}})
I am developping locally and I have no way to generate an SSL certificate for my local machines.
I found out there was a security option to allow an anonymous user, but I can't seem to get that setup in Elastic Cloud, which I am using now.
Is there any way to embed a whole Kibana Space without requiring a user login?