# Kibana error \[ FATAL Error: \[config validation of \[elasticsearch\].username\]: value of "elastic" is forbidden.\]

**URL:** <https://discuss.elastic.co/t/kibana-error-fatal-error-config-validation-of-elasticsearch-username-value-of-elastic-is-forbidden/297956>\
**Category:** Kibana\
**Tags:** elastic-stack-security\
**Created:** [February 22, 2022, 9:22pm UTC](https://discuss.elastic.co/t/kibana-error-fatal-error-config-validation-of-elasticsearch-username-value-of-elastic-is-forbidden/297956 "2022-02-22T21:22:33Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![franknord](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/franknord/32/95536_2.png) [@franknord](https://discuss.elastic.co/u/franknord)\
**Post date:** [February 23, 2022, 6:58am UTC](https://discuss.elastic.co/t/kibana-error-fatal-error-config-validation-of-elasticsearch-username-value-of-elastic-is-forbidden/297956/4 "2022-02-23T06:58:32Z")

</div>

I have a similar situation here. On startup Kibana says

`FATAL Error: [config validation of [elasticsearch].username]: value of "elastic" is forbidden. This is a superuser account that cannot write to system indices that Kibana needs to function. Use a service account token instead. Learn more: https://www.elastic.co/guide/en/elasticsearch/reference/8.0/service-accounts.html`

Strangely however, this value is not defined in kibana.yml:

```auto
$ grep username config/kibana.yml
# the username and password that the Kibana server uses to perform maintenance on the Kibana
#elasticsearch.username: ${elasticsearch.username}

```

Instead I'm using a service token:

```auto
#elasticsearch.username: ${elasticsearch.username}
#elasticsearch.password: ${elasticsearch.password}
elasticsearch.serviceAccountToken: "edited"

```

After creating the token I got this result

```auto
{
  "created" : true,
  "token" : {
    "name" : "token_E1iT534Bm30JRve8bsYA",
    "value" : "edited"
  }
}

```

I ran a test request

`curl -H "Authorization: Bearer edited" https://`hostname -f`:9200/_security/_authenticate?pretty`

and got

```auto
{
  "username" : "elastic/kibana",
  "roles" : [],
  "full_name" : "Service account - elastic/kibana",
  "email" : null,
  "token" : {
    "name" : "token_E1iT534Bm30JRve8bsYA",
    "type" : "_service_account_index"
  },
  "metadata" : {
    "_elastic_service_account" : true
  },
  "enabled" : true,
  "authentication_realm" : {
    "name" : "_service_account",
    "type" : "_service_account"
  },
  "lookup_realm" : {
    "name" : "_service_account",
    "type" : "_service_account"
  },
  "authentication_type" : "token"
}

```

---

_[View the full topic](https://discuss.elastic.co/t/kibana-error-fatal-error-config-validation-of-elasticsearch-username-value-of-elastic-is-forbidden/297956)._
