What are the docker-compose equivalent environment variables for this?

I'm trying to set up kibana (running as docker via compose) to have anonymous user auth for a few iframes that we are using.

I do not wish to mount kibana.yml in compose. I would want to use the env variables to get the below equivalent.

This works in kibana.yml

xpack.security.authc.providers:
  basic.basic1:
    order: 0
  anonymous.anonymous1:
    order: 1
    credentials:
      username: "kuser"
      password: "kuser123"

However, defining them in an env file having docker-compose read them, does not have the desired effect. I've tried the below:

xpack.security.authc.providers.basic.basic1.enabled=true
xpack.security.authc.providers.basic.basic1.order=0
xpack.security.authc.providers.anonymous.anonymous1.enabled=true
xpack.security.authc.providers.anonymous.anonymous1.order=1
xpack.security.authc.providers.anonymous.anonymous1.credentials.username=kuser
xpack.security.authc.providers.anonymous.anonymous1.credentials.password=kuser123

and

XPACK_SECURITY_AUTHC_PROVIDERS_BASIC_BASIC1_ENABLED=TRUE
XPACK_SECURITY_AUTHC_PROVIDERS_BASIC_BASIC1_ORDER=0
XPACK_SECURITY_AUTHC_PROVIDERS_ANONYMOUS_ANONYMOUS1_ENABLED=TRUE
XPACK_SECURITY_AUTHC_PROVIDERS_ANONYMOUS_ANONYMOUS1_ORDER=1
XPACK_SECURITY_AUTHC_PROVIDERS_ANONYMOUS_ANONYMOUS1_CREDENTIALS_USERNAME=kuser
XPACK_SECURITY_AUTHC_PROVIDERS_ANONYMOUS_ANONYMOUS1_CREDENTIALS_PASSWORD=kuser123

What am I missing?

@blueren I believe your problem can only still be solved by what is mentioned at [docker] support arrays in environment variables · Issue #39595 · elastic/kibana · GitHub

Cheers

Thanks. Shame that some of the deeply nested env vars will always be a bit of a pain to implement using env vars. At least I have some understanding now.

Thanks for the quick turnaround!

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