SAML: graph api follow up (#89389)

* add new graph api variables to saml strategy

* add  config variable
This commit is contained in:
linoman 2024-06-25 12:19:47 +02:00 committed by GitHub
parent 91628158f2
commit ccb22e5b24
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 12 additions and 0 deletions

View File

@ -63,6 +63,10 @@ func (s *SAMLStrategy) loadSAMLSettings() map[string]any {
"role_values_grafana_admin": section.KeyValue("role_values_grafana_admin").MustString(""),
"name_id_format": section.KeyValue("name_id_format").MustString(""),
"skip_org_role_sync": section.KeyValue("skip_org_role_sync").MustBool(false),
"client_id": section.KeyValue("client_id").MustString(""),
"client_secret": section.KeyValue("client_secret").MustString(""),
"token_url": section.KeyValue("token_url").MustString(""),
"force_use_graph_api": section.KeyValue("force_use_graph_api").MustBool(false),
}
return result
}

View File

@ -45,6 +45,10 @@ var (
name_id_format = urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress
skip_org_role_sync = false
role_values_none = guest disabled
token_url = http://localhost:8086/auth/realms/grafana/protocol/openid-connect/token
client_id = grafana
client_secret = grafana
force_use_graph_api = false
`
expectedSAMLInfo = map[string]any{
@ -79,6 +83,10 @@ var (
"name_id_format": "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress",
"skip_org_role_sync": false,
"role_values_none": "guest disabled",
"token_url": "http://localhost:8086/auth/realms/grafana/protocol/openid-connect/token",
"client_id": "grafana",
"client_secret": "grafana",
"force_use_graph_api": false,
}
)