# Configure OpenID via environment

**URL:** <https://community.vikunja.io/t/configure-openid-via-environment/628>\
**Category:** Support\
**Created:** [21 May 2022 10:38 UTC](https://community.vikunja.io/t/configure-openid-via-environment/628 "2022-05-21T10:38:00Z")\
**Posts on this page:** 4\
**Page:** 2

<div class="post-metadata">

**Author:** ![seraphblade2010](https://community.vikunja.io/user_avatar/community.vikunja.io/seraphblade2010/32/1947_2.png) [@seraphblade2010](https://community.vikunja.io/u/seraphblade2010)\
**Post date:** [1 February 2025 19:16 UTC](https://community.vikunja.io/t/configure-openid-via-environment/628/21 "2025-02-01T19:16:48Z")

</div>

Not quite sure it works with the unstable tag, but maybe im just wrong.  
Here is my values.yaml file:

```auto
      env: 
        VIKUNJA_AUTH_OPENID_ENABLED: TRUE
        VIKUNJA_AUTH_OPENID_PROVIDERS: AUTHENTIK
        VIKUNJA_AUTH_OPENID_PROVIDERS_AUTHENTIK_NAME: authentik
        VIKUNJA_AUTH_OPENID_PROVIDERS_AUTHENTIK_AUTHURL:
          valueFrom:
            secretKeyRef:
              name: sealed-secret-vikunja-passwords
              key: vikunja-openid-authurl
        VIKUNJA_AUTH_OPENID_PROVIDERS_AUTHENTIK_CLIENTID:
          valueFrom:
            secretKeyRef:
              name: sealed-secret-vikunja-passwords
              key: vikunja-openid-clientid
        VIKUNJA_AUTH_OPENID_PROVIDERS_AUTHENTIK_CLIENTSECRET:
          valueFrom:
            secretKeyRef:
              name: sealed-secret-vikunja-passwords
              key: vikunja-openid-clientsecret

```

and here is the error message I get:  
2025-02-01T19:12:03Z: INFO ▶ 001 Using config file: /etc/vikunja/config.yml  
panic: interface conversion: interface {} is string, not map[string]interface {}

Anything my config is missing or is this still not working?

---

<div class="post-metadata">

**Author:** ![xeruf](https://community.vikunja.io/letter_avatar_proxy/v4/letter/x/85e7bf/32.png) [@xeruf](https://community.vikunja.io/u/xeruf)\
**Post date:** [3 February 2025 10:38 UTC](https://community.vikunja.io/t/configure-openid-via-environment/628/22 "2025-02-03T10:38:38Z")

</div>

if you are substituting values from a secret anyways, why not substitute into the configmap?

> **[apps/do/vikunja-extra/vikunja-values-configmap.yaml ·...](https://open.greenhost.net/xeruf/stackspout/-/blob/ef010c435cf939d266b83347b2c779cca60adf44/apps/do/vikunja-extra/vikunja-values-configmap.yaml#L30)**
>
> GitLab Community Edition

---

<div class="post-metadata">

**Author:** ![kolaente](https://community.vikunja.io/user_avatar/community.vikunja.io/kolaente/32/5_2.png) [@kolaente](https://community.vikunja.io/u/kolaente)\
**Post date:** [3 February 2025 15:44 UTC](https://community.vikunja.io/t/configure-openid-via-environment/628/23 "2025-02-03T15:44:09Z")

</div>

It should work with the latest unstable build. The format has changed  
and that change was not yet released as stable.

> panic: interface conversion: interface {} is string, not  
> map[string]interface {}

Try removing the `VIKUNJA_AUTH_OPENID_PROVIDERS: AUTHENTIK` line.

---

<div class="post-metadata">

**Author:** ![Krash](https://community.vikunja.io/user_avatar/community.vikunja.io/krash/32/991_2.png) [@Krash](https://community.vikunja.io/u/Krash)\
**Post date:** [23 February 2025 20:02 UTC](https://community.vikunja.io/t/configure-openid-via-environment/628/24 "2025-02-23T20:02:56Z")

</div>

Thanks for implementing this! I am running version `v0.24.1-821-398d0c7ab5` from the unstable branch on dockerhub. I am trying to set up OIDC to my keycloak instance through the ENV vars below:

```yaml
# OpenID Connect ENVs
      VIKUNJA_AUTH_OPENID_ENABLED: true
      VIKUNJA_AUTH_OPENID_PROVIDERS_KEYCLOAK_NAME: Keycloak
      VIKUNJA_AUTH_OPENID_PROVIDERS_KEYCLOAK_ISSUERURL: https://domain.tld/auth/realms/my-realm/.well-known/openid-configuration
      VIKUNJA_AUTH_OPENID_PROVIDERS_KEYCLOAK_AUTHURL: https://domain.tld/auth/admin/my-realm
      VIKUNJA_AUTH_OPENID_PROVIDERS_KEYCLOAK_CLIENTID: vikunja-app
      VIKUNJA_AUTH_OPENID_PROVIDERS_KEYCLOAK_CLIENTSECRET: MWTcjN9zBoq1QqkI77xfDfpa1NbNUct1
      VIKUNJA_AUTH_OPENID_PROVIDERS_KEYCLOAK_SCOPE: "openid profile email"
      VIKUNJA_AUTH_OPENID_PROVIDERS_KEYCLOAK_LOGOUTURL: https://domain.tld/auth/admin/my-realm/protocol/openid-connect/logout

```

However, I’m getting the following error in the logs:  
`vikunja | 2025-02-23T20:57:25+01:00: ERROR ▶ 0f7 Error while getting openid provider keycloak: 405 Method Not Allowed: {"error":"HTTP 405 Method Not Allowed"}`

I don’t know if its my enviorment variables that aren’t working or if it’s the keycloak instance (I’m too tired to troubleshoot it), so if anyone has any ideas - input is welcome.

[Previous page](https://community.vikunja.io/t/configure-openid-via-environment/628.md?page=1)
