Update from 4.5.1-3.4.2 to 4.5.2-4.0.0 does not enable API v2 tokens #1618
-
Current BehaviorUpdating from 4.5.1-3.4.2 to 4.5.2-4.0.0 and implementing all breaking changes for the update does not enable v2 tokens. Netbox ContainerInspect shows the env variables set. I tried using my own secrets generated using [
{
"Image": "sha256:50361ab5d64a62bce71ab46ef6993e1a47c9d19aafe82f837e8533444f48531e",
"Config": {
"User": "netbox:root",
"Env": [
"API_TOKEN_PEPPER_1=Qy+F=OTeGskWQ(wTMgjc+NPPlz6YwFXY=KHIIg=wpYXT&e(6u8",
"API_TOKEN_PEPPERS=Qy+F=OTeGskWQ(wTMgjc+NPPlz6YwFXY=KHIIg=wpYXT&e(6u8",
],
"Image": "netbox:latest-plugins",
}
}
]Dockerfile for the custom container FROM docker.io/netboxcommunity/netbox:v4.5
COPY ./plugin_requirements.txt /opt/netbox/
RUN /usr/local/bin/uv pip install -r /opt/netbox/plugin_requirements.txt
# This SECRET_KEY is only used during the installation. There's no need to change it.
RUN SECRET_KEY="dummydummydummydummydummydummydummydummydummydummy" /opt/netbox/venv/bin/python /opt/netbox/netbox/manage.py collectstatic --no-inputroot@inf-nbx02:/etc/docker/Trying to add a v2 token in the webinterface gives me this error
Expected BehaviorDefining Docker Compose VersionDocker Compose version v2.39.4 Docker VersionThe git RevisionN/A - I use a custom Ansible deployment The git StatusStartup Commanddocker compose -p staging up NetBox LogsContent of docker-compose.override.ymlN/A - I use a custom Ansible deployment |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
The netbox-docker/configuration/configuration.py Lines 119 to 121 in c60defe |
Beta Was this translation helpful? Give feedback.

The
API_TOKEN_PEPPER_1variable needs to be set for the netbox-web container. Did you modify theconfiguration.py? If yes, you need to have this part:netbox-docker/configuration/configuration.py
Lines 119 to 121 in c60defe