LOGIN_REQUIRED = False not working #6004
Replies: 2 comments 4 replies
-
If you are using the netbox-docker community image, then you must not touch configuration.py or settings.py. It is configured via environment variables. You can find the mapping from environment variables to settings here and here. In your case, you'd be setting environment variable LOGIN_REQUIRED to "False" (or indeed anything other than I have no idea why you're getting those exceptions, but if you've mangled any of the (Aside: for a long time there was a statement saying that running Netbox in Docker is not a "supported" configuration anyway, but I can't find it right now) |
Beta Was this translation helpful? Give feedback.
-
IIRC, the documentation is not very clear on this point, but I believe that
*in addition to* LOGIN_REQUIRED=False, you also need to set
https://netbox.readthedocs.io/en/stable/configuration/optional-settings/#exempt_view_permissions
to permit the views that you want unauthenticated users to be able to
access.
Hope this helps,
Glenn
…On Thu, Mar 18, 2021 at 10:21 AM cyberops7 ***@***.***> wrote:
So to troubleshoot this more, I started with a clean CentOS 7 install this
morning and manually followed the installation instructions
<https://netbox.readthedocs.io/en/stable/installation/> for NetBox. I
just copied the configuration.example.py as instructed, made the
necessary revisions for ALLOWED_HOSTS (just ['*'] for now), DATABASE,
REDIS, and SECRET_KEY, and I'm having the same result where the UI is
locked down for unauthenticated users.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#6004 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABKYBX7IMPMHQC4BZVZRWGDTEID6FANCNFSM4ZL3BF3Q>
.
--
*Glenn Matthews*
*Sr. Network Automation Consultant*
*Network to Code, LLC*
e: ***@***.***
|
Beta Was this translation helpful? Give feedback.
-
Hello,
We are working on overhauling our deployment of NetBox running in Docker containers. We use our own Dockerfile and assorted scripts to install NetBox per the installation documentation. I'd say we've got it 95% working, but I've been chasing my tail trying to get unauthenticated read access working. After getting everything up and running, everything is grayed/locked out until we log in with the intial admin account, and then if we log back out, everything is locked down again. We have LOGIN_REQUIRED = False in our configuration.py file, and I even set it to False in the settings.py file, but none of that seems to make a difference. It would seem the configuration.py is being used correctly, since NetBox is able to connect to/authenticate with our Postgres DB container just fine, adding the logging config to it got the logging started, etc., but something seems to be requiring authentication even though we have LOGIN_REQUIRED set to False.
Any ideas what could be wrong? I'm happy to provide other details, logs, etc. that would be helpful...I've been chasing my tail on this one issue for a few days now.
We are using NetBox 2.10.6 and Python 3.6.13 (I also tried Python 3.9.2 at first, then tried 3.6.13 to see if that would help, but it didn't). I am not using SSL yet (will be adding that this week), just have our nginx container set up for port 80, nor is LDAP configured yet (also a goal for this week).
I did enable the django logging to file, and I do see a bunch of errors like this once I start clicking around the web UI (I have no idea if they are relevant/related):
and
Beta Was this translation helpful? Give feedback.
All reactions