Closed saintwolf closed 3 years ago
Hi @saintwolf - There could have been an improper patch that is causing a difference between Netbox 2.8 and later releases. I made an experimental update to the main branch; but have not yet pushed the code into pypi. Perhaps this patch would also help you. Have you tried using the latest code on main (vs what is published on pypi)?
@jeremyschulman I'm using the code from PyPi so that will explain it. Am not too well versed with pip so am not sure how to install the dev code. I shall wait for the next version to be released. Thanks for your support.
Hello @jeremyschulman
I overwritten the folder /opt/netbox/venv/lib/python3.7/site-packages/django3_saml2_nbplugin
with the updated content in the master branch.
I'm receiving this error when I try to login
{"error": "'str' object has no attribute 'items'", "exception": "AttributeError", "netbox_version": "2.10.4", "python_version": "3.7.3"}
I'm switching back to the SAML2DottedEmailUserBackend
for now (which works well), but having groups mapping would be a nice addition.
Let me know if I can help somehow.
Thanks.
@duviful - I have not tested with Netbox 2.10 release; and I am hearing that there are some changes to the plugin infrastructure that may account of the issues you are seeing. I do have plans to upgrade to 2.10, but not in the near term. I am hoping someone else running 2.10 may be able to review this further and perhaps make a PR.
@saintwolf @jeremyschulman: I had to make these changes for the plugin to work. pip install --upgrade --force-reinstall git+https://github.com/jeremyschulman/netbox-plugin-auth-saml2.git REMOTE_AUTH_BACKEND = 'django3_saml2_nbplugin.backends.SAML2CustomAttrUserBackend'
Rest of the configuration I kept the same. I hope this is the right way, if there is an alternative, please let me know.
@rakeshmohan46 - you are correct, thank you for working through this. I will push the latest code into PyPi this week so the installation process will be better for all.
@rakeshmohan46 - finally pushed the update for v2.2 to PyPi. closing this issue.
Hey there,
I'm trying to use netbox-plugin-auth-saml2 in order to use groups provided by SAML to lock down various parts of Netbox.
Authentication seems to work fine using the _utilities.authbackends.RemoteUserBackend and _django3_saml2nbplugin.backends.SAML2AttrUserBackend, however looking at the code, I need to use the SAML2CustomAttrUserBackend class so that I can pull the appropriate user groups.
When trying to specify this backend, I keep getting the error below, and I'm not sure why this class isn't being found as it's in the same file as SAML2AttrUserBackend. Am I missing something key or is this a bug?
Here's the output from the debug: