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{}{} + } } }