2016-12-14 22:01:02 +01:00
# To troubleshoot and get more log info enable ldap debug logging in grafana.ini
# [log]
# filters = ldap:debug
2015-07-15 10:08:23 +02:00
[ [ servers ] ]
2015-10-11 17:14:46 +01:00
# Ldap server host (specify multiple hosts space separated)
2015-07-15 10:08:23 +02:00
host = "127.0.0.1"
2015-07-15 14:48:39 +02:00
# Default port is 389 or 636 if use_ssl = true
2015-07-15 10:08:23 +02:00
port = 389
2020-12-23 09:14:02 +01:00
# Set to true if LDAP server should use an encrypted TLS connection (either with STARTTLS or LDAPS)
2015-07-15 10:08:23 +02:00
use_ssl = false
2020-12-23 09:14:02 +01:00
# If set to true, use LDAP with STARTTLS instead of LDAPS
2016-09-10 15:40:57 +08:00
start_tls = false
2023-02-28 11:13:46 +00:00
# The value of an accepted TLS cipher. By default, this value is empty. Example value: ["TLS_AES_256_GCM_SHA384"])
# For a complete list of supported ciphers and TLS versions, refer to: https://go.dev/src/crypto/tls/cipher_suites.go
tls_ciphers = [ ]
# This is the minimum TLS version allowed. By default, this value is empty. Accepted values are: TLS1.1, TLS1.2, TLS1.3.
min_tls_version = ""
2015-07-16 11:57:59 +02:00
# set to true if you want to skip ssl cert validation
ssl_skip_verify = false
2015-10-11 17:38:33 +01:00
# set to the path to your root CA certificate or leave unset to use system defaults
2017-04-06 09:53:11 +02:00
# root_ca_cert = "/path/to/certificate.crt"
2018-08-03 12:00:20 +02:00
# Authentication against LDAP servers requiring client certificates
# client_cert = "/path/to/client.crt"
# client_key = "/path/to/client.key"
2015-07-15 10:08:23 +02:00
2015-07-15 14:48:39 +02:00
# Search user bind dn
2015-07-15 10:08:23 +02:00
bind_dn = "cn=admin,dc=grafana,dc=org"
2015-07-15 14:48:39 +02:00
# Search user bind password
2018-02-15 10:41:15 -08:00
# If the password contains # or ; you have to wrap it with triple quotes. Ex """#password;"""
2015-07-18 09:30:09 +02:00
bind_password = 'grafana'
2022-10-07 17:04:37 +01:00
# We recommend using variable expansion for the bind_password, for more info https://grafana.com/docs/grafana/latest/setup-grafana/configure-grafana/#variable-expansion
# bind_password = '$__env{LDAP_BIND_PASSWORD}'
2015-07-15 10:08:23 +02:00
2022-07-08 08:52:54 +02:00
# Timeout in seconds (applies to each host specified in the 'host' entry (space separated))
timeout = 10
2015-10-26 16:21:03 +01:00
# User search filter, for example "(cn=%s)" or "(sAMAccountName=%s)" or "(uid=%s)"
2015-07-15 10:08:23 +02:00
search_filter = "(cn=%s)"
2015-10-26 16:21:03 +01:00
2015-07-15 14:48:39 +02:00
# An array of base dns to search through
2015-07-15 10:08:23 +02:00
search_base_dns = [ "dc=grafana,dc=org" ]
2018-09-14 11:28:17 +02:00
## For Posix or LDAP setups that does not support member_of attribute you can define the below settings
## Please check grafana LDAP docs for examples
2015-10-13 19:36:21 +01:00
# group_search_filter = "(&(objectClass=posixGroup)(memberUid=%s))"
# group_search_base_dns = ["ou=groups,dc=grafana,dc=org"]
2018-09-14 11:28:17 +02:00
# group_search_filter_user_attribute = "uid"
2015-10-13 19:36:21 +01:00
2015-07-15 14:48:39 +02:00
# Specify names of the ldap attributes your ldap uses
2015-07-15 10:08:23 +02:00
[ servers . attributes ]
name = "givenName"
surname = "sn"
username = "cn"
member_of = "memberOf"
email = "email"
2015-07-15 14:48:39 +02:00
# Map ldap groups to grafana org roles
2015-07-15 10:08:23 +02:00
[ [ servers . group_mappings ] ]
2019-08-02 12:00:13 +02:00
group_dn = "cn=admins,ou=groups,dc=grafana,dc=org"
2015-07-15 10:08:23 +02:00
org_role = "Admin"
2018-07-18 13:20:28 +02:00
# To make user an instance admin (Grafana Admin) uncomment line below
2018-07-16 16:56:42 +02:00
# grafana_admin = true
2015-07-15 14:48:39 +02:00
# The Grafana organization database id, optional, if left out the default org (id 1) will be used
# org_id = 1
2015-07-15 10:08:23 +02:00
2015-08-01 10:28:43 +02:00
[ [ servers . group_mappings ] ]
2022-10-24 11:01:58 +02:00
group_dn = "cn=editors,ou=groups,dc=grafana,dc=org"
2015-07-15 10:08:23 +02:00
org_role = "Editor"
[ [ servers . group_mappings ] ]
2015-07-15 14:48:39 +02:00
# If you want to match all (or no ldap groups) then you can use wildcard
2015-07-15 10:08:23 +02:00
group_dn = "*"
org_role = "Viewer"