MyNixOS website logo
option

services.netbox.ldapConfigPath

Path to the Configuration-File for LDAP-Authentication, will be loaded as ldap_config.py. See the documentation for possible options.

Declarations
Type
path
Default
""
Example
''
  import ldap
  from django_auth_ldap.config import LDAPSearch, PosixGroupType
  
  AUTH_LDAP_SERVER_URI = "ldaps://ldap.example.com/"
  
  AUTH_LDAP_USER_SEARCH = LDAPSearch(
      "ou=accounts,ou=posix,dc=example,dc=com",
      ldap.SCOPE_SUBTREE,
      "(uid=%(user)s)",
  )
  
  AUTH_LDAP_GROUP_SEARCH = LDAPSearch(
      "ou=groups,ou=posix,dc=example,dc=com",
      ldap.SCOPE_SUBTREE,
      "(objectClass=posixGroup)",
  )
  AUTH_LDAP_GROUP_TYPE = PosixGroupType()
  
  # Mirror LDAP group assignments.
  AUTH_LDAP_MIRROR_GROUPS = True
  
  # For more granular permissions, we can map LDAP groups to Django groups.
  AUTH_LDAP_FIND_GROUP_PERMS = True
''