Skip to content
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

kibana 7.9.0 docker won't read elasticsearch.password from keystore #72323

Closed
LeeDr opened this issue Jul 17, 2020 · 3 comments · Fixed by #72954
Closed

kibana 7.9.0 docker won't read elasticsearch.password from keystore #72323

LeeDr opened this issue Jul 17, 2020 · 3 comments · Fixed by #72954
Assignees
Labels
blocker bug Fixes for quality problems that affect the customer experience regression Team:Operations Team label for Operations Team

Comments

@LeeDr
Copy link

LeeDr commented Jul 17, 2020

Kibana version: 7.9.0 (BC1 and BC2)

Elasticsearch version: 7.9.0 (BC1 and BC2)

Server OS version: docker

Browser version:

Browser OS version:

Original install method (e.g. download page, yum, from source, etc.): docker images

Describe the bug: If I put elasticsearch.password in the kibana.yml file kibana starts up fine. But using the keystore it fails to start with a message that seems to indicate it isn't getting the password from the keystore missing authentication credentials;

Steps to reproduce:

  1. my kibana.yml contains;
# Default Kibana configuration from kibana-docker.

server.name: kibana
server.host: "0"
elasticsearch.hosts: https://elasticsearch:9200
# elasticsearch.password is stored in `kibana.keystore`
elasticsearch.username: kibana
elasticsearch.ssl.certificateAuthorities: ["/certs/ssl/ca/ca.crt"]
server.ssl.enabled: false
#server.ssl.certificate: /certs/ssl/docker-cluster/kibana/kibana.crt
#server.ssl.key: /certs/ssl/docker-cluster/kibana/kibana.key
xpack.monitoring.ui.container.elasticsearch.enabled: true

# Point to the Telemetry Staging cluster
telemetry.url: https://telemetry-staging.elastic.co/xpack/v2/send
telemetry.optInStatusUrl: https://telemetry-staging.elastic.co/opt_in_status/v2/send
  1. a script creates the keystore and sets the elasticsearch.password like this;
echo "$ELASTIC_PASSWORD" | /usr/share/kibana/bin/kibana-keystore add 'elasticsearch.password' -x
  1. Those commands appear to work (no errors, expected output);
{}=== CREATE Keystore ===
Created Kibana keystore in /usr/share/kibana/config/kibana.keystore
Setting elasticsearch.password: ***********
  1. I can use keystore list and see that elasticsearch.password is in the keystore

Expected behavior: Kibana should use elasticsearch.password (or any parameters) from the keystore

Screenshots (if relevant):

Errors in browser console (if relevant):

Provide logs and/or server output (if relevant):

{"type":"log","@timestamp":"2020-07-17T17:28:33Z","tags":["warning","plugins","licensing"],"pid":6,"message":"License information could not be obtained from Elasticsearch due to [security_exception] missing authentication credentials for REST request [/_xpack], with { header={ WWW-Authenticate={ 0=\"Bearer realm=\\\"security\\\"\" & 1=\"ApiKey\" & 2=\"Basic realm=\\\"security\\\" charset=\\\"UTF-8\\\"\" } } } :: {\"path\":\"/_xpack\",\"statusCode\":401,\"response\":\"{\\\"error\\\":{\\\"root_cause\\\":[{\\\"type\\\":\\\"security_exception\\\",\\\"reason\\\":\\\"missing authentication credentials for REST request [/_xpack]\\\",\\\"header\\\":{\\\"WWW-Authenticate\\\":[\\\"Bearer realm=\\\\\\\"security\\\\\\\"\\\",\\\"ApiKey\\\",\\\"Basic realm=\\\\\\\"security\\\\\\\" charset=\\\\\\\"UTF-8\\\\\\\"\\\"]}}],\\\"type\\\":\\\"security_exception\\\",\\\"reason\\\":\\\"missing authentication credentials for REST request [/_xpack]\\\",\\\"header\\\":{\\\"WWW-Authenticate\\\":[\\\"Bearer realm=\\\\\\\"security\\\\\\\"\\\",\\\"ApiKey\\\",\\\"Basic realm=\\\\\\\"security\\\\\\\" charset=\\\\\\\"UTF-8\\\\\\\"\\\"]}},\\\"status\\\":401}\",\"wwwAuthenticateDirective\":\"Bearer realm=\\\"security\\\", ApiKey, Basic realm=\\\"security\\\" charset=\\\"UTF-8\\\"\"} error"}

Any additional context:

@LeeDr LeeDr added bug Fixes for quality problems that affect the customer experience Team:Operations Team label for Operations Team regression labels Jul 17, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-operations (Team:Operations)

@LeeDr LeeDr added the blocker label Jul 17, 2020
@LeeDr
Copy link
Author

LeeDr commented Jul 17, 2020

My same scripts using the keystore work on 7.8.1 so it is a new regression.

@LeeDr
Copy link
Author

LeeDr commented Jul 22, 2020

According to the PR that fixes this, it doesn't really have anything to do with it being the docker image.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocker bug Fixes for quality problems that affect the customer experience regression Team:Operations Team label for Operations Team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants