Skip to content
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

LDAP Documentation Enhancement #518

Closed
iamdadmin opened this issue Aug 31, 2016 · 5 comments
Closed

LDAP Documentation Enhancement #518

iamdadmin opened this issue Aug 31, 2016 · 5 comments
Labels
type: documentation A change or addition to the documentation

Comments

@iamdadmin
Copy link

iamdadmin commented Aug 31, 2016

Referring to http://netbox.readthedocs.io/en/latest/installation/ldap/ the following section needs a little more explanation for people who come in cold and have no basis for what the group mappings mean.

User Groups for Permissions

"is_active" - you must map all users to at least this group if you want their account to be treated as enabled. Without this, your users cannot log in.

"is_staff" - users mapped to this group are enabled for access to the Administration tools; this is the equivalent of checking the "Staff status" box on a manually created user. This doesn't necessarily imply additional privileges, which still needed to be assigned via a group, or on a per-user basis.

"is_superuser" - users mapped to this group in addition to the "is_staff" group will be assumed to have full permissions to all modules. Without also being mapped to "is_staff", this group observably has no impact to your effective permissions.

Some more notes, specific to Windows Server Active Directory.

The following option should be set to None when using Windows Server 2012.

AUTH_LDAP_USER_DN_TEMPLATE = None

When using Windows Server 2012 you may also need to specify a different port on the AUTH_LDAP_SERVER_URI - 3269 for secure, 3268 for non-secure

Server URI

AUTH_LDAP_SERVER_URI = "ldaps://my_server_or_ip:3269"

For this section, it would be good perhaps to link to the appropriate Django article to find a list of attributes. Sure, that's a bit let-me-google-that-for-you but it makes for a better read.

You can map user attributes to Django attributes as so.

AUTH_LDAP_USER_ATTR_MAP = {
"first_name": "givenName",
"last_name": "sn"
}

@jeremystretch jeremystretch added the type: documentation A change or addition to the documentation label Sep 22, 2016
@Mikecom32
Copy link

@marvnrawley Thank you for this. I couldn't figure out why my LDAP auth was failing, and changing the AUTH_LDAP_USER_DN_TEMPLATE setting to None fixed the problem (after trying a myriad of other things).

@farewelldave
Copy link

farewelldave commented Dec 1, 2016

I want to add my thanks to these additional notes to help with LDAP setup!

I also wanted to mention that for some reason, it seems that if you are a member of the "is_active" and "is_superuser" groups but not the "is_staff" group, the Django Admin link at top right is not visible.

This was not extensively tested, but Chrome only seemed to show the Admin link if you were a member of "is_staff". Furthermore, if you were in "is_active" and "is_staff" but not in "is_superuser", you were able to see the link, but not actually perform any actions.

It would make sense to me to hide the Admin link, unless the user is a member of the "is_superuser" group.

(if I need to make this into a separate issue, let me know - or mod feel free to move)

@jeremystretch
Copy link
Member

Is anyone interested in submitting a PR for this?

@bellwood
Copy link
Contributor

bellwood commented Apr 13, 2017

PR made - if you don't like the usage of info blocks for the buffing please feel free to alter @jeremystretch

Thanks for the contribution @marvnrawley =)

@jeremystretch
Copy link
Member

Merged #1080

lampwins pushed a commit to lampwins/netbox that referenced this issue Oct 13, 2017
Incorporating @marvnrawley's enhancements from netbox-community#518
@lock lock bot locked as resolved and limited conversation to collaborators Jan 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: documentation A change or addition to the documentation
Projects
None yet
Development

No branches or pull requests

5 participants