voxpupuli / puppet-grafana

Puppet module to manage Grafana
Apache License 2.0
15 stars 106 forks source link

LDAP configuration file #313

Open denniswoot opened 1 year ago

denniswoot commented 1 year ago

-->

Affected Puppet, Ruby, OS and module versions/distributions

How to reproduce (e.g Puppet code you use)

I have configured ldap in hiera style:

gdn_grafana::ldap:
  servers:
      host: ldap.test.lan
      port: 389
      bind_dn: 'secret'
      bind_password: '%{lookup("secrets::sa_ldap_grafana")}'
      search_filter: "(sAMAccountName=%s)"
      search_base_dns: 
  servers.attributes:
      member_of: memberOf
      email: email
  servers.group_mappings:
      group_dn: 'secret'
      org_role: "Admin"
      grafana_admin: true

What are you seeing

The grafana ldap toml configuration file is not valid. The first server block is [servers] and should be [[servers] This is the same for [servers.group_mappings], it should be [[servers.group_mappings]].

What behaviour did you expect instead

[[servers]] instead of [servers] 
[[servers.group_mappings]] instead of single [servers.group_mappings]

[[servers]]
bind_dn = example
bind_password = "
host = example
port = 389
search_base_dns = xample
search_filter = "xample

[servers.attributes]
email = "email"
member_of = "memberOf"

[[servers.group_mappings]]
grafana_admin = true
group_dn = example
org_role = "Admin"

Output log

Any additional information you'd like to impart

https://grafana.com/docs/grafana/latest/setup-grafana/configure-security/configure-authentication/ldap/