# Setup Yukibey by ENV\_VAR has no effect

**URL:** <https://community.passbolt.com/t/setup-yukibey-by-env-var-has-no-effect/7670>\
**Category:** Installation Issues\
**Created:** [June 9, 2023, 7:27am UTC](https://community.passbolt.com/t/setup-yukibey-by-env-var-has-no-effect/7670 "2023-06-09T07:27:15Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![squaloo](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/squaloo/32/730_2.png) [@squaloo](https://community.passbolt.com/u/squaloo)\
**Post date:** [June 9, 2023, 7:27am UTC](https://community.passbolt.com/t/setup-yukibey-by-env-var-has-no-effect/7670/1 "2023-06-09T07:27:15Z")

</div>

**Checklist**  
 I have read intro post: [About the Installation Issues category](https://community.passbolt.com/t/about-the-installation-issues-category/12)  
 I have read the tutorials, help and searched for similar issues  
 I provide relevant information about my server (component names and versions, etc.)  
 I provide a copy of my logs and healthcheck  
 I describe the steps I have taken to trouble shoot the problem  
 I describe the steps on how to reproduce the issue

Hi, I’m using CE version 3.12 which supports Yubikey MFA.

I’ve read and followed this [Passbolt Help | How to configure passbolt to use Yubikey OTP](https://help.passbolt.com/configure/mfa/yubikey)

I’m using docker, so I tried the ENV\_VAR approach without success.  
I’ve tried the Admin UI =\> it worked ?!

In /app/administration/mfa the “Yubikey” is not / does not stay activated.

There’s nothing in the logs (just, nothing I mean : I see navigations logs, no messages relative to yubikey configuration failing)

here’s an example of what I see

```auto
10.1.3.180 - - [09/Jun/2023:07:10:38 +0000] "GET /auth/is-authenticated.json HTTP/1.1" 200 261 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36"
10.1.3.180 - - [09/Jun/2023:07:10:38 +0000] "GET /auth/is-authenticated.json HTTP/1.1" 200 261 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36"
10.1.3.180 - - [09/Jun/2023:07:10:43 +0000] "GET / HTTP/1.1" 302 5 "-" "ELB-HealthChecker/2.0"

```

My setup is as follow

- AWS hosted
- Docker in ECS
- a Load Balancer in front of passbolt

in the end it works, but for my setup ENV VAR support would be far better.

---

<div class="post-metadata">

**Author:** ![garrett](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/garrett/32/545_2.png) [@garrett](https://community.passbolt.com/u/garrett)\
**Post date:** [June 9, 2023, 1:08pm UTC](https://community.passbolt.com/t/setup-yukibey-by-env-var-has-no-effect/7670/2 "2023-06-09T13:08:21Z")

</div>

Hi @squaloo Since you didn’t mention the variables you used I thought I would post a link to a PR as they are also not currently listed on the [passbolt Docker variables page](https://help.passbolt.com/configure/environment/reference.html) on the help site. I figured you dug into the code but just in case.

> <https://github.com/passbolt/passbolt_help/pull/90/commits/9eae5c881465dcc55059d03603fdcecb798ad416>
>
> Please confirm description for PASSBOLT\_PLUGINS\_MFA\_TOTP\_SECRET\_LENGTH is accura…te, thanks.
> 
> ref: https://github.com/passbolt/passbolt\_help/issues/86

---

<div class="post-metadata">

**Author:** ![remy](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/remy/32/17_2.png) [@remy](https://community.passbolt.com/u/remy)\
**Post date:** [June 9, 2023, 1:22pm UTC](https://community.passbolt.com/t/setup-yukibey-by-env-var-has-no-effect/7670/3 "2023-06-09T13:22:02Z")

</div>

> [@squaloo](#):
>
> I’m using docker, so I tried the ENV\_VAR approach without success.  
> I’ve tried the Admin UI =\> it worked ?!

We’ll try to reproduce this issue, maybe there is a regression.  
Best,

---

<div class="post-metadata">

**Author:** ![pabloelcolombiano](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/pabloelcolombiano/32/5864_2.png) [@pabloelcolombiano](https://community.passbolt.com/u/pabloelcolombiano)\
**Post date:** [June 9, 2023, 2:35pm UTC](https://community.passbolt.com/t/setup-yukibey-by-env-var-has-no-effect/7670/4 "2023-06-09T14:35:09Z")

</div>

Hi @squaloo ,

the documentation might indeed miss one env variable:  
`PASSBOLT_PLUGINS_MFA_PROVIDERS_YUBIKEY=true`  
is missing.

Setting the env variables as followed worked for me:

```auto
PASSBOLT_PLUGINS_MFA_PROVIDERS_YUBIKEY=true
PASSBOLT_PLUGINS_MFA_YUBIKEY_CLIENTID=123
PASSBOLT_PLUGINS_MFA_YUBIKEY_SECRETKEY="foo"

```

Do you confirm? In any case we will update the doc.

---

<div class="post-metadata">

**Author:** ![squaloo](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/squaloo/32/730_2.png) [@squaloo](https://community.passbolt.com/u/squaloo)\
**Post date:** [June 10, 2023, 7:25am UTC](https://community.passbolt.com/t/setup-yukibey-by-env-var-has-no-effect/7670/5 "2023-06-10T07:25:51Z")

</div>

I’ve just tried as follow :

- went in Admin UI, deactivated Yubikey MFA
- stopped container
- started it again with the new env var (At the moment I have the 3 you mention above)

=\> did not work, Yubikey MFA was still deactivated.

_maybe_ it could be related to the fact that I once used the admin UI, as it has priority over env vars ?  
(if you’d like I can check something in DB and see if there’s a configuration remnant, just tell me where)

---

<div class="post-metadata">

**Author:** ![AnatomicJC](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/anatomicjc/32/962_2.png) [@AnatomicJC](https://community.passbolt.com/u/AnatomicJC)\
**Post date:** [June 10, 2023, 5:41pm UTC](https://community.passbolt.com/t/setup-yukibey-by-env-var-has-no-effect/7670/6 "2023-06-10T17:41:05Z")

</div>

If you want to check in db, you may find something in organization\_settings table.

---

<div class="post-metadata">

**Author:** ![squaloo](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/squaloo/32/730_2.png) [@squaloo](https://community.passbolt.com/u/squaloo)\
**Post date:** [June 12, 2023, 6:13am UTC](https://community.passbolt.com/t/setup-yukibey-by-env-var-has-no-effect/7670/7 "2023-06-12T06:13:58Z")

</div>

Great ! indeed, when deactivating with the Admin UI, a record stays in DB (which is perfectly fine), with a ‘modified’ date and no values for yubikey client id / secret.

I removed the line and restarted the container with the 3 env variables … =\> YubiKey is activated as expected.

Thank you all again.
