Jwk_set_url doesn't pass certificate check

  • What Grafana version and what operating system are you using?
    Grafana 9.1.1, Windows 10.0.19044 Build 19044

  • What are you trying to achieve?
    I am configuring JWT authentication. And particularly signature verification.

  • How are you trying to achieve it?
    I configure
    jwk_set_url = https://localhost:<rest part of URL>

  • What happened?
    On opening Grafana it shows error "Get \"https://localhost:<rest part of URL>\": x509: certificate signed by unknown authority"

  • What did you expect to happen?
    This error should not happen because I set option

[auth.generic_oauth]
tls_skip_verify_insecure = true

What option I can change to make jwk_set_url https running?

UPD. If I download data from URL and use it in jwk_set_file then JWT verification works so it is not a problem of JWKS format.