I've used exactly this configuration, but I have observed something weird:
* When I launch Elasticsearch and Kibana from scratch, and I try to see the dashboard, I see:
-------------
Error: no permissions for [indices:data/write/update] and User [name=sg_anonymous, roles=[sg_anonymous_backendrole], requestedTenant=null]: [security_exception] no permissions for [indices:data/write/update] and User [name=sg_anonymous, roles=[sg_anonymous_backendrole], requestedTenant=null]
value/<@http://localhost:5601/bundles/kibana.bundle.js?v=16397:16:214022
processQueue@http://localhost:5601/bundles/commons.bundle.js?v=16397:35:132456
scheduleProcessQueue/<@http://localhost:5601/bundles/commons.bundle.js?v=16397:35:133349
$digest@http://localhost:5601/bundles/commons.bundle.js?v=16397:35:144239
$apply@http://localhost:5601/bundles/commons.bundle.js?v=16397:35:147007
done@http://localhost:5601/bundles/commons.bundle.js?v=16397:35:100015
completeRequest@http://localhost:5601/bundles/commons.bundle.js?v=16397:35:104697
createHttpBackend/</xhr.onload@http://localhost:5601/bundles/commons.bundle.js?v=16397:35:105435
----------
for each of the indexes in the dashboard.
But if I comment out the line I included in kibana.yml:
#searchguard.basicauth.enabled: false
and launch Kibana again, I get the login form, then I log in with admin/admin, and I see (as expected) the dashboard. The curious think is that now, if I logout, remove the above comment (leaving the line), and relaunch Kibana, now I can see the dashboard, with no error message. Now, everything works as expected.
Any clue about this?
Just in case it matters, I've observed that when I launch Kibana from the command line for the second time (with the line commented out), I get the following message after authenticating:
------------
request [12:19:52.824] [error][uncaught] { name: 'Error',
message: '[index_not_found_exception] no such index, with { resource.type="index_expression" &
resource.id="_searchguard" & index_uuid="_na_" & index="_searchguard" }',
stack: '[index_not_found_exception] no such index, with { resource.type="index_expression" &
resource.id="_searchguard" & index_uuid="_na_" & index="_searchguard" } :: {"path":"/_searchguard/api/permissionsinfo","query":{},"statusCode":404,"response":"{\\"error\\":{\\"root_cause\\":[{\\"type\\":\\"index_not_found_exception\\",\\"reason\\":\\"no such index\\",\\"resource.type\\":\\"index_expression\\",\\"
resource.id\\":\\"_searchguard\\",\\"index_uuid\\":\\"_na_\\",\\"index\\":\\"_searchguard\\"}],\\"type\\":\\"index_not_found_exception\\",\\"reason\\":\\"no such index\\",\\"resource.type\\":\\"index_expression\\",\\"
resource.id\\":\\"_searchguard\\",\\"index_uuid\\":\\"_na_\\",\\"index\\":\\"_searchguard\\"},\\"status\\":404}"}\n at respond (/home/grimoirelab/kibiter-6.1.0-2-linux-x86_64/node_modules/elasticsearch/src/lib/transport.js:295:15)\n at checkRespForFailure (/home/grimoirelab/kibiter-6.1.0-2-linux-x86_64/node_modules/elasticsearch/src/lib/transport.js:254:7)\n at HttpConnector.<anonymous> (/home/grimoirelab/kibiter-6.1.0-2-linux-x86_64/node_modules/elasticsearch/src/lib/connectors/http.js:159:7)\n at IncomingMessage.bound (/home/grimoirelab/kibiter-6.1.0-2-linux-x86_64/node_modules/elasticsearch/node_modules/lodash/dist/lodash.js:729:21)\n at emitNone (events.js:91:20)\n at IncomingMessage.emit (events.js:185:7)\n at endReadableNT (_stream_readable.js:974:12)\n at _combinedTickCallback (internal/process/next_tick.js:80:11)\n at process._tickDomainCallback (internal/process/next_tick.js:128:9)' }
error [12:19:52.788] [index_not_found_exception] no such index, with { resource.type="index_expression" &
resource.id="_searchguard" & index_uuid="_na_" & index="_searchguard" } :: {"path":"/_searchguard/api/permissionsinfo","query":{},"statusCode":404,"response":"{\"error\":{\"root_cause\":[{\"type\":\"index_not_found_exception\",\"reason\":\"no such index\",\"resource.type\":\"index_expression\",\"
resource.id\":\"_searchguard\",\"index_uuid\":\"_na_\",\"index\":\"_searchguard\"}],\"type\":\"index_not_found_exception\",\"reason\":\"no such index\",\"resource.type\":\"index_expression\",\"
resource.id\":\"_searchguard\",\"index_uuid\":\"_na_\",\"index\":\"_searchguard\"},\"status\":404}"}
at respond (/home/grimoirelab/kibiter-6.1.0-2-linux-x86_64/node_modules/elasticsearch/src/lib/transport.js:295:15)
at checkRespForFailure (/home/grimoirelab/kibiter-6.1.0-2-linux-x86_64/node_modules/elasticsearch/src/lib/transport.js:254:7)
at HttpConnector.<anonymous> (/home/grimoirelab/kibiter-6.1.0-2-linux-x86_64/node_modules/elasticsearch/src/lib/connectors/http.js:159:7)
at IncomingMessage.bound (/home/grimoirelab/kibiter-6.1.0-2-linux-x86_64/node_modules/elasticsearch/node_modules/lodash/dist/lodash.js:729:21)
at emitNone (events.js:91:20)
at IncomingMessage.emit (events.js:185:7)
at endReadableNT (_stream_readable.js:974:12)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickDomainCallback (internal/process/next_tick.js:128:9)
----------
The message does not appear anymore when I relaunch Kibana after uncommenting the line.
All of this is for search-guard-6:6.1.0-21.0 (Elasticsearch plugin) and search-guard-kibana-plugin-6.1.0-10.zip (Kibana plugin).
Saludos, and thanks for SafeGuard!
Jesus.