NetBox automatic Django migrations on service startup – missing permission boundary to restrict who can trigger migrations
0 reputation · 03 Mar 2020, 12:03 UTC
The goal is to ensure that only authorized operators can initiate schema migrations when NetBox services start, preventing unintended or unauthorized database changes.
Currently, NetBox runs Django migrations automatically on startup with no built‑in role‑based access control or configuration option to gate this behavior. The service user that starts the application can unconditionally trigger migrations, and there is no documented mechanism to require approval, a token, or a separate privileged process before the migration step executes.
- Can NetBox be configured to skip automatic migrations and require manual invocation via a management command?
- Is there a supported way to insert a pre‑migration check (e.g., an approval flag or token) into the startup sequence without modifying source code?
- What are the recommended practices for separating migration execution privilege from general service startup in containerized or orchestrated deployments?