Anonymous authentication - docker configuration

Hello,

I am trying to enable anonymous authentication in Kibana to make my embedded dashboards viewable without login. I have enabled anonymous access to elastic with:

- xpack.security.authc.anonymous.roles=kibana_system
- xpack.security.authc.anonymous.authz_exception=true

I then tried to enable anonymous authentication to Kibana using the steps described here . I couldn't find any instructions specific for docker, so I tried this in the environment variables for Kibana:

 XPACK_SECURITY_AUTHC_PROVIDERS_ANONYMOUS_ANONYMOUS1_ORDER: 0
 XPACK_SECURITY_AUTHC_PROVIDERS_ANONYMOUS_ANONYMOUS1_CREDENTIALS: "elasticsearch_anonymous_user"

I would really appreciate any help if someone knows how to do this. Thanks!

I got it working now with the kibana.yml. Still wondering if this is possible using the environment variables method in docker-compose.