I am configuring oAuth in grafana with Github. I am able to login but getting below error.
2018-03-21T20:37:59.386274782Z t=2018-03-21T20:37:59+0000 lvl=eror msg=login.OAuthLogin(NewTransportWithCode) logger=context userId=0 orgId=0 uname= error=“Post https://github.nml.com/login/oauth/access_token: x509: certificate signed by unknown authority”
Thanks for the reply. Actually I do have the CA root certificate file (.pem) but I am not able to understand where should I put it or what exactly should be done to get this issue resolved.
Ours is an onprem github server with proper CA certificates installed in it.
You didn’t provide any details about your setup so have to guess what the problem is.
The grafana cert is from Comodo which is a trusted Certificate Authority so the problem is either:
that your Operating System needs to have its certificates updated. (try updating/installing certificate(s) on your system. For example on FreeBSD, use pkg install ca_root_nss , or on ubuntu update-ca-certificates)
You are behind a proxy or firewall. If you are on an OS with curl installed, does this return TLS errors too? curl -v https://grafana.com/api/plugins/ryantxu-ajax-panel/versions/0.0.6/download
Or are you using a self-signed cert with GitHub Enterprise?
Yes, sorry, I forgot about details)
We use self-signed cert because of DLP security system (it uses mitm cert replacement)
curl:
* About to connect() to grafana.com port 443 (#0)
* Trying 35.241.23.245…
* Connected to grafana.com (35.241.23.245) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
* CAfile: /etc/pki/tls/certs/ca-bundle.crt
CApath: none
* Server certificate:
* subject: CN=grafana.com,OU=PositiveSSL Multi-Domain,OU=Domain Control Validated
* start date: Feb 06 00:00:00 2019 GMT
* expire date: May 06 23:59:59 2020 GMT
* common name: grafana.com
* issuer: CN=xCA,DC=x,DC=x
* NSS error -8172 (SEC_ERROR_UNTRUSTED_ISSUER)
* Peer’s certificate issuer has been marked as not trusted by the user.
* Closing connection 0
curl: (60) Peer’s certificate issuer has been marked as not trusted by the user.
More details here: http://curl.haxx.se/docs/sslcerts.html