2016-12-14 15:01:02 -06:00
# To troubleshoot and get more log info enable ldap debug logging in grafana.ini
# [log]
# filters = ldap:debug
2015-07-15 03:08:23 -05:00
[ [ servers ] ]
2015-10-11 11:14:46 -05:00
# Ldap server host (specify multiple hosts space separated)
2015-07-15 03:08:23 -05:00
host = "127.0.0.1"
2015-07-15 07:48:39 -05:00
# Default port is 389 or 636 if use_ssl = true
2015-07-15 03:08:23 -05:00
port = 389
2020-12-23 02:14:02 -06:00
# Set to true if LDAP server should use an encrypted TLS connection (either with STARTTLS or LDAPS)
2015-07-15 03:08:23 -05:00
use_ssl = false
2020-12-23 02:14:02 -06:00
# If set to true, use LDAP with STARTTLS instead of LDAPS
2016-09-10 02:40:57 -05:00
start_tls = false
2023-02-28 05:13:46 -06: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 04:57:59 -05:00
# set to true if you want to skip ssl cert validation
ssl_skip_verify = false
2015-10-11 11:38:33 -05:00
# set to the path to your root CA certificate or leave unset to use system defaults
2017-04-06 02:53:11 -05:00
# root_ca_cert = "/path/to/certificate.crt"
2018-08-03 05:00:20 -05:00
# Authentication against LDAP servers requiring client certificates
# client_cert = "/path/to/client.crt"
# client_key = "/path/to/client.key"
2015-07-15 03:08:23 -05:00
2015-07-15 07:48:39 -05:00
# Search user bind dn
2015-07-15 03:08:23 -05:00
bind_dn = "cn=admin,dc=grafana,dc=org"
2015-07-15 07:48:39 -05:00
# Search user bind password
2018-02-15 12:41:15 -06:00
# If the password contains # or ; you have to wrap it with triple quotes. Ex """#password;"""
2015-07-18 02:30:09 -05:00
bind_password = 'grafana'
2022-10-07 11:04:37 -05: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 03:08:23 -05:00
2022-07-08 01:52:54 -05:00
# Timeout in seconds (applies to each host specified in the 'host' entry (space separated))
timeout = 10
2015-10-26 10:21:03 -05:00
# User search filter, for example "(cn=%s)" or "(sAMAccountName=%s)" or "(uid=%s)"
2015-07-15 03:08:23 -05:00
search_filter = "(cn=%s)"
2015-10-26 10:21:03 -05:00
2015-07-15 07:48:39 -05:00
# An array of base dns to search through
2015-07-15 03:08:23 -05:00
search_base_dns = [ "dc=grafana,dc=org" ]
2018-09-14 04:28:17 -05: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 13:36:21 -05:00
# group_search_filter = "(&(objectClass=posixGroup)(memberUid=%s))"
# group_search_base_dns = ["ou=groups,dc=grafana,dc=org"]
2018-09-14 04:28:17 -05:00
# group_search_filter_user_attribute = "uid"
2015-10-13 13:36:21 -05:00
2015-07-15 07:48:39 -05:00
# Specify names of the ldap attributes your ldap uses
2015-07-15 03:08:23 -05:00
[ servers . attributes ]
name = "givenName"
surname = "sn"
username = "cn"
member_of = "memberOf"
email = "email"
2015-07-15 07:48:39 -05:00
# Map ldap groups to grafana org roles
2015-07-15 03:08:23 -05:00
[ [ servers . group_mappings ] ]
2019-08-02 05:00:13 -05:00
group_dn = "cn=admins,ou=groups,dc=grafana,dc=org"
2015-07-15 03:08:23 -05:00
org_role = "Admin"
2018-07-18 06:20:28 -05:00
# To make user an instance admin (Grafana Admin) uncomment line below
2018-07-16 09:56:42 -05:00
# grafana_admin = true
2015-07-15 07:48:39 -05:00
# The Grafana organization database id, optional, if left out the default org (id 1) will be used
# org_id = 1
2015-07-15 03:08:23 -05:00
2015-08-01 03:28:43 -05:00
[ [ servers . group_mappings ] ]
2022-10-24 04:01:58 -05:00
group_dn = "cn=editors,ou=groups,dc=grafana,dc=org"
2015-07-15 03:08:23 -05:00
org_role = "Editor"
[ [ servers . group_mappings ] ]
2015-07-15 07:48:39 -05:00
# If you want to match all (or no ldap groups) then you can use wildcard
2015-07-15 03:08:23 -05:00
group_dn = "*"
org_role = "Viewer"