mirror of
https://github.com/owncloud/ocis
synced 2026-04-26 01:35:25 +02:00
proxy: Rework oidc role mapper to allow multiple matching roles
If multiple claims values have a valid matching for ocis roles, we'll pick the ocis role that appears first in the mapping configuration.
This commit is contained in:
committed by
Ralf Haferkamp
parent
b9dc2baaed
commit
6059747491
@@ -60,11 +60,11 @@ func DefaultConfig() *config.Config {
|
||||
// this default is only relevant when Driver is set to "oidc"
|
||||
OIDCRoleMapper: config.OIDCRoleMapper{
|
||||
RoleClaim: "roles",
|
||||
RoleMapping: map[string]string{
|
||||
"admin": "ocisAdmin",
|
||||
"spaceadmin": "ocisSpaceAdmin",
|
||||
"user": "ocisUser",
|
||||
"guest": "ocisGuest",
|
||||
RolesMap: []config.RoleMapping{
|
||||
config.RoleMapping{RoleName: "admin", ClaimValue: "ocisAdmin"},
|
||||
config.RoleMapping{RoleName: "spaceadmin", ClaimValue: "ocisSpaceAdmin"},
|
||||
config.RoleMapping{RoleName: "user", ClaimValue: "ocisUser"},
|
||||
config.RoleMapping{RoleName: "guest", ClaimValue: "ocisGuest"},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user