netbox-community / netbox-docker

🐳 Docker Image of NetBox
https://github.com/netbox-community/netbox-docker/wiki
Apache License 2.0
1.81k stars 828 forks source link

Add Environment Variable to Mange ALLOW_TOKEN_RETRIEVAL #1197

Open computeracer opened 6 months ago

computeracer commented 6 months ago

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

cimnine commented 6 months ago

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.