lgazo
July 28, 2018, 7:42am
1
Hi,
I have KeyCloak identity server that is running with non-production certificate so far. I would like to connect Grafana’s OAuth to it but it complains because of TLS verification. I have found there is a flag to overcome it.
I have set GF_AUTH_GENERIC_OAUTH_TLS_SKIP_VERIFY_INSECURE=true but it seems the variable is not taken at the beginning, other generic OAuth variables are.
I use following version:
t=2018-07-28T07:22:10+0000 lvl=info msg="Starting Grafana" logger=server version=5.2.2 commit=aeaf7b2 compiled=2018-07-25T11:17:28+0000
I can also see multiple values being overriden:
t=2018-07-28T07:22:10+0000 lvl=info msg="Config overridden from Environment variable" logger=settings var="GF_AUTH_GENERIC_OAUTH_ENABLED=true"
Is there a bug or I am doing something wrong?
Thank you for help.
I guess, it’s not implemented. Did you find it in the documentation?
lgazo
July 28, 2018, 11:14am
3
I found it in the code And it was merged in October 2017…
grafana:master
← mattbostock:verify_tls
opened 02:20PM - 28 Sep 17 UTC
TLS was not being verified in a number of places:
- connections to grafana.co… m
- connections to OAuth providers when TLS client authentication was
enabled
- connections to self-hosted Grafana installations when using the CLI
tool
TLS should always be verified unless the user explicitly enables an
option to skip verification.
Removes some instances where `InsecureSkipVerify` is explicitly set to
`false`, the default, to help avoid confusion and make it more difficult
to regress on this fix by accident.
Adds a `--insecure` flag to `grafana-cli` to skip TLS verification.
Adds a `tls_skip_verify_insecure` setting for OAuth.
Adds a `app_tls_skip_verify_insecure` setting under a new `[plugins]`
section.
I'm not super happy with the way the global setting is used by
`pkg/api/app_routes.go` but that seems to be the existing pattern used.
16c5d0e
Fixes #9373, #9419 and is similar to #9377 (which fixes this for datasources).
https://github.com/grafana/grafana/blob/master/pkg/social/social.go
So probably I am missing something…
You are right. It looks like a bug. Config option is missing in conf/defaults.ini
, so you can’t override it with env variable.
lgazo
July 28, 2018, 5:17pm
5
if that is the only thing, I can create pull request for that, but I am not a Go developer yet I will report an issue along.