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

Hi.

I upgraded the Kibana from 7.17 to 8.5.3 and got some corrupt indices.
then I used these instructions and deleted .kibana and . monitoring indices.
Resolve Migration Failures

But I also deleted .security_7. This resetted all passwords. I had to recreate all the passwords in elasticsearch.

Now I have many problems in Kibana Logs steaming like heartbeats.

security_exception: [security_exception] Reason: unable to authenticate with provided credentials and anonymous access is not allowed for this request
Re-authentication cannot be handled.

Here is my kibana.yml

server.port: 5601
server.host: "myIP"
server.publicBaseUrl: "myURLWithAnS"
server.ssl.enabled: true
server.ssl.certificate: myCert.crt
server.ssl.key: myKey.key
elasticsearch.hosts: [ "myThreeHosts" ]
elasticsearch.username: "user"
elasticsearch.ssl.certificate: myCert.crt
elasticsearch.ssl.key: myKey.key
elasticsearch.ssl.verificationMode: none
pid.file: /../pids/kibana.pi
monitoring.kibana.collection.enabled: false
monitoring.ui.ccs.enabled: false
xpack.screenshotting.browser.chromium.disableSandbox: true
xpack.security.encryptionKey: "myKey"
xpack.encryptedSavedObjects.encryptionKey: "myEncKey"
xpack.reporting.encryptionKey: "my2EncKey"
xpack.reporting.roles.enabled: false

Can you please help me with this issue?
Thanks

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

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

I copied newly generated keys to

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

Then I solve the Encryption API Key Problem here: encryption API

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.