JWT: Add org role mapping support to the JWT provider (#101584)
* add org role mapping to the jwt provider * Fix indentation for OrgMapping assignment * add-test * fix linting * add org_attribute_path * fix test * update doc * update doc * Update pkg/services/authn/clients/jwt.go * Update docs --------- Co-authored-by: Mihaly Gyongyosi <mgyongyosi@users.noreply.github.com>
This commit is contained in:
co-authored by
Mihaly Gyongyosi
parent
ea89499209
commit
aeca9a80a4
@@ -7,6 +7,7 @@ import (
|
||||
"github.com/grafana/grafana/pkg/infra/remotecache"
|
||||
"github.com/grafana/grafana/pkg/infra/tracing"
|
||||
"github.com/grafana/grafana/pkg/login/social"
|
||||
"github.com/grafana/grafana/pkg/login/social/connectors"
|
||||
"github.com/grafana/grafana/pkg/services/accesscontrol"
|
||||
"github.com/grafana/grafana/pkg/services/accesscontrol/permreg"
|
||||
"github.com/grafana/grafana/pkg/services/apikey"
|
||||
@@ -112,7 +113,8 @@ func ProvideRegistration(
|
||||
}
|
||||
|
||||
if cfg.JWTAuth.Enabled {
|
||||
authnSvc.RegisterClient(clients.ProvideJWT(jwtService, cfg))
|
||||
orgRoleMapper := connectors.ProvideOrgRoleMapper(cfg, orgService)
|
||||
authnSvc.RegisterClient(clients.ProvideJWT(jwtService, orgRoleMapper, cfg))
|
||||
}
|
||||
|
||||
if cfg.ExtJWTAuth.Enabled {
|
||||
|
||||
Reference in New Issue
Block a user