I'm using Vagrant to test out some stuff with x-pack. I spin up my brand new ES, LS and Kibana 5.3.0 instance (everything on the same machine) and everything works as expected. I can reach Kibana, and ES normally
The issue is that when I install X-Pack on Kibana, X-Pack installs without any issues. Kibana shows the login form at http://localhost:5601/login?next=%2Fapp%2Fkibana#?_g=() as expected.
According to the install documentation , I should just be able to enter the L/P and get into Kibana to begin working with the X-Pack stuff
When I enter the default user and password (kibana or elastic/changeme), Kibana throws 401 errors all the time, every time.
{"statusCode":401,"error":"Unauthorized","message":"[security_exception] missing authentication token for REST request [/_xpack/security/_authenticate], with { header={ WWW-Authenticate=\"Basic realm=\\\"security\\\" charset=\\\"UTF-8\\\"\" } } :: {\"path\":\"/_xpack/security/_authenticate\",\"query\":{},\"statusCode\":401,\"response\":\"{\\\"error\\\":{\\\"root_cause\\\":[{\\\"type\\\":\\\"security_exception\\\",\\\"reason\\\":\\\"missing authentication token for REST request [/_xpack/security/_authenticate]\\\",\\\"header\\\":{\\\"WWW-Authenticate\\\":\\\"Basic realm=\\\\\\\"security\\\\\\\" charset=\\\\\\\"UTF-8\\\\\\\"\\\"}}],\\\"type\\\":\\\"security_exception\\\",\\\"reason\\\":\\\"missing authentication token for REST request [/_xpack/security/_authenticate]\\\",\\\"header\\\":{\\\"WWW-Authenticate\\\":\\\"Basic realm=\\\\\\\"security\\\\\\\" charset=\\\\\\\"UTF-8\\\\\\\"\\\"}},\\\"status\\\":401}\",\"wwwAuthenticateDirective\":\"Basic realm=\\\"security\\\" charset=\\\"UTF-8\\\"\"}"}
I've also used Firefox, where I've added the Authentication header and the username/password hash to the POST and I still get the error.
Request
Host: localhost:5601
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0
Accept: application/json, text/plain, /
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Content-Type: application/json;charset=utf-8
kbn-version: 5.3.0
Referer: http://localhost:5601/login?next=%2Fapp%2Fkibana
Content-Length: 44
Cookie: _ga=GA1.1.1402432993.1453231728
Connection: keep-alive
Authorization: Basic ZWxhc3RpYzpjaGFuZ2VtZQ==
Pragma: no-cache
Cache-Control: no-cache
Response
Cache-Control: no-cache
Connection: keep-alive
Content-Encoding: gzip
Content-Type: application/json; charset=utf-8
Date: Tue, 11 Apr 2017 20:05:48 GMT
Set-Cookie: sid=; Max-Age=0; Expires=Thu, 01 Jan 1970 00:00:00 GMT; HttpOnly; Path=/
Transfer-Encoding: chunked
Vary: accept-encoding
kbn-name: kibana
kbn-version: 5.3.0
kbn-xpack-sig: 2ca3dcb0a4b1eda3162b117e55246ab1
The kicker is that Elasticsearch works as expected, I add Basic Auth with the default elastic/changeme username/password combination to Postman and
localhost:9200/_xpack/
{
"build": {
"hash": "f14da62",
"date": "2017-03-23T03:59:37.018Z"
},
"license": {
"uid": "f788db41-2f17-45a5-980e-21614d4b596c",
"type": "trial",
"mode": "trial",
"status": "active",
"expiry_date_in_millis": 1494529614174
},
"features": {
"graph": {
"description": "Graph Data Exploration for the Elastic Stack",
"available": true,
"enabled": true
},
"monitoring": {
"description": "Monitoring for the Elastic Stack",
"available": true,
"enabled": true
},
"security": {
"description": "Security for the Elastic Stack",
"available": true,
"enabled": true
},
"watcher": {
"description": "Alerting, Notification and Automation for the Elastic Stack",
"available": true,
"enabled": true
}
},
"tagline": "You know, for X"
}
Vagrant file:
Vagrant.configure('2') do |config|
config.vm.box = 'ubuntu/trusty64'
config.vm.hostname = 'elasticsearch'
config.vm.provider :virtualbox do |v, override|
v.customize ['modifyvm', :id, '--natdnshostresolver1', 'on']
v.customize ['modifyvm', :id, '--natdnsproxy1', 'on']
v.customize ['modifyvm', :id, "--memory", 4096]
v.customize ['modifyvm', :id, '--name', 'elasticsearch']
end
config.vm.network 'private_network', ip: "10.0.2.15"
#Elasticsearch
config.vm.network :forwarded_port, guest: 9200, host: 9200, protocol: 'tcp' # REST
config.vm.network :forwarded_port, guest: 9300, host: 9300, protocol: 'tcp' # Java connector
#Kibana
config.vm.network :forwarded_port, guest: 5601, host: 5601, protocol: 'tcp' # Kibana
config.ssh.forward_agent = true
end
Why would this work without X-Pack then stop working with it?