Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to set custom LDAP server configuration #305

Closed
darshandeshmukh11 opened this issue Mar 15, 2021 · 1 comment
Closed

Unable to set custom LDAP server configuration #305

darshandeshmukh11 opened this issue Mar 15, 2021 · 1 comment

Comments

@darshandeshmukh11
Copy link

Grafana Version -

apiVersion: v2
name: grafana
version: 6.6.3
appVersion: 7.4.3

Issue - Unable to set custom LDAP configuration the Grafana takes default configuration from /etc/grafana/ldap.toml

Logs from Grafana pod when tried login with LDAP credentials -

t=2021-03-15T07:04:52+0000 lvl=info msg="LDAP enabled, reading config file" logger=ldap file=/etc/grafana/ldap.toml
t=2021-03-15T07:04:52+0000 lvl=eror msg="Error while trying to authenticate user" logger=context userId=0 orgId=0 uname= erro="LDAP Result Code 200 \"Network Error\": dial tcp 127.0.0.1:389: connect: connection refused" remote_addr=127.0.0.1
t=2021-03-15T07:04:52+0000 lvl=eror msg="Request Completed" logger=context userId=0 orgId=0 uname= method=POST path=/login sttus=500 remote_addr=127.0.0.1 time_ms=1 size=53 referer=http://localhost:3000/login
t=2021-03-15T07:13:21+0000 lvl=info msg="Request Completed" logger=context userId=0 orgId=0 uname= method=GET path=/.env stats=302 remote_addr=10.226.64.83 time_ms=0 size=29 referer=
t=2021-03-15T07:13:21+0000 lvl=info msg="Request Completed" logger=context userId=0 orgId=0 uname= method=POST path=/ status=02 remote_addr=10.226.64.253 time_ms=0 size=0 referer=

Configuration - Tried setting up custom LDAP configuration in charts/grafana/values.yaml

## LDAP Authentication can be enabled with the following values on grafana.ini
## NOTE: Grafana will fail to start if the value for ldap.toml is invalid
  auth.ldap:
    enabled: true
    allow_sign_up: true
    config_file: /etc/grafana/ldap.toml

## Grafana's LDAP configuration
## Templated by the template in _helpers.tpl
## NOTE: To enable the grafana.ini must be configured with auth.ldap.enabled
## ref: http://docs.grafana.org/installation/configuration/#auth-ldap
## ref: http://docs.grafana.org/installation/ldap/#configuration
ldap:
  enabled: false
  # `existingSecret` is a reference to an existing secret containing the ldap configuration
  # for Grafana in a key `ldap-toml`.
  existingSecret: ""
  # `config` is the content of `ldap.toml` that will be stored in the created secret
  config: ""
  config: |-
    verbose_logging = true

    [[servers]]
    host = "my.ldaphost.com"
    port = 636
    use_ssl = true
    start_tls = false
    ssl_skip_verify = false
    bind_dn = "OU=NA-Organizations,DC=na,DC=comOU=NA-Infrastructure,DC=na,DC=com"

I couldn't find any help on https://community.grafana.com/

@darshandeshmukh11
Copy link
Author

I was able to fix this adding ldap-toml as a secrets.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant