mirror of https://github.com/grafana/grafana.git
Auth: Add support for the TlsSkipVerify parameter to JWT Auth (#91514)
* feat(auth/JWTAuth): add support for the TlsSkipVerify parameter * feat(auth/JWTAuth): add param to default.ini and sample.ini --------- Co-authored-by: Mihaly Gyongyosi <mgyongyosi@users.noreply.github.com>
This commit is contained in:
parent
2e7c28ccbc
commit
561156c4da
|
@ -937,6 +937,7 @@ auto_sign_up = false
|
|||
url_login = false
|
||||
allow_assign_grafana_admin = false
|
||||
skip_org_role_sync = false
|
||||
tls_skip_verify_insecure = false
|
||||
|
||||
#################################### Auth LDAP ###########################
|
||||
[auth.ldap]
|
||||
|
|
|
@ -907,6 +907,7 @@
|
|||
;allow_assign_grafana_admin = false
|
||||
;skip_org_role_sync = false
|
||||
;signout_redirect_url =
|
||||
;tls_skip_verify_insecure = false
|
||||
|
||||
#################################### Auth LDAP ##########################
|
||||
[auth.ldap]
|
||||
|
|
|
@ -162,6 +162,7 @@ func (s *AuthService) initKeySet() error {
|
|||
Transport: &http.Transport{
|
||||
TLSClientConfig: &tls.Config{
|
||||
Renegotiation: tls.RenegotiateFreelyAsClient,
|
||||
InsecureSkipVerify: s.Cfg.JWTAuth.TlsSkipVerify,
|
||||
},
|
||||
Proxy: http.ProxyFromEnvironment,
|
||||
DialContext: (&net.Dialer{
|
||||
|
|
|
@ -27,6 +27,7 @@ type AuthJWTSettings struct {
|
|||
GroupsAttributePath string
|
||||
EmailAttributePath string
|
||||
UsernameAttributePath string
|
||||
TlsSkipVerify bool
|
||||
}
|
||||
|
||||
type ExtJWTSettings struct {
|
||||
|
@ -69,6 +70,7 @@ func (cfg *Cfg) readAuthJWTSettings() {
|
|||
jwtSettings.GroupsAttributePath = valueAsString(authJWT, "groups_attribute_path", "")
|
||||
jwtSettings.EmailAttributePath = valueAsString(authJWT, "email_attribute_path", "")
|
||||
jwtSettings.UsernameAttributePath = valueAsString(authJWT, "username_attribute_path", "")
|
||||
jwtSettings.TlsSkipVerify = authJWT.Key("tls_skip_verify_insecure").MustBool(false)
|
||||
|
||||
cfg.JWTAuth = jwtSettings
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue