netbox-community / netbox-docker

🐳 Docker Image of NetBox

Home Page:https://github.com/netbox-community/netbox-docker/wiki

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add Environment Variable to Mange ALLOW_TOKEN_RETRIEVAL

computeracer opened this issue · comments

Desired Behavior

When running the container with the ALLOW_TOKEN_RETRIEVAL environment variable set to false it would mask the API tokens in the GUI as outlined here:
https://github.com/netbox-community/netbox/blob/develop/docs/configuration/security.md#allow_token_retrieval

Contrast to Current Behavior

Setting ALLOW_TOKEN_RETRIEVAL seems to have no effect on this setting.

Required Changes

No response

Discussion: Benefits and Drawbacks

No response

We need to manually map environment variables to python configuration variables. This is done in the following file:
https://github.com/netbox-community/netbox-docker/blob/release/configuration%2Fconfiguration.py

The one you're looking for is not mapped yet. Please open a PR.

In the meantime, you can mount an extra.py file to set that setting.