ldap.toml 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. # To troubleshoot and get more log info enable ldap debug logging in grafana.ini
  2. # [log]
  3. # filters = ldap:debug
  4. [[servers]]
  5. # Ldap server host (specify multiple hosts space separated)
  6. host = "127.0.0.1"
  7. # Default port is 389 or 636 if use_ssl = true
  8. port = 389
  9. # Set to true if LDAP server should use an encrypted TLS connection (either with STARTTLS or LDAPS)
  10. use_ssl = false
  11. # If set to true, use LDAP with STARTTLS instead of LDAPS
  12. start_tls = false
  13. # set to true if you want to skip ssl cert validation
  14. ssl_skip_verify = false
  15. # set to the path to your root CA certificate or leave unset to use system defaults
  16. # root_ca_cert = "/path/to/certificate.crt"
  17. # Authentication against LDAP servers requiring client certificates
  18. # client_cert = "/path/to/client.crt"
  19. # client_key = "/path/to/client.key"
  20. # Search user bind dn
  21. bind_dn = "cn=admin,dc=grafana,dc=org"
  22. # Search user bind password
  23. # If the password contains # or ; you have to wrap it with triple quotes. Ex """#password;"""
  24. bind_password = 'grafana'
  25. # User search filter, for example "(cn=%s)" or "(sAMAccountName=%s)" or "(uid=%s)"
  26. search_filter = "(cn=%s)"
  27. # An array of base dns to search through
  28. search_base_dns = ["dc=grafana,dc=org"]
  29. ## For Posix or LDAP setups that does not support member_of attribute you can define the below settings
  30. ## Please check grafana LDAP docs for examples
  31. # group_search_filter = "(&(objectClass=posixGroup)(memberUid=%s))"
  32. # group_search_base_dns = ["ou=groups,dc=grafana,dc=org"]
  33. # group_search_filter_user_attribute = "uid"
  34. # Specify names of the ldap attributes your ldap uses
  35. [servers.attributes]
  36. name = "givenName"
  37. surname = "sn"
  38. username = "cn"
  39. member_of = "memberOf"
  40. email = "email"
  41. # Map ldap groups to grafana org roles
  42. [[servers.group_mappings]]
  43. group_dn = "cn=admins,ou=groups,dc=grafana,dc=org"
  44. org_role = "Admin"
  45. # To make user an instance admin (Grafana Admin) uncomment line below
  46. # grafana_admin = true
  47. # The Grafana organization database id, optional, if left out the default org (id 1) will be used
  48. # org_id = 1
  49. [[servers.group_mappings]]
  50. group_dn = "cn=users,ou=groups,dc=grafana,dc=org"
  51. org_role = "Editor"
  52. [[servers.group_mappings]]
  53. # If you want to match all (or no ldap groups) then you can use wildcard
  54. group_dn = "*"
  55. org_role = "Viewer"