I will Take another look when I get a chance, but I'm pretty sure it's just the fact that the needed settings are set before Kibana starts.
- ELASTICSEARCH_HOSTS=https://es01:9200
- ELASTICSEARCH_USERNAME=kibana_system
- ELASTICSEARCH_PASSWORD=${KIBANA_PASSWORD}
- ELASTICSEARCH_SSL_CERTIFICATEAUTHORITIES=config/certs/ca/ca.crt
Pretty sure this is easy to test. You can simply download a copy of Kibana, put some values for those in the Kibana.yml or set ENV and for those doesn't really matter if it connects or not and pretty sure it'll start up without asking for the token.