Hi @Adrián AYS:
I have been investigating a bit and it seems there was a problem with Session timeout in previous versions of Kibana. Although, it seems to be deprecated, you may try configuring:
xpack.security.sessionTimeout: "1800000"
That is 30 min in miliseconds.
I would like to see if we can get the keep alive value for HTTPS sessions, for that please run:
# curl https://<kibana_ip>:<https_port> --insecure --verbose
But I think the bottom of the problem is here:
{"type":"log","@timestamp":"2022-01-26T12:07:57+00:00","tags":["warning","plugins","security","config"],"pid":60413,"message":"Generating a random key for xpack.security.encryptionKey. To prevent sessions from being invalidated on restart, please set xpack.security.encryptionKey in the kibana.yml or use the bin/kibana-encryption-keys command."}
{"type":"log","@timestamp":"2022-01-26T12:07:57+00:00","tags":["warning","plugins","reporting","config"],"pid":60413,"message":"Generating a random key for xpack.reporting.encryptionKey. To prevent sessions from being invalidated on restart, please set xpack.reporting.encryptionKey in the kibana.yml or use the bin/kibana-encryption-keys command."}
{"type":"log","@timestamp":"2022-01-26T12:12:56+00:00","tags":["warning","plugins","security","config"],"pid":60646,"message":"Generating a random key for xpack.security.encryptionKey. To prevent sessions from being invalidated on restart, please set xpack.security.encryptionKey in the kibana.yml or use the bin/kibana-encryption-keys command."}
{"type":"log","@timestamp":"2022-01-26T12:12:56+00:00","tags":["warning","plugins","reporting","config"],"pid":60646,"message":"Generating a random key for xpack.reporting.encryptionKey. To prevent sessions from being invalidated on restart, please set xpack.reporting.encryptionKey in the kibana.yml or use the bin/kibana-encryption-keys command."}
{"type":"log","@timestamp":"2022-01-26T12:18:00+00:00","tags":["warning","plugins","security","config"],"pid":60884,"message":"Generating a random key for xpack.security.encryptionKey. To prevent sessions from being invalidated on restart, please set xpack.security.encryptionKey in the kibana.yml or use the bin/kibana-encryption-keys command."}
{"type":"log","@timestamp":"2022-01-26T12:18:00+00:00","tags":["warning","plugins","reporting","config"],"pid":60884,"message":"Generating a random key for xpack.reporting.encryptionKey. To prevent sessions from being invalidated on restart, please set xpack.reporting.encryptionKey in the kibana.yml or use the bin/kibana-encryption-keys command."}
It seems that your xpack is generating a new xpack.security.encryptionKey and not recognizing the one you have configured in kibana.yml.
You may need to check this and at some point maybe reissue your certificates for this.
You can also try disabling the xpack.security.enabled: false to temporarily overcome this issue.
I hope this helps.
Thanks