ldap_dev.toml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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 supports TLS
  10. use_ssl = false
  11. # Set to true if connect ldap server with STARTTLS pattern (create connection in insecure, then upgrade to secure connection with TLS)
  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. # Search user bind dn
  18. bind_dn = "cn=admin,dc=grafana,dc=org"
  19. # Search user bind password
  20. # If the password contains # or ; you have to wrap it with triple quotes. Ex """#password;"""
  21. bind_password = 'grafana'
  22. # User search filter, for example "(cn=%s)" or "(sAMAccountName=%s)" or "(uid=%s)"
  23. search_filter = "(cn=%s)"
  24. # An array of base dns to search through
  25. search_base_dns = ["dc=grafana,dc=org"]
  26. # Specify names of the ldap attributes your ldap uses
  27. [servers.attributes]
  28. name = "givenName"
  29. surname = "sn"
  30. username = "cn"
  31. member_of = "memberOf"
  32. email = "email"
  33. # Map ldap groups to grafana org roles
  34. [[servers.group_mappings]]
  35. group_dn = "cn=admins,ou=groups,dc=grafana,dc=org"
  36. org_role = "Admin"
  37. grafana_admin = true
  38. # The Grafana organization database id, optional, if left out the default org (id 1) will be used
  39. # org_id = 1
  40. [[servers.group_mappings]]
  41. group_dn = "cn=editors,ou=groups,dc=grafana,dc=org"
  42. org_role = "Editor"
  43. [[servers.group_mappings]]
  44. # If you want to match all (or no ldap groups) then you can use wildcard
  45. group_dn = "*"
  46. org_role = "Viewer"