Guest User

Untitled

a guest
Apr 23rd, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.40 KB | None | 0 0
  1. AUTH_LDAP_SERVER_URI = "ldap://ldap.example.com"
  2. AUTH_LDAP_START_TLS = True
  3.  
  4. AUTH_LDAP_BIND_DN = ""
  5. AUTH_LDAP_BIND_PASSWORD = ""
  6. AUTH_LDAP_USER_SEARCH = LDAPSearch("cn=users,dc=example,dc=com",
  7. ldap.SCOPE_SUBTREE, "(uid=%(user)s)")
  8.  
  9.  
  10.  
  11. # Set up the basic group parameters.
  12. AUTH_LDAP_GROUP_SEARCH = LDAPSearch("cn=example_group,cn=groups,dc=example,dc=com",
  13. ldap.SCOPE_SUBTREE, "(objectClass=groupOfNames)"
  14. )
  15.  
  16. AUTH_LDAP_GROUP_TYPE = GroupOfNamesType(name_attr="cn")
  17.  
  18.  
  19. AUTH_LDAP_REQUIRE_GROUP = "cn=example_group,cn=groups,dc=example,dc=com"
  20.  
  21. search_s('cn=users,dc=example,dc=com', 2, '(uid=%(user)s)') returned 1 objects: cn=example_user,cn=users,dc=example,dc=com
  22. cn=example_user,cn=users,dc=example,dc=com is not a member of cn=example_group,cn=groups,dc=example,dc=com
  23. Authentication failed for example_user: user does not satisfy AUTH_LDAP_REQUIRE_GROUP
  24.  
  25. ldap_bind: Success (0)
  26. [...]
  27. # extended LDIF
  28. #
  29. # LDAPv3
  30. # base <cn=example_group,cn=groups,dc=example,dc=com> with scope subtree
  31. # filter: (objectclass=*)
  32. # requesting: ALL
  33. #
  34.  
  35. # example_group, Groups, example.com
  36. dn: cn=example_group,cn=Groups,dc=example,dc=com
  37. cn: example_group
  38. objectclass: top
  39. objectclass: groupOfUniqueNames
  40. objectclass: orclGroup
  41. description: [...]
  42. displayname: example_group
  43. orclisvisible: true
  44. uniquemember: cn=example_user,cn=users,dc=example,dc=com
  45.  
  46. # search result
  47. search: 2
  48. result: 0 Success
  49.  
  50. # numResponses: 2
  51. # numEntries: 1
Add Comment
Please, Sign In to add comment