# Kibana error: security\_exception: \[security\_exception\] Reason: unable to authenticate with provided credentials and anonymous access is not allowed for this request

**URL:** <https://discuss.elastic.co/t/kibana-error-security-exception-security-exception-reason-unable-to-authenticate-with-provided-credentials-and-anonymous-access-is-not-allowed-for-this-request/344243>\
**Category:** Elasticsearch\
**Created:** [October 2, 2023, 4:01pm UTC](https://discuss.elastic.co/t/kibana-error-security-exception-security-exception-reason-unable-to-authenticate-with-provided-credentials-and-anonymous-access-is-not-allowed-for-this-request/344243 "2023-10-02T16:01:03Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![PodarcisMuralis](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/podarcismuralis/32/122606_2.png) [@PodarcisMuralis](https://discuss.elastic.co/u/PodarcisMuralis)\
**Post date:** [October 5, 2023, 3:26pm UTC](https://discuss.elastic.co/t/kibana-error-security-exception-security-exception-reason-unable-to-authenticate-with-provided-credentials-and-anonymous-access-is-not-allowed-for-this-request/344243/2 "2023-10-05T15:26:00Z")

</div>

I solved this.  
After resetting passwords in elasticsearch, I restarted Logstash, Kibana, Elasticsearch.  
But I still got this error.  
Then I generated the new keys like here: [kibana encryption keys](https://www.elastic.co/guide/en/kibana/8.5/kibana-encryption-keys.html)

Command:  
`./bin/kibana-encryprion-keys generate --force`

I copied newly generated keys to

```auto
xpack.security.encryptionKey: "myKey"
xpack.encryptedSavedObjects.encryptionKey: "myEncKey"
xpack.reporting.encryptionKey: "my2EncKey"

```

Then I solve the Encryption API Key Problem here: [encryption API](https://discuss.elastic.co/t/kibana-errors-after-changing-encryptionkey-failed-to-decrypt-apikey-attribute-unsupported-state-or-unable-to-authenticate-data/344492)

---

_[View the full topic](https://discuss.elastic.co/t/kibana-error-security-exception-security-exception-reason-unable-to-authenticate-with-provided-credentials-and-anonymous-access-is-not-allowed-for-this-request/344243)._
