diff --git a/management/internals/shared/grpc/components_encoder.go b/management/internals/shared/grpc/components_encoder.go index 9f034ebd3..db3c9c366 100644 --- a/management/internals/shared/grpc/components_encoder.go +++ b/management/internals/shared/grpc/components_encoder.go @@ -581,17 +581,16 @@ func (e *componentEncoder) encodeResourcePoliciesMap(rpm map[string][]*types.Pol return out } -func (e *componentEncoder) encodeGroupIDToUserIDs(m map[string][]string) map[uint32]*proto.UserIDList { +func (e *componentEncoder) encodeGroupIDToUserIDs(m map[string][]string) map[string]*proto.UserIDList { if len(m) == 0 { return nil } - out := make(map[uint32]*proto.UserIDList, len(m)) + out := make(map[string]*proto.UserIDList, len(m)) for groupID, userIDs := range m { - seq, ok := e.groupSeq(groupID) - if !ok || len(userIDs) == 0 { + if len(userIDs) == 0 { continue } - out[seq] = &proto.UserIDList{UserIds: userIDs} + out[groupID] = &proto.UserIDList{UserIds: userIDs} } return out } diff --git a/shared/management/proto/management.pb.go b/shared/management/proto/management.pb.go index 59deb73b6..be0e71720 100644 --- a/shared/management/proto/management.pb.go +++ b/shared/management/proto/management.pb.go @@ -4848,8 +4848,8 @@ type NetworkMapComponentsFull struct { // For each NetworkResource id, the indexes into policies[] // that apply to it. ResourcePoliciesMap map[string]*PolicyIndexes `protobuf:"bytes,19,rep,name=resource_policies_map,json=resourcePoliciesMap,proto3" json:"resource_policies_map,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // Group-id (account_seq_id) → user ids authorized for SSH on members. - GroupIdToUserIds map[uint32]*UserIDList `protobuf:"bytes,20,rep,name=group_id_to_user_ids,json=groupIdToUserIds,proto3" json:"group_id_to_user_ids,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Group-id → user ids authorized for SSH on members. + GroupIdToUserIds map[string]*UserIDList `protobuf:"bytes,20,rep,name=group_id_to_user_ids,json=groupIdToUserIds,proto3" json:"group_id_to_user_ids,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // Account-level allowed user ids (used by Calculate() when assembling SSH // authorized users for the receiving peer). AllowedUserIds []string `protobuf:"bytes,21,rep,name=allowed_user_ids,json=allowedUserIds,proto3" json:"allowed_user_ids,omitempty"` @@ -5040,7 +5040,7 @@ func (x *NetworkMapComponentsFull) GetResourcePoliciesMap() map[string]*PolicyIn return nil } -func (x *NetworkMapComponentsFull) GetGroupIdToUserIds() map[uint32]*UserIDList { +func (x *NetworkMapComponentsFull) GetGroupIdToUserIds() map[string]*UserIDList { if x != nil { return x.GroupIdToUserIds } @@ -7468,7 +7468,7 @@ var file_management_proto_rawDesc = []byte{ 0x79, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x5b, 0x0a, 0x15, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x54, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, - 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2c, + 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, diff --git a/shared/management/proto/management.proto b/shared/management/proto/management.proto index a562a9685..72064f35a 100644 --- a/shared/management/proto/management.proto +++ b/shared/management/proto/management.proto @@ -864,8 +864,8 @@ message NetworkMapComponentsFull { // that apply to it. map resource_policies_map = 19; - // Group-id (account_seq_id) → user ids authorized for SSH on members. - map group_id_to_user_ids = 20; + // Group-id → user ids authorized for SSH on members. + map group_id_to_user_ids = 20; // Account-level allowed user ids (used by Calculate() when assembling SSH // authorized users for the receiving peer).