Skip to content

Commit 3454611

Browse files
committed
fixes
1 parent 4cf752b commit 3454611

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

internal/auth/oidc.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import (
1010
"io"
1111
"maps"
1212
"net/http"
13+
"strings"
1314
"time"
1415

1516
"github.com/coreos/go-oidc/v3/oidc"
@@ -354,8 +355,11 @@ func (h *OIDCHandler) mapClaimsToRoles(ctx context.Context, userID string, claim
354355
var resolvedRoles []string
355356
if len(h.config.RoleMapping) > 0 {
356357
for _, claimVal := range claimValues {
357-
if localRole, ok := h.config.RoleMapping[claimVal]; ok {
358-
resolvedRoles = append(resolvedRoles, localRole)
358+
for mapKey, localRole := range h.config.RoleMapping { // yaml map keys apparently lower case themselves?
359+
if strings.EqualFold(claimVal, mapKey) {
360+
resolvedRoles = append(resolvedRoles, localRole)
361+
break
362+
}
359363
}
360364
}
361365
} else if !h.config.RejectUnmapped {

internal/db/migrations.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ func seeds(s *Store) error {
7878
func migrations() []*gormigrate.Migration {
7979
return []*gormigrate.Migration{
8080
{
81-
ID: "20260226_001_backfill_user_roles",
81+
ID: "20260306_001_retry_backfill_user_roles",
8282
Migrate: func(tx *gorm.DB) error {
8383
// Find users that have no entry in user_roles
8484
var usersWithoutRoles []User

0 commit comments

Comments
 (0)