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

**URL:** <https://discuss.elastic.co/t/what-are-the-docker-compose-equivalent-environment-variables-for-this/286486>\
**Category:** Kibana\
**Tags:** docker\
**Created:** [October 12, 2021, 11:57am UTC](https://discuss.elastic.co/t/what-are-the-docker-compose-equivalent-environment-variables-for-this/286486 "2021-10-12T11:57:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![blueren](https://avatars.discourse-cdn.com/v4/letter/b/ecae2f/32.png) [@blueren](https://discuss.elastic.co/u/blueren)\
**Post date:** [October 12, 2021, 11:57am UTC](https://discuss.elastic.co/t/what-are-the-docker-compose-equivalent-environment-variables-for-this/286486/1 "2021-10-12T11:57:41Z")

</div>

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**

```auto
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:

```auto
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

```auto
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?

---

<div class="post-metadata">

**Author:** ![tiagocosta](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tiagocosta/32/40045_2.png) [@tiagocosta](https://discuss.elastic.co/u/tiagocosta)\
**Post date:** [October 12, 2021, 12:16pm UTC](https://discuss.elastic.co/t/what-are-the-docker-compose-equivalent-environment-variables-for-this/286486/2 "2021-10-12T12:16:28Z")

</div>

> [@blueren](#):
>
> `XPACK_SECURITY_AUTHC_PROVIDERS`

@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](https://github.com/elastic/kibana/issues/39595#issuecomment-707966235)

Cheers

---

<div class="post-metadata">

**Author:** ![blueren](https://avatars.discourse-cdn.com/v4/letter/b/ecae2f/32.png) [@blueren](https://discuss.elastic.co/u/blueren)\
**Post date:** [October 12, 2021, 12:20pm UTC](https://discuss.elastic.co/t/what-are-the-docker-compose-equivalent-environment-variables-for-this/286486/3 "2021-10-12T12:20:26Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [November 9, 2021, 12:20pm UTC](https://discuss.elastic.co/t/what-are-the-docker-compose-equivalent-environment-variables-for-this/286486/4 "2021-11-09T12:20:49Z")

</div>

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