From 8bf13b0d0ced050a059a4c9b43f795a492230df0 Mon Sep 17 00:00:00 2001 From: Viktor Liu Date: Sun, 17 May 2026 06:33:27 +0200 Subject: [PATCH] Merge SSH wildcard authorized users across matching rules --- management/server/types/policy_authorized_users.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/management/server/types/policy_authorized_users.go b/management/server/types/policy_authorized_users.go index 6452a5593..c56a689ca 100644 --- a/management/server/types/policy_authorized_users.go +++ b/management/server/types/policy_authorized_users.go @@ -62,7 +62,12 @@ func applyResolvedRuleToState( return } state.sshEnabled = true - state.authorizedUsers[auth.Wildcard] = cb.getAllowedUserIDs() + if state.authorizedUsers[auth.Wildcard] == nil { + state.authorizedUsers[auth.Wildcard] = make(map[string]struct{}) + } + for userID := range cb.getAllowedUserIDs() { + state.authorizedUsers[auth.Wildcard][userID] = struct{}{} + } } }