Permission Issue Setting Up Dashboards

Hello,

I’m having some issues getting Dashboards to run. Appears to be a permissions problem; there is my error:

{"type":"log","@timestamp":"2021-12-22T15:27:43Z","tags":["error","opensearch","data"],"pid":5390,"message":"[security_exception]: no permissions for [cluster:monitor/nodes/info] and User [name=dashboards, backend_roles=[kibana_server], requestedTenant=null]"}

My dashboards user (i.e. the value of opensearch.username) is “dashboards”. I have added this user to the backend role kibana_server. This can all be seen from the log line above.

When making a query to _opendistro/_security/api/roles/ on my cluster I can see the role kibana_server has “cluster_monitor”

<truncated>
  "kibana_server" : {
    "reserved" : true,
    "hidden" : false,
    "description" : "Provide the minimum permissions for the Kibana server",
    "cluster_permissions" : [
      "cluster_monitor",   <----------- This guy
      "cluster_composite_ops",
      "indices:admin/template*",
      "indices:data/read/scroll*"
    ],
<truncated>

When querying the current users (i.e. _opendistro/_security/api/internalusers) I can see the backend role is applied, but there are no “opendistro_security_roles”. I would love to understand the difference between these–I suspect that is where my problem lies. However, I’m having a hard time finding that answer.

Can anyone advise? Thank you very much.

{
  "admin" : {
    "hash" : "",
    "reserved" : true,
    "hidden" : false,
    "backend_roles" : [
      "admin"
    ],
    "attributes" : { },
    "description" : "admin user",
    "opendistro_security_roles" : [ ],
    "static" : false
  },
  "dashboards" : {
    "hash" : "",
    "reserved" : true,
    "hidden" : false,
    "backend_roles" : [
      "kibana_server"
    ],
    "attributes" : { },
    "description" : "dashboards user",
    "opendistro_security_roles" : [ ],
    "static" : false
  }
}

@jecanne I think you’re missing these lines in config.ylm. If not configured, kibanaserver will be the default value for server_username

config:
  dynamic:
    kibana:
      server_username: "dashboards"
      index: ".kibana"


Thanks again @pablo

This did the trick!