ldap.toml 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. # Set to true to log user information returned from LDAP
  2. verbose_logging = false
  3. [[servers]]
  4. # Ldap server host (specify multiple hosts space separated)
  5. host = "127.0.0.1"
  6. # Default port is 389 or 636 if use_ssl = true
  7. port = 389
  8. # Set to true if ldap server supports TLS
  9. use_ssl = false
  10. # set to true if you want to skip ssl cert validation
  11. ssl_skip_verify = false
  12. # set to the path to your root CA certificate or leave unset to use system defaults
  13. # root_ca_cert = /path/to/certificate.crt
  14. # Search user bind dn
  15. bind_dn = "cn=admin,dc=grafana,dc=org"
  16. # Search user bind password
  17. bind_password = 'grafana'
  18. # User search filter, for example "(cn=%s)" or "(sAMAccountName=%s)" or "(uid=%s)"
  19. search_filter = "(cn=%s)"
  20. # An array of base dns to search through
  21. search_base_dns = ["dc=grafana,dc=org"]
  22. # In POSIX LDAP schemas, without memberOf attribute a secondary query must be made for groups.
  23. # This is done by enabling group_search_filter below. You must also set member_of= "cn"
  24. # in [servers.attributes] below.
  25. ## Group search filter, to retrieve the groups of which the user is a member (only set if memberOf attribute is not available)
  26. # group_search_filter = "(&(objectClass=posixGroup)(memberUid=%s))"
  27. ## An array of the base DNs to search through for groups. Typically uses ou=groups
  28. # group_search_base_dns = ["ou=groups,dc=grafana,dc=org"]
  29. # Specify names of the ldap attributes your ldap uses
  30. [servers.attributes]
  31. name = "givenName"
  32. surname = "sn"
  33. username = "cn"
  34. member_of = "memberOf"
  35. email = "email"
  36. # Map ldap groups to grafana org roles
  37. [[servers.group_mappings]]
  38. group_dn = "cn=admins,dc=grafana,dc=org"
  39. org_role = "Admin"
  40. # The Grafana organization database id, optional, if left out the default org (id 1) will be used
  41. # org_id = 1
  42. [[servers.group_mappings]]
  43. group_dn = "cn=users,dc=grafana,dc=org"
  44. org_role = "Editor"
  45. [[servers.group_mappings]]
  46. # If you want to match all (or no ldap groups) then you can use wildcard
  47. group_dn = "*"
  48. org_role = "Viewer"