-
-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] LDAP integration issue #52
Comments
Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid. |
This issue has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions. |
What Synology are you using and what kernel is it running? |
majorversion="7" Linux SERVER 3.10.108 #69057 SMP Fri Jan 12 16:59:54 CST 2024 x86_64 GNU/Linux synology_braswell_716+II |
This issue has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions. |
Hi @spl33f I ran into this problem myself and figured it out. In the image build configuration a symbolic link is being created to the configuration.py file. To resolve this, I added the following line to my Dockerfile: COPY ldap_config.py /app/netbox/netbox/netbox/ldap_config.py |
This issue has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions. |
I've been trying to get my Netbox install over to docker. I'm using this image and I'm running into the same issues. You can set But after editing the Getting all of that installed and now we have this error:
when we try to get to the homepage. So it seems a lot is lacking to make |
django-auth-ldap isn't part of the netbox requirements file, which is why it's not installed, but we can add it easily enough. |
would be handy for anybody wanting to use the I think the last thing I'm stuck on is any additional config files I put in my config volume don't get copied over into the container. So I added |
Well, it gets copied over into /config, but doesn't make its way to /app/netbox/netbox/netbox |
Yeah that's annoying that they use a separate config file for it, we'd have to pre-symlink it |
seems a number of the ways Netbox does things causes some weird issues. Or maybe its just django. Assuming I manually copy it from /config to /app/netbox/netbox/netbox, I assume it will have to be re-copied any time I update? |
When it's built can you see if #60 works for you? I'm creating a symlink for /config/ldap_config.py to /app/netbox/netbox/netbox/ldap_config.py |
While you are looking at that, I went ahead and manually copied it over. seems it also needs a log file that already exists to write to. |
FYI, with a manual symlink it worked. The only other thing I had to do was create a log file (i used |
Can you change the log location in the config? |
Yes. There is a section in
That location is just where I chose for testing. But it can be pointed anywhere. |
Probably makes sense to tell users to log to a writable location rather than trying to preconfigure a log file with the right permissions somewhere |
I imagine so. I guess you could just dump an empty ldap log file somewhere, but would you really do that for every possible thing somebody might want to log? I think I could just remove that from the config as well if I didn't want to log anything. |
@thespad FYI, i just did a pull and the only issue was permission to the log file. Was going to add a volume for it on my compose file, but just commented out logging for LDAP to test and everything seems to have worked. |
Is there an existing issue for this?
Current Behavior
Hello,
I need your help please, I try to figure out LDAP integration with Netbox.
I have the following error message:
I tried LDAP search in CLI and it seems ok, I can retrieve my account info.
"ldap_config.py" is saved in the same directory as "configuration.py"
"init.py" is also present in "/app/netbox/netbox/netbox" but empty.
I also added the following to "configuration.py" file :
The container starts as expected, the file "django-ldap-debug.log" is created but it is empty.
I defintely missed something 🤔
Expected Behavior
Netbox should synced with LDAP and I should see "authentication and authorization" section in netbox administration page.
Steps To Reproduce
Change REMOTE_AUTH_BACKEND = 'netbox.authentication.RemoteUserBackend'
to
REMOTE_AUTH_BACKEND = 'netbox.authentication.LDAPBackend'
in configuration.py
Configure LDAP settings in ldap_config.py
Run recommended docker-compose
Environment
What browsers are you seeing the problem on?
Microsoft Edge
Where is your instance running?
Linux Server
Additional context
Using Portainer within Container Manager on Synology NAS
CPU architecture
x86-64
Docker creation
I'm using the recommended docker-compose settings from:
https://docs.linuxserver.io/images/docker-netbox/#docker-compose-recommended-click-here-for-more-info
Container logs
The text was updated successfully, but these errors were encountered: