From 92923f6801b3fbd534f6723e99a3447cc1b50c69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Wed, 15 Feb 2023 14:24:19 +0100 Subject: [PATCH] Add http endpoint to list permissions (#5571) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add http endpoint to list permissions Signed-off-by: Jörn Friedrich Dreyer * extract handler registration Signed-off-by: Jörn Friedrich Dreyer * use generated protobuf Signed-off-by: Jörn Friedrich Dreyer * update permissions mock in graph service Signed-off-by: Jörn Friedrich Dreyer * add unit test Signed-off-by: Jörn Friedrich Dreyer * return correct userid Signed-off-by: Jörn Friedrich Dreyer * assert error message type in tests Signed-off-by: Jörn Friedrich Dreyer --------- Signed-off-by: Jörn Friedrich Dreyer --- .../ocis/services/settings/v0/settings.pb.go | 656 +++++++++++------- .../services/settings/v0/settings.pb.micro.go | 29 + .../services/settings/v0/settings.pb.web.go | 99 +++ .../settings/v0/settings.swagger.json | 51 ++ .../ocis/services/settings/v0/settings.proto | 14 + services/graph/mocks/permissions.go | 30 + services/graph/pkg/service/v0/graph.go | 1 + services/settings/pkg/service/v0/service.go | 65 +- .../settings/pkg/service/v0/service_test.go | 65 ++ 9 files changed, 744 insertions(+), 266 deletions(-) diff --git a/protogen/gen/ocis/services/settings/v0/settings.pb.go b/protogen/gen/ocis/services/settings/v0/settings.pb.go index a7d6938ed..65616cd0b 100644 --- a/protogen/gen/ocis/services/settings/v0/settings.pb.go +++ b/protogen/gen/ocis/services/settings/v0/settings.pb.go @@ -1055,6 +1055,100 @@ func (x *RemoveRoleFromUserRequest) GetId() string { return "" } +type ListPermissionsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AccountUuid string `protobuf:"bytes,1,opt,name=account_uuid,json=accountUuid,proto3" json:"account_uuid,omitempty"` +} + +func (x *ListPermissionsRequest) Reset() { + *x = ListPermissionsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_services_settings_v0_settings_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListPermissionsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListPermissionsRequest) ProtoMessage() {} + +func (x *ListPermissionsRequest) ProtoReflect() protoreflect.Message { + mi := &file_ocis_services_settings_v0_settings_proto_msgTypes[21] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListPermissionsRequest.ProtoReflect.Descriptor instead. +func (*ListPermissionsRequest) Descriptor() ([]byte, []int) { + return file_ocis_services_settings_v0_settings_proto_rawDescGZIP(), []int{21} +} + +func (x *ListPermissionsRequest) GetAccountUuid() string { + if x != nil { + return x.AccountUuid + } + return "" +} + +type ListPermissionsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Permissions []string `protobuf:"bytes,1,rep,name=permissions,proto3" json:"permissions,omitempty"` +} + +func (x *ListPermissionsResponse) Reset() { + *x = ListPermissionsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_services_settings_v0_settings_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListPermissionsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListPermissionsResponse) ProtoMessage() {} + +func (x *ListPermissionsResponse) ProtoReflect() protoreflect.Message { + mi := &file_ocis_services_settings_v0_settings_proto_msgTypes[22] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListPermissionsResponse.ProtoReflect.Descriptor instead. +func (*ListPermissionsResponse) Descriptor() ([]byte, []int) { + return file_ocis_services_settings_v0_settings_proto_rawDescGZIP(), []int{22} +} + +func (x *ListPermissionsResponse) GetPermissions() []string { + if x != nil { + return x.Permissions + } + return nil +} + type ListPermissionsByResourceRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1066,7 +1160,7 @@ type ListPermissionsByResourceRequest struct { func (x *ListPermissionsByResourceRequest) Reset() { *x = ListPermissionsByResourceRequest{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_services_settings_v0_settings_proto_msgTypes[21] + mi := &file_ocis_services_settings_v0_settings_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1079,7 +1173,7 @@ func (x *ListPermissionsByResourceRequest) String() string { func (*ListPermissionsByResourceRequest) ProtoMessage() {} func (x *ListPermissionsByResourceRequest) ProtoReflect() protoreflect.Message { - mi := &file_ocis_services_settings_v0_settings_proto_msgTypes[21] + mi := &file_ocis_services_settings_v0_settings_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1092,7 +1186,7 @@ func (x *ListPermissionsByResourceRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListPermissionsByResourceRequest.ProtoReflect.Descriptor instead. func (*ListPermissionsByResourceRequest) Descriptor() ([]byte, []int) { - return file_ocis_services_settings_v0_settings_proto_rawDescGZIP(), []int{21} + return file_ocis_services_settings_v0_settings_proto_rawDescGZIP(), []int{23} } func (x *ListPermissionsByResourceRequest) GetResource() *v0.Resource { @@ -1113,7 +1207,7 @@ type ListPermissionsByResourceResponse struct { func (x *ListPermissionsByResourceResponse) Reset() { *x = ListPermissionsByResourceResponse{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_services_settings_v0_settings_proto_msgTypes[22] + mi := &file_ocis_services_settings_v0_settings_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1126,7 +1220,7 @@ func (x *ListPermissionsByResourceResponse) String() string { func (*ListPermissionsByResourceResponse) ProtoMessage() {} func (x *ListPermissionsByResourceResponse) ProtoReflect() protoreflect.Message { - mi := &file_ocis_services_settings_v0_settings_proto_msgTypes[22] + mi := &file_ocis_services_settings_v0_settings_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1139,7 +1233,7 @@ func (x *ListPermissionsByResourceResponse) ProtoReflect() protoreflect.Message // Deprecated: Use ListPermissionsByResourceResponse.ProtoReflect.Descriptor instead. func (*ListPermissionsByResourceResponse) Descriptor() ([]byte, []int) { - return file_ocis_services_settings_v0_settings_proto_rawDescGZIP(), []int{22} + return file_ocis_services_settings_v0_settings_proto_rawDescGZIP(), []int{24} } func (x *ListPermissionsByResourceResponse) GetPermissions() []*v0.Permission { @@ -1160,7 +1254,7 @@ type GetPermissionByIDRequest struct { func (x *GetPermissionByIDRequest) Reset() { *x = GetPermissionByIDRequest{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_services_settings_v0_settings_proto_msgTypes[23] + mi := &file_ocis_services_settings_v0_settings_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1173,7 +1267,7 @@ func (x *GetPermissionByIDRequest) String() string { func (*GetPermissionByIDRequest) ProtoMessage() {} func (x *GetPermissionByIDRequest) ProtoReflect() protoreflect.Message { - mi := &file_ocis_services_settings_v0_settings_proto_msgTypes[23] + mi := &file_ocis_services_settings_v0_settings_proto_msgTypes[25] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1186,7 +1280,7 @@ func (x *GetPermissionByIDRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetPermissionByIDRequest.ProtoReflect.Descriptor instead. func (*GetPermissionByIDRequest) Descriptor() ([]byte, []int) { - return file_ocis_services_settings_v0_settings_proto_rawDescGZIP(), []int{23} + return file_ocis_services_settings_v0_settings_proto_rawDescGZIP(), []int{25} } func (x *GetPermissionByIDRequest) GetPermissionId() string { @@ -1207,7 +1301,7 @@ type GetPermissionByIDResponse struct { func (x *GetPermissionByIDResponse) Reset() { *x = GetPermissionByIDResponse{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_services_settings_v0_settings_proto_msgTypes[24] + mi := &file_ocis_services_settings_v0_settings_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1220,7 +1314,7 @@ func (x *GetPermissionByIDResponse) String() string { func (*GetPermissionByIDResponse) ProtoMessage() {} func (x *GetPermissionByIDResponse) ProtoReflect() protoreflect.Message { - mi := &file_ocis_services_settings_v0_settings_proto_msgTypes[24] + mi := &file_ocis_services_settings_v0_settings_proto_msgTypes[26] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1233,7 +1327,7 @@ func (x *GetPermissionByIDResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetPermissionByIDResponse.ProtoReflect.Descriptor instead. func (*GetPermissionByIDResponse) Descriptor() ([]byte, []int) { - return file_ocis_services_settings_v0_settings_proto_rawDescGZIP(), []int{24} + return file_ocis_services_settings_v0_settings_proto_rawDescGZIP(), []int{26} } func (x *GetPermissionByIDResponse) GetPermission() *v0.Permission { @@ -1367,212 +1461,230 @@ var file_ocis_services_settings_v0_settings_proto_rawDesc = []byte{ 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x2b, 0x0a, 0x19, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x46, 0x72, 0x6f, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x63, 0x0a, 0x20, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x65, - 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x08, 0x72, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, - 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, - 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x6c, 0x0a, 0x21, 0x4c, - 0x69, 0x73, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, - 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x47, 0x0a, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, + 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x3b, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x65, + 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x75, 0x75, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x55, + 0x75, 0x69, 0x64, 0x22, 0x3b, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x20, + 0x0a, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x22, 0x63, 0x0a, 0x20, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, + 0x76, 0x30, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x6c, 0x0a, 0x21, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x65, 0x72, + 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x0b, 0x70, 0x65, + 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x25, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, + 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x50, 0x65, 0x72, 0x6d, + 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x22, 0x3f, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x23, 0x0a, 0x0d, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x62, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x45, 0x0a, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, - 0x30, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x70, 0x65, - 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x3f, 0x0a, 0x18, 0x47, 0x65, 0x74, - 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x65, - 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x62, 0x0a, 0x19, 0x47, 0x65, - 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x49, 0x44, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x63, - 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, - 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x52, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0xa6, - 0x06, 0x0a, 0x0d, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x12, 0x92, 0x01, 0x0a, 0x0a, 0x53, 0x61, 0x76, 0x65, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, - 0x2c, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, - 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x53, 0x61, 0x76, 0x65, - 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, + 0x30, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x70, 0x65, + 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0xa6, 0x06, 0x0a, 0x0d, 0x42, 0x75, 0x6e, + 0x64, 0x6c, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x92, 0x01, 0x0a, 0x0a, 0x53, + 0x61, 0x76, 0x65, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x2c, 0x2e, 0x6f, 0x63, 0x69, 0x73, + 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, + 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x53, 0x61, 0x76, 0x65, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, + 0x2e, 0x76, 0x30, 0x2e, 0x53, 0x61, 0x76, 0x65, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x22, 0x1c, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, + 0x2f, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2d, 0x73, 0x61, 0x76, 0x65, 0x3a, 0x01, 0x2a, 0x12, + 0x8e, 0x01, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x2b, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, - 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x53, 0x61, 0x76, 0x65, 0x42, 0x75, - 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x21, 0x22, 0x1c, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, - 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2d, 0x73, 0x61, - 0x76, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x8e, 0x01, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x42, 0x75, 0x6e, - 0x64, 0x6c, 0x65, 0x12, 0x2b, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, - 0x47, 0x65, 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x2c, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, - 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x47, 0x65, 0x74, - 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x22, 0x1b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, - 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2d, - 0x67, 0x65, 0x74, 0x3a, 0x01, 0x2a, 0x12, 0x96, 0x01, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x42, - 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x12, 0x2d, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, - 0x76, 0x30, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, - 0x30, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x22, 0x1d, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, - 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x2d, 0x6c, 0x69, 0x73, 0x74, 0x3a, 0x01, 0x2a, 0x12, - 0xb2, 0x01, 0x0a, 0x12, 0x41, 0x64, 0x64, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x54, 0x6f, - 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x34, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, + 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x6e, + 0x64, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x6f, 0x63, 0x69, + 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, + 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, + 0x22, 0x1b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, + 0x67, 0x73, 0x2f, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2d, 0x67, 0x65, 0x74, 0x3a, 0x01, 0x2a, + 0x12, 0x96, 0x01, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, + 0x12, 0x2d, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, + 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x2e, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, + 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x22, 0x1d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, + 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, + 0x73, 0x2d, 0x6c, 0x69, 0x73, 0x74, 0x3a, 0x01, 0x2a, 0x12, 0xb2, 0x01, 0x0a, 0x12, 0x41, 0x64, + 0x64, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, + 0x12, 0x34, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, + 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x41, 0x64, 0x64, + 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x41, 0x64, 0x64, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x42, - 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x6f, - 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, - 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x41, 0x64, 0x64, 0x53, 0x65, 0x74, 0x74, - 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x2f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x22, 0x24, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x62, 0x75, - 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x2d, 0x61, 0x64, 0x64, 0x2d, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, - 0x67, 0x3a, 0x01, 0x2a, 0x12, 0xa0, 0x01, 0x0a, 0x17, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, - 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x46, 0x72, 0x6f, 0x6d, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, - 0x12, 0x39, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, - 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x52, 0x65, 0x6d, - 0x6f, 0x76, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x46, 0x72, 0x6f, 0x6d, 0x42, 0x75, - 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, - 0x70, 0x74, 0x79, 0x22, 0x32, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c, 0x22, 0x27, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x62, 0x75, - 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x2d, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x2d, 0x73, 0x65, 0x74, - 0x74, 0x69, 0x6e, 0x67, 0x3a, 0x01, 0x2a, 0x32, 0x8d, 0x05, 0x0a, 0x0c, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x8f, 0x01, 0x0a, 0x09, 0x53, 0x61, 0x76, - 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2b, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, - 0x76, 0x30, 0x2e, 0x53, 0x61, 0x76, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, - 0x53, 0x61, 0x76, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x22, 0x1c, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x73, 0x2d, 0x73, 0x61, 0x76, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x8b, 0x01, 0x0a, 0x08, 0x47, - 0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2a, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, - 0x2e, 0x76, 0x30, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, - 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x22, 0x1b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, - 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x73, 0x2d, 0x67, 0x65, 0x74, 0x3a, 0x01, 0x2a, 0x12, 0x92, 0x01, 0x0a, 0x0a, 0x4c, 0x69, 0x73, - 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x2c, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, - 0x2e, 0x76, 0x30, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, - 0x30, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x22, 0x1c, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x73, 0x2d, 0x6c, 0x69, 0x73, 0x74, 0x3a, 0x01, 0x2a, 0x12, 0xc7, 0x01, - 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x79, 0x55, 0x6e, 0x69, 0x71, - 0x75, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x73, 0x12, 0x3d, 0x2e, + 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x22, 0x24, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, + 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x2d, + 0x61, 0x64, 0x64, 0x2d, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x3a, 0x01, 0x2a, 0x12, 0xa0, + 0x01, 0x0a, 0x17, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, + 0x46, 0x72, 0x6f, 0x6d, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x39, 0x2e, 0x6f, 0x63, 0x69, + 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, + 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65, 0x74, + 0x74, 0x69, 0x6e, 0x67, 0x46, 0x72, 0x6f, 0x6d, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x32, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x2c, 0x22, 0x27, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, + 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x2d, + 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x2d, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x3a, 0x01, + 0x2a, 0x32, 0x8d, 0x05, 0x0a, 0x0c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x12, 0x8f, 0x01, 0x0a, 0x09, 0x53, 0x61, 0x76, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x12, 0x2b, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, + 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x53, 0x61, 0x76, + 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, + 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, + 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x53, 0x61, 0x76, 0x65, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x21, 0x22, 0x1c, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, + 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x2d, 0x73, 0x61, 0x76, + 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x8b, 0x01, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x12, 0x2a, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x47, 0x65, + 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x42, 0x79, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, - 0x66, 0x69, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x6f, - 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, - 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3c, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x36, 0x22, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, - 0x6e, 0x67, 0x73, 0x2f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x2d, 0x67, 0x65, 0x74, 0x2d, 0x62, - 0x79, 0x2d, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x2d, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, - 0x69, 0x65, 0x72, 0x73, 0x3a, 0x01, 0x2a, 0x32, 0x97, 0x05, 0x0a, 0x0b, 0x52, 0x6f, 0x6c, 0x65, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x92, 0x01, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, - 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x12, 0x2d, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, - 0x30, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, - 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x22, 0x1b, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x72, - 0x6f, 0x6c, 0x65, 0x73, 0x2d, 0x6c, 0x69, 0x73, 0x74, 0x3a, 0x01, 0x2a, 0x12, 0xb2, 0x01, 0x0a, - 0x13, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, - 0x65, 0x6e, 0x74, 0x73, 0x12, 0x35, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, - 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, - 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x6f, 0x63, - 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, - 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6c, 0x65, - 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x2c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x22, 0x21, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x61, 0x73, - 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2d, 0x6c, 0x69, 0x73, 0x74, 0x3a, 0x01, - 0x2a, 0x12, 0xa8, 0x01, 0x0a, 0x10, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x52, 0x6f, 0x6c, 0x65, - 0x54, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x12, 0x32, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, + 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x20, 0x22, 0x1b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, + 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x2d, 0x67, 0x65, 0x74, 0x3a, + 0x01, 0x2a, 0x12, 0x92, 0x01, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x73, 0x12, 0x2c, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x2d, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, + 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x22, 0x1c, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, + 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x2d, + 0x6c, 0x69, 0x73, 0x74, 0x3a, 0x01, 0x2a, 0x12, 0xc7, 0x01, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x42, 0x79, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x49, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x73, 0x12, 0x3d, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, + 0x2e, 0x76, 0x30, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x79, 0x55, 0x6e, + 0x69, 0x71, 0x75, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, - 0x76, 0x30, 0x2e, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x52, 0x6f, 0x6c, 0x65, 0x54, 0x6f, 0x55, - 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x6f, 0x63, 0x69, - 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, - 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x52, 0x6f, 0x6c, - 0x65, 0x54, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x22, 0x20, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, - 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, - 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2d, 0x61, 0x64, 0x64, 0x3a, 0x01, 0x2a, 0x12, 0x92, 0x01, 0x0a, - 0x12, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x46, 0x72, 0x6f, 0x6d, 0x55, - 0x73, 0x65, 0x72, 0x12, 0x34, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, - 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x46, 0x72, 0x6f, 0x6d, 0x55, 0x73, - 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, - 0x79, 0x22, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x22, 0x23, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x61, 0x73, 0x73, 0x69, - 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2d, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x3a, 0x01, - 0x2a, 0x32, 0x9a, 0x03, 0x0a, 0x11, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xd0, 0x01, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, - 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x52, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x3b, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, + 0x76, 0x30, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x3c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x36, 0x22, 0x31, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x73, 0x2d, 0x67, 0x65, 0x74, 0x2d, 0x62, 0x79, 0x2d, 0x75, 0x6e, 0x69, 0x71, + 0x75, 0x65, 0x2d, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x73, 0x3a, 0x01, + 0x2a, 0x32, 0x97, 0x05, 0x0a, 0x0b, 0x52, 0x6f, 0x6c, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x12, 0x92, 0x01, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x12, + 0x2d, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, + 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, + 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, + 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x42, + 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x22, 0x1b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, + 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x2d, 0x6c, + 0x69, 0x73, 0x74, 0x3a, 0x01, 0x2a, 0x12, 0xb2, 0x01, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x52, + 0x6f, 0x6c, 0x65, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x35, + 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, + 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, + 0x6f, 0x6c, 0x65, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, + 0x30, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, + 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x22, 0x21, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, + 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, + 0x6e, 0x74, 0x73, 0x2d, 0x6c, 0x69, 0x73, 0x74, 0x3a, 0x01, 0x2a, 0x12, 0xa8, 0x01, 0x0a, 0x10, + 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x52, 0x6f, 0x6c, 0x65, 0x54, 0x6f, 0x55, 0x73, 0x65, 0x72, + 0x12, 0x32, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, + 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x41, 0x73, 0x73, + 0x69, 0x67, 0x6e, 0x52, 0x6f, 0x6c, 0x65, 0x54, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, + 0x2e, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x52, 0x6f, 0x6c, 0x65, 0x54, 0x6f, 0x55, 0x73, 0x65, + 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x25, 0x22, 0x20, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, + 0x6e, 0x67, 0x73, 0x2f, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2d, + 0x61, 0x64, 0x64, 0x3a, 0x01, 0x2a, 0x12, 0x92, 0x01, 0x0a, 0x12, 0x52, 0x65, 0x6d, 0x6f, 0x76, + 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x46, 0x72, 0x6f, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x12, 0x34, 0x2e, + 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, + 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, + 0x52, 0x6f, 0x6c, 0x65, 0x46, 0x72, 0x6f, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x2e, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x28, 0x22, 0x23, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, + 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, + 0x73, 0x2d, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x3a, 0x01, 0x2a, 0x32, 0xc3, 0x04, 0x0a, 0x11, + 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x12, 0xa6, 0x01, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x31, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x42, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x3c, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x4c, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, + 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x26, 0x22, 0x21, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, + 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2d, 0x6c, 0x69, 0x73, 0x74, 0x3a, 0x01, 0x2a, 0x12, 0xd0, 0x01, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, - 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x38, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x32, 0x22, 0x2d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, - 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x70, 0x65, 0x72, 0x6d, 0x69, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2d, 0x6c, 0x69, 0x73, 0x74, 0x2d, 0x62, 0x79, 0x2d, 0x72, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0xb1, 0x01, 0x0a, 0x11, 0x47, - 0x65, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x49, 0x44, - 0x12, 0x33, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, - 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x47, 0x65, 0x74, - 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, + 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x3b, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, + 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3c, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, - 0x30, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x42, - 0x79, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x31, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x2b, 0x22, 0x26, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, - 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x2d, 0x67, 0x65, 0x74, 0x2d, 0x62, 0x79, 0x2d, 0x69, 0x64, 0x3a, 0x01, 0x2a, 0x42, 0xe3, - 0x02, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x77, - 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, - 0x76, 0x30, 0x92, 0x41, 0x9e, 0x02, 0x12, 0xb6, 0x01, 0x0a, 0x20, 0x6f, 0x77, 0x6e, 0x43, 0x6c, - 0x6f, 0x75, 0x64, 0x20, 0x49, 0x6e, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x65, 0x20, 0x53, 0x63, 0x61, - 0x6c, 0x65, 0x20, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x22, 0x47, 0x0a, 0x0d, 0x6f, - 0x77, 0x6e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x20, 0x47, 0x6d, 0x62, 0x48, 0x12, 0x20, 0x68, 0x74, - 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x6f, 0x63, 0x69, 0x73, 0x1a, 0x14, - 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x40, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, - 0x2e, 0x63, 0x6f, 0x6d, 0x2a, 0x42, 0x0a, 0x0a, 0x41, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2d, 0x32, - 0x2e, 0x30, 0x12, 0x34, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, - 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x62, 0x6c, 0x6f, 0x62, 0x2f, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, - 0x2f, 0x4c, 0x49, 0x43, 0x45, 0x4e, 0x53, 0x45, 0x32, 0x05, 0x31, 0x2e, 0x30, 0x2e, 0x30, 0x2a, - 0x02, 0x01, 0x02, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x72, 0x3b, 0x0a, 0x10, 0x44, 0x65, 0x76, 0x65, 0x6c, - 0x6f, 0x70, 0x65, 0x72, 0x20, 0x4d, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x12, 0x27, 0x68, 0x74, 0x74, - 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x65, - 0x76, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, - 0x6e, 0x67, 0x73, 0x2f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x30, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x42, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x38, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x32, 0x22, 0x2d, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x70, 0x65, + 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2d, 0x6c, 0x69, 0x73, 0x74, 0x2d, 0x62, + 0x79, 0x2d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0xb1, 0x01, + 0x0a, 0x11, 0x47, 0x65, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x42, + 0x79, 0x49, 0x44, 0x12, 0x33, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, + 0x47, 0x65, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x49, + 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, + 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x31, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2b, 0x22, 0x26, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, + 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2d, 0x67, 0x65, 0x74, 0x2d, 0x62, 0x79, 0x2d, 0x69, 0x64, 0x3a, 0x01, + 0x2a, 0x42, 0xe3, 0x02, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x6f, 0x63, 0x69, 0x73, + 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, + 0x67, 0x73, 0x2f, 0x76, 0x30, 0x92, 0x41, 0x9e, 0x02, 0x12, 0xb6, 0x01, 0x0a, 0x20, 0x6f, 0x77, + 0x6e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x20, 0x49, 0x6e, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x65, 0x20, + 0x53, 0x63, 0x61, 0x6c, 0x65, 0x20, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x22, 0x47, + 0x0a, 0x0d, 0x6f, 0x77, 0x6e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x20, 0x47, 0x6d, 0x62, 0x48, 0x12, + 0x20, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x6f, 0x63, 0x69, + 0x73, 0x1a, 0x14, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x40, 0x6f, 0x77, 0x6e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x63, 0x6f, 0x6d, 0x2a, 0x42, 0x0a, 0x0a, 0x41, 0x70, 0x61, 0x63, 0x68, + 0x65, 0x2d, 0x32, 0x2e, 0x30, 0x12, 0x34, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2f, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x62, 0x6c, 0x6f, 0x62, 0x2f, 0x6d, 0x61, 0x73, + 0x74, 0x65, 0x72, 0x2f, 0x4c, 0x49, 0x43, 0x45, 0x4e, 0x53, 0x45, 0x32, 0x05, 0x31, 0x2e, 0x30, + 0x2e, 0x30, 0x2a, 0x02, 0x01, 0x02, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x72, 0x3b, 0x0a, 0x10, 0x44, 0x65, + 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x20, 0x4d, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x12, 0x27, + 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x64, 0x65, 0x76, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x73, 0x65, + 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1587,7 +1699,7 @@ func file_ocis_services_settings_v0_settings_proto_rawDescGZIP() []byte { return file_ocis_services_settings_v0_settings_proto_rawDescData } -var file_ocis_services_settings_v0_settings_proto_msgTypes = make([]protoimpl.MessageInfo, 25) +var file_ocis_services_settings_v0_settings_proto_msgTypes = make([]protoimpl.MessageInfo, 27) var file_ocis_services_settings_v0_settings_proto_goTypes = []interface{}{ (*SaveBundleRequest)(nil), // 0: ocis.services.settings.v0.SaveBundleRequest (*SaveBundleResponse)(nil), // 1: ocis.services.settings.v0.SaveBundleResponse @@ -1610,35 +1722,37 @@ var file_ocis_services_settings_v0_settings_proto_goTypes = []interface{}{ (*AssignRoleToUserRequest)(nil), // 18: ocis.services.settings.v0.AssignRoleToUserRequest (*AssignRoleToUserResponse)(nil), // 19: ocis.services.settings.v0.AssignRoleToUserResponse (*RemoveRoleFromUserRequest)(nil), // 20: ocis.services.settings.v0.RemoveRoleFromUserRequest - (*ListPermissionsByResourceRequest)(nil), // 21: ocis.services.settings.v0.ListPermissionsByResourceRequest - (*ListPermissionsByResourceResponse)(nil), // 22: ocis.services.settings.v0.ListPermissionsByResourceResponse - (*GetPermissionByIDRequest)(nil), // 23: ocis.services.settings.v0.GetPermissionByIDRequest - (*GetPermissionByIDResponse)(nil), // 24: ocis.services.settings.v0.GetPermissionByIDResponse - (*v0.Bundle)(nil), // 25: ocis.messages.settings.v0.Bundle - (*v0.Setting)(nil), // 26: ocis.messages.settings.v0.Setting - (*v0.Value)(nil), // 27: ocis.messages.settings.v0.Value - (*v0.ValueWithIdentifier)(nil), // 28: ocis.messages.settings.v0.ValueWithIdentifier - (*v0.UserRoleAssignment)(nil), // 29: ocis.messages.settings.v0.UserRoleAssignment - (*v0.Resource)(nil), // 30: ocis.messages.settings.v0.Resource - (*v0.Permission)(nil), // 31: ocis.messages.settings.v0.Permission - (*emptypb.Empty)(nil), // 32: google.protobuf.Empty + (*ListPermissionsRequest)(nil), // 21: ocis.services.settings.v0.ListPermissionsRequest + (*ListPermissionsResponse)(nil), // 22: ocis.services.settings.v0.ListPermissionsResponse + (*ListPermissionsByResourceRequest)(nil), // 23: ocis.services.settings.v0.ListPermissionsByResourceRequest + (*ListPermissionsByResourceResponse)(nil), // 24: ocis.services.settings.v0.ListPermissionsByResourceResponse + (*GetPermissionByIDRequest)(nil), // 25: ocis.services.settings.v0.GetPermissionByIDRequest + (*GetPermissionByIDResponse)(nil), // 26: ocis.services.settings.v0.GetPermissionByIDResponse + (*v0.Bundle)(nil), // 27: ocis.messages.settings.v0.Bundle + (*v0.Setting)(nil), // 28: ocis.messages.settings.v0.Setting + (*v0.Value)(nil), // 29: ocis.messages.settings.v0.Value + (*v0.ValueWithIdentifier)(nil), // 30: ocis.messages.settings.v0.ValueWithIdentifier + (*v0.UserRoleAssignment)(nil), // 31: ocis.messages.settings.v0.UserRoleAssignment + (*v0.Resource)(nil), // 32: ocis.messages.settings.v0.Resource + (*v0.Permission)(nil), // 33: ocis.messages.settings.v0.Permission + (*emptypb.Empty)(nil), // 34: google.protobuf.Empty } var file_ocis_services_settings_v0_settings_proto_depIdxs = []int32{ - 25, // 0: ocis.services.settings.v0.SaveBundleRequest.bundle:type_name -> ocis.messages.settings.v0.Bundle - 25, // 1: ocis.services.settings.v0.SaveBundleResponse.bundle:type_name -> ocis.messages.settings.v0.Bundle - 25, // 2: ocis.services.settings.v0.GetBundleResponse.bundle:type_name -> ocis.messages.settings.v0.Bundle - 25, // 3: ocis.services.settings.v0.ListBundlesResponse.bundles:type_name -> ocis.messages.settings.v0.Bundle - 26, // 4: ocis.services.settings.v0.AddSettingToBundleRequest.setting:type_name -> ocis.messages.settings.v0.Setting - 26, // 5: ocis.services.settings.v0.AddSettingToBundleResponse.setting:type_name -> ocis.messages.settings.v0.Setting - 27, // 6: ocis.services.settings.v0.SaveValueRequest.value:type_name -> ocis.messages.settings.v0.Value - 28, // 7: ocis.services.settings.v0.SaveValueResponse.value:type_name -> ocis.messages.settings.v0.ValueWithIdentifier - 28, // 8: ocis.services.settings.v0.GetValueResponse.value:type_name -> ocis.messages.settings.v0.ValueWithIdentifier - 28, // 9: ocis.services.settings.v0.ListValuesResponse.values:type_name -> ocis.messages.settings.v0.ValueWithIdentifier - 29, // 10: ocis.services.settings.v0.ListRoleAssignmentsResponse.assignments:type_name -> ocis.messages.settings.v0.UserRoleAssignment - 29, // 11: ocis.services.settings.v0.AssignRoleToUserResponse.assignment:type_name -> ocis.messages.settings.v0.UserRoleAssignment - 30, // 12: ocis.services.settings.v0.ListPermissionsByResourceRequest.resource:type_name -> ocis.messages.settings.v0.Resource - 31, // 13: ocis.services.settings.v0.ListPermissionsByResourceResponse.permissions:type_name -> ocis.messages.settings.v0.Permission - 31, // 14: ocis.services.settings.v0.GetPermissionByIDResponse.permission:type_name -> ocis.messages.settings.v0.Permission + 27, // 0: ocis.services.settings.v0.SaveBundleRequest.bundle:type_name -> ocis.messages.settings.v0.Bundle + 27, // 1: ocis.services.settings.v0.SaveBundleResponse.bundle:type_name -> ocis.messages.settings.v0.Bundle + 27, // 2: ocis.services.settings.v0.GetBundleResponse.bundle:type_name -> ocis.messages.settings.v0.Bundle + 27, // 3: ocis.services.settings.v0.ListBundlesResponse.bundles:type_name -> ocis.messages.settings.v0.Bundle + 28, // 4: ocis.services.settings.v0.AddSettingToBundleRequest.setting:type_name -> ocis.messages.settings.v0.Setting + 28, // 5: ocis.services.settings.v0.AddSettingToBundleResponse.setting:type_name -> ocis.messages.settings.v0.Setting + 29, // 6: ocis.services.settings.v0.SaveValueRequest.value:type_name -> ocis.messages.settings.v0.Value + 30, // 7: ocis.services.settings.v0.SaveValueResponse.value:type_name -> ocis.messages.settings.v0.ValueWithIdentifier + 30, // 8: ocis.services.settings.v0.GetValueResponse.value:type_name -> ocis.messages.settings.v0.ValueWithIdentifier + 30, // 9: ocis.services.settings.v0.ListValuesResponse.values:type_name -> ocis.messages.settings.v0.ValueWithIdentifier + 31, // 10: ocis.services.settings.v0.ListRoleAssignmentsResponse.assignments:type_name -> ocis.messages.settings.v0.UserRoleAssignment + 31, // 11: ocis.services.settings.v0.AssignRoleToUserResponse.assignment:type_name -> ocis.messages.settings.v0.UserRoleAssignment + 32, // 12: ocis.services.settings.v0.ListPermissionsByResourceRequest.resource:type_name -> ocis.messages.settings.v0.Resource + 33, // 13: ocis.services.settings.v0.ListPermissionsByResourceResponse.permissions:type_name -> ocis.messages.settings.v0.Permission + 33, // 14: ocis.services.settings.v0.GetPermissionByIDResponse.permission:type_name -> ocis.messages.settings.v0.Permission 0, // 15: ocis.services.settings.v0.BundleService.SaveBundle:input_type -> ocis.services.settings.v0.SaveBundleRequest 2, // 16: ocis.services.settings.v0.BundleService.GetBundle:input_type -> ocis.services.settings.v0.GetBundleRequest 4, // 17: ocis.services.settings.v0.BundleService.ListBundles:input_type -> ocis.services.settings.v0.ListBundlesRequest @@ -1652,25 +1766,27 @@ var file_ocis_services_settings_v0_settings_proto_depIdxs = []int32{ 16, // 25: ocis.services.settings.v0.RoleService.ListRoleAssignments:input_type -> ocis.services.settings.v0.ListRoleAssignmentsRequest 18, // 26: ocis.services.settings.v0.RoleService.AssignRoleToUser:input_type -> ocis.services.settings.v0.AssignRoleToUserRequest 20, // 27: ocis.services.settings.v0.RoleService.RemoveRoleFromUser:input_type -> ocis.services.settings.v0.RemoveRoleFromUserRequest - 21, // 28: ocis.services.settings.v0.PermissionService.ListPermissionsByResource:input_type -> ocis.services.settings.v0.ListPermissionsByResourceRequest - 23, // 29: ocis.services.settings.v0.PermissionService.GetPermissionByID:input_type -> ocis.services.settings.v0.GetPermissionByIDRequest - 1, // 30: ocis.services.settings.v0.BundleService.SaveBundle:output_type -> ocis.services.settings.v0.SaveBundleResponse - 3, // 31: ocis.services.settings.v0.BundleService.GetBundle:output_type -> ocis.services.settings.v0.GetBundleResponse - 5, // 32: ocis.services.settings.v0.BundleService.ListBundles:output_type -> ocis.services.settings.v0.ListBundlesResponse - 7, // 33: ocis.services.settings.v0.BundleService.AddSettingToBundle:output_type -> ocis.services.settings.v0.AddSettingToBundleResponse - 32, // 34: ocis.services.settings.v0.BundleService.RemoveSettingFromBundle:output_type -> google.protobuf.Empty - 10, // 35: ocis.services.settings.v0.ValueService.SaveValue:output_type -> ocis.services.settings.v0.SaveValueResponse - 12, // 36: ocis.services.settings.v0.ValueService.GetValue:output_type -> ocis.services.settings.v0.GetValueResponse - 14, // 37: ocis.services.settings.v0.ValueService.ListValues:output_type -> ocis.services.settings.v0.ListValuesResponse - 12, // 38: ocis.services.settings.v0.ValueService.GetValueByUniqueIdentifiers:output_type -> ocis.services.settings.v0.GetValueResponse - 5, // 39: ocis.services.settings.v0.RoleService.ListRoles:output_type -> ocis.services.settings.v0.ListBundlesResponse - 17, // 40: ocis.services.settings.v0.RoleService.ListRoleAssignments:output_type -> ocis.services.settings.v0.ListRoleAssignmentsResponse - 19, // 41: ocis.services.settings.v0.RoleService.AssignRoleToUser:output_type -> ocis.services.settings.v0.AssignRoleToUserResponse - 32, // 42: ocis.services.settings.v0.RoleService.RemoveRoleFromUser:output_type -> google.protobuf.Empty - 22, // 43: ocis.services.settings.v0.PermissionService.ListPermissionsByResource:output_type -> ocis.services.settings.v0.ListPermissionsByResourceResponse - 24, // 44: ocis.services.settings.v0.PermissionService.GetPermissionByID:output_type -> ocis.services.settings.v0.GetPermissionByIDResponse - 30, // [30:45] is the sub-list for method output_type - 15, // [15:30] is the sub-list for method input_type + 21, // 28: ocis.services.settings.v0.PermissionService.ListPermissions:input_type -> ocis.services.settings.v0.ListPermissionsRequest + 23, // 29: ocis.services.settings.v0.PermissionService.ListPermissionsByResource:input_type -> ocis.services.settings.v0.ListPermissionsByResourceRequest + 25, // 30: ocis.services.settings.v0.PermissionService.GetPermissionByID:input_type -> ocis.services.settings.v0.GetPermissionByIDRequest + 1, // 31: ocis.services.settings.v0.BundleService.SaveBundle:output_type -> ocis.services.settings.v0.SaveBundleResponse + 3, // 32: ocis.services.settings.v0.BundleService.GetBundle:output_type -> ocis.services.settings.v0.GetBundleResponse + 5, // 33: ocis.services.settings.v0.BundleService.ListBundles:output_type -> ocis.services.settings.v0.ListBundlesResponse + 7, // 34: ocis.services.settings.v0.BundleService.AddSettingToBundle:output_type -> ocis.services.settings.v0.AddSettingToBundleResponse + 34, // 35: ocis.services.settings.v0.BundleService.RemoveSettingFromBundle:output_type -> google.protobuf.Empty + 10, // 36: ocis.services.settings.v0.ValueService.SaveValue:output_type -> ocis.services.settings.v0.SaveValueResponse + 12, // 37: ocis.services.settings.v0.ValueService.GetValue:output_type -> ocis.services.settings.v0.GetValueResponse + 14, // 38: ocis.services.settings.v0.ValueService.ListValues:output_type -> ocis.services.settings.v0.ListValuesResponse + 12, // 39: ocis.services.settings.v0.ValueService.GetValueByUniqueIdentifiers:output_type -> ocis.services.settings.v0.GetValueResponse + 5, // 40: ocis.services.settings.v0.RoleService.ListRoles:output_type -> ocis.services.settings.v0.ListBundlesResponse + 17, // 41: ocis.services.settings.v0.RoleService.ListRoleAssignments:output_type -> ocis.services.settings.v0.ListRoleAssignmentsResponse + 19, // 42: ocis.services.settings.v0.RoleService.AssignRoleToUser:output_type -> ocis.services.settings.v0.AssignRoleToUserResponse + 34, // 43: ocis.services.settings.v0.RoleService.RemoveRoleFromUser:output_type -> google.protobuf.Empty + 22, // 44: ocis.services.settings.v0.PermissionService.ListPermissions:output_type -> ocis.services.settings.v0.ListPermissionsResponse + 24, // 45: ocis.services.settings.v0.PermissionService.ListPermissionsByResource:output_type -> ocis.services.settings.v0.ListPermissionsByResourceResponse + 26, // 46: ocis.services.settings.v0.PermissionService.GetPermissionByID:output_type -> ocis.services.settings.v0.GetPermissionByIDResponse + 31, // [31:47] is the sub-list for method output_type + 15, // [15:31] is the sub-list for method input_type 15, // [15:15] is the sub-list for extension type_name 15, // [15:15] is the sub-list for extension extendee 0, // [0:15] is the sub-list for field type_name @@ -1935,7 +2051,7 @@ func file_ocis_services_settings_v0_settings_proto_init() { } } file_ocis_services_settings_v0_settings_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListPermissionsByResourceRequest); i { + switch v := v.(*ListPermissionsRequest); i { case 0: return &v.state case 1: @@ -1947,7 +2063,7 @@ func file_ocis_services_settings_v0_settings_proto_init() { } } file_ocis_services_settings_v0_settings_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListPermissionsByResourceResponse); i { + switch v := v.(*ListPermissionsResponse); i { case 0: return &v.state case 1: @@ -1959,7 +2075,7 @@ func file_ocis_services_settings_v0_settings_proto_init() { } } file_ocis_services_settings_v0_settings_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPermissionByIDRequest); i { + switch v := v.(*ListPermissionsByResourceRequest); i { case 0: return &v.state case 1: @@ -1971,6 +2087,30 @@ func file_ocis_services_settings_v0_settings_proto_init() { } } file_ocis_services_settings_v0_settings_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListPermissionsByResourceResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_services_settings_v0_settings_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetPermissionByIDRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_services_settings_v0_settings_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetPermissionByIDResponse); i { case 0: return &v.state @@ -1989,7 +2129,7 @@ func file_ocis_services_settings_v0_settings_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_ocis_services_settings_v0_settings_proto_rawDesc, NumEnums: 0, - NumMessages: 25, + NumMessages: 27, NumExtensions: 0, NumServices: 4, }, diff --git a/protogen/gen/ocis/services/settings/v0/settings.pb.micro.go b/protogen/gen/ocis/services/settings/v0/settings.pb.micro.go index 6d1c9324c..3e19fb415 100644 --- a/protogen/gen/ocis/services/settings/v0/settings.pb.micro.go +++ b/protogen/gen/ocis/services/settings/v0/settings.pb.micro.go @@ -541,6 +541,12 @@ func (h *roleServiceHandler) RemoveRoleFromUser(ctx context.Context, in *RemoveR func NewPermissionServiceEndpoints() []*api.Endpoint { return []*api.Endpoint{ + { + Name: "PermissionService.ListPermissions", + Path: []string{"/api/v0/settings/permissions-list"}, + Method: []string{"POST"}, + Handler: "rpc", + }, { Name: "PermissionService.ListPermissionsByResource", Path: []string{"/api/v0/settings/permissions-list-by-resource"}, @@ -559,6 +565,7 @@ func NewPermissionServiceEndpoints() []*api.Endpoint { // Client API for PermissionService service type PermissionService interface { + ListPermissions(ctx context.Context, in *ListPermissionsRequest, opts ...client.CallOption) (*ListPermissionsResponse, error) ListPermissionsByResource(ctx context.Context, in *ListPermissionsByResourceRequest, opts ...client.CallOption) (*ListPermissionsByResourceResponse, error) GetPermissionByID(ctx context.Context, in *GetPermissionByIDRequest, opts ...client.CallOption) (*GetPermissionByIDResponse, error) } @@ -575,6 +582,16 @@ func NewPermissionService(name string, c client.Client) PermissionService { } } +func (c *permissionService) ListPermissions(ctx context.Context, in *ListPermissionsRequest, opts ...client.CallOption) (*ListPermissionsResponse, error) { + req := c.c.NewRequest(c.name, "PermissionService.ListPermissions", in) + out := new(ListPermissionsResponse) + err := c.c.Call(ctx, req, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *permissionService) ListPermissionsByResource(ctx context.Context, in *ListPermissionsByResourceRequest, opts ...client.CallOption) (*ListPermissionsByResourceResponse, error) { req := c.c.NewRequest(c.name, "PermissionService.ListPermissionsByResource", in) out := new(ListPermissionsByResourceResponse) @@ -598,12 +615,14 @@ func (c *permissionService) GetPermissionByID(ctx context.Context, in *GetPermis // Server API for PermissionService service type PermissionServiceHandler interface { + ListPermissions(context.Context, *ListPermissionsRequest, *ListPermissionsResponse) error ListPermissionsByResource(context.Context, *ListPermissionsByResourceRequest, *ListPermissionsByResourceResponse) error GetPermissionByID(context.Context, *GetPermissionByIDRequest, *GetPermissionByIDResponse) error } func RegisterPermissionServiceHandler(s server.Server, hdlr PermissionServiceHandler, opts ...server.HandlerOption) error { type permissionService interface { + ListPermissions(ctx context.Context, in *ListPermissionsRequest, out *ListPermissionsResponse) error ListPermissionsByResource(ctx context.Context, in *ListPermissionsByResourceRequest, out *ListPermissionsByResourceResponse) error GetPermissionByID(ctx context.Context, in *GetPermissionByIDRequest, out *GetPermissionByIDResponse) error } @@ -611,6 +630,12 @@ func RegisterPermissionServiceHandler(s server.Server, hdlr PermissionServiceHan permissionService } h := &permissionServiceHandler{hdlr} + opts = append(opts, api.WithEndpoint(&api.Endpoint{ + Name: "PermissionService.ListPermissions", + Path: []string{"/api/v0/settings/permissions-list"}, + Method: []string{"POST"}, + Handler: "rpc", + })) opts = append(opts, api.WithEndpoint(&api.Endpoint{ Name: "PermissionService.ListPermissionsByResource", Path: []string{"/api/v0/settings/permissions-list-by-resource"}, @@ -630,6 +655,10 @@ type permissionServiceHandler struct { PermissionServiceHandler } +func (h *permissionServiceHandler) ListPermissions(ctx context.Context, in *ListPermissionsRequest, out *ListPermissionsResponse) error { + return h.PermissionServiceHandler.ListPermissions(ctx, in, out) +} + func (h *permissionServiceHandler) ListPermissionsByResource(ctx context.Context, in *ListPermissionsByResourceRequest, out *ListPermissionsByResourceResponse) error { return h.PermissionServiceHandler.ListPermissionsByResource(ctx, in, out) } diff --git a/protogen/gen/ocis/services/settings/v0/settings.pb.web.go b/protogen/gen/ocis/services/settings/v0/settings.pb.web.go index ef8718f98..5e7668ee7 100644 --- a/protogen/gen/ocis/services/settings/v0/settings.pb.web.go +++ b/protogen/gen/ocis/services/settings/v0/settings.pb.web.go @@ -427,6 +427,32 @@ func (h *webPermissionServiceHandler) ServeHTTP(w http.ResponseWriter, r *http.R h.r.ServeHTTP(w, r) } +func (h *webPermissionServiceHandler) ListPermissions(w http.ResponseWriter, r *http.Request) { + req := &ListPermissionsRequest{} + resp := &ListPermissionsResponse{} + + if err := json.NewDecoder(r.Body).Decode(&req); err != nil { + http.Error(w, err.Error(), http.StatusPreconditionFailed) + return + } + + if err := h.h.ListPermissions( + r.Context(), + req, + resp, + ); err != nil { + if merr, ok := merrors.As(err); ok && merr.Code == http.StatusNotFound { + http.Error(w, err.Error(), http.StatusNotFound) + } else { + http.Error(w, err.Error(), http.StatusBadRequest) + } + return + } + + render.Status(r, http.StatusCreated) + render.JSON(w, r, resp) +} + func (h *webPermissionServiceHandler) ListPermissionsByResource(w http.ResponseWriter, r *http.Request) { req := &ListPermissionsByResourceRequest{} resp := &ListPermissionsByResourceResponse{} @@ -485,6 +511,7 @@ func RegisterPermissionServiceWeb(r chi.Router, i PermissionServiceHandler, midd h: i, } + r.MethodFunc("POST", "/api/v0/settings/permissions-list", handler.ListPermissions) r.MethodFunc("POST", "/api/v0/settings/permissions-list-by-resource", handler.ListPermissionsByResource) r.MethodFunc("POST", "/api/v0/settings/permissions-get-by-id", handler.GetPermissionByID) } @@ -1245,6 +1272,78 @@ func (m *RemoveRoleFromUserRequest) UnmarshalJSON(b []byte) error { var _ json.Unmarshaler = (*RemoveRoleFromUserRequest)(nil) +// ListPermissionsRequestJSONMarshaler describes the default jsonpb.Marshaler used by all +// instances of ListPermissionsRequest. This struct is safe to replace or modify but +// should not be done so concurrently. +var ListPermissionsRequestJSONMarshaler = new(jsonpb.Marshaler) + +// MarshalJSON satisfies the encoding/json Marshaler interface. This method +// uses the more correct jsonpb package to correctly marshal the message. +func (m *ListPermissionsRequest) MarshalJSON() ([]byte, error) { + if m == nil { + return json.Marshal(nil) + } + + buf := &bytes.Buffer{} + + if err := ListPermissionsRequestJSONMarshaler.Marshal(buf, m); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} + +var _ json.Marshaler = (*ListPermissionsRequest)(nil) + +// ListPermissionsRequestJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all +// instances of ListPermissionsRequest. This struct is safe to replace or modify but +// should not be done so concurrently. +var ListPermissionsRequestJSONUnmarshaler = new(jsonpb.Unmarshaler) + +// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method +// uses the more correct jsonpb package to correctly unmarshal the message. +func (m *ListPermissionsRequest) UnmarshalJSON(b []byte) error { + return ListPermissionsRequestJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) +} + +var _ json.Unmarshaler = (*ListPermissionsRequest)(nil) + +// ListPermissionsResponseJSONMarshaler describes the default jsonpb.Marshaler used by all +// instances of ListPermissionsResponse. This struct is safe to replace or modify but +// should not be done so concurrently. +var ListPermissionsResponseJSONMarshaler = new(jsonpb.Marshaler) + +// MarshalJSON satisfies the encoding/json Marshaler interface. This method +// uses the more correct jsonpb package to correctly marshal the message. +func (m *ListPermissionsResponse) MarshalJSON() ([]byte, error) { + if m == nil { + return json.Marshal(nil) + } + + buf := &bytes.Buffer{} + + if err := ListPermissionsResponseJSONMarshaler.Marshal(buf, m); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} + +var _ json.Marshaler = (*ListPermissionsResponse)(nil) + +// ListPermissionsResponseJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all +// instances of ListPermissionsResponse. This struct is safe to replace or modify but +// should not be done so concurrently. +var ListPermissionsResponseJSONUnmarshaler = new(jsonpb.Unmarshaler) + +// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method +// uses the more correct jsonpb package to correctly unmarshal the message. +func (m *ListPermissionsResponse) UnmarshalJSON(b []byte) error { + return ListPermissionsResponseJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) +} + +var _ json.Unmarshaler = (*ListPermissionsResponse)(nil) + // ListPermissionsByResourceRequestJSONMarshaler describes the default jsonpb.Marshaler used by all // instances of ListPermissionsByResourceRequest. This struct is safe to replace or modify but // should not be done so concurrently. diff --git a/protogen/gen/ocis/services/settings/v0/settings.swagger.json b/protogen/gen/ocis/services/settings/v0/settings.swagger.json index 80cf2549c..c1ec15a0b 100644 --- a/protogen/gen/ocis/services/settings/v0/settings.swagger.json +++ b/protogen/gen/ocis/services/settings/v0/settings.swagger.json @@ -328,6 +328,38 @@ ] } }, + "/api/v0/settings/permissions-list": { + "post": { + "operationId": "PermissionService_ListPermissions", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v0ListPermissionsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v0ListPermissionsRequest" + } + } + ], + "tags": [ + "PermissionService" + ] + } + }, "/api/v0/settings/permissions-list-by-resource": { "post": { "operationId": "PermissionService_ListPermissionsByResource", @@ -857,6 +889,25 @@ } } }, + "v0ListPermissionsRequest": { + "type": "object", + "properties": { + "accountUuid": { + "type": "string" + } + } + }, + "v0ListPermissionsResponse": { + "type": "object", + "properties": { + "permissions": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, "v0ListRoleAssignmentsRequest": { "type": "object", "properties": { diff --git a/protogen/proto/ocis/services/settings/v0/settings.proto b/protogen/proto/ocis/services/settings/v0/settings.proto index a9a6e4cc0..86ef42741 100644 --- a/protogen/proto/ocis/services/settings/v0/settings.proto +++ b/protogen/proto/ocis/services/settings/v0/settings.proto @@ -121,6 +121,12 @@ service RoleService { } service PermissionService { + rpc ListPermissions(ListPermissionsRequest) returns (ListPermissionsResponse) { + option (google.api.http) = { + post: "/api/v0/settings/permissions-list", + body: "*" + }; + } rpc ListPermissionsByResource(ListPermissionsByResourceRequest) returns (ListPermissionsByResourceResponse) { option (google.api.http) = { post: "/api/v0/settings/permissions-list-by-resource", @@ -240,6 +246,14 @@ message RemoveRoleFromUserRequest { // requests and responses for permissions // --- +message ListPermissionsRequest { + string account_uuid = 1; +} + +message ListPermissionsResponse { + repeated string permissions = 1; +} + message ListPermissionsByResourceRequest { ocis.messages.settings.v0.Resource resource = 1; } diff --git a/services/graph/mocks/permissions.go b/services/graph/mocks/permissions.go index 614d779ae..422e0c0a4 100644 --- a/services/graph/mocks/permissions.go +++ b/services/graph/mocks/permissions.go @@ -47,6 +47,36 @@ func (_m *Permissions) GetPermissionByID(ctx context.Context, request *v0.GetPer return r0, r1 } +// ListPermissions provides a mock function with given fields: ctx, req, opts +func (_m *Permissions) ListPermissions(ctx context.Context, req *v0.ListPermissionsRequest, opts ...client.CallOption) (*v0.ListPermissionsResponse, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, ctx, req) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *v0.ListPermissionsResponse + if rf, ok := ret.Get(0).(func(context.Context, *v0.ListPermissionsRequest, ...client.CallOption) *v0.ListPermissionsResponse); ok { + r0 = rf(ctx, req, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*v0.ListPermissionsResponse) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, *v0.ListPermissionsRequest, ...client.CallOption) error); ok { + r1 = rf(ctx, req, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + // ListPermissionsByResource provides a mock function with given fields: ctx, in, opts func (_m *Permissions) ListPermissionsByResource(ctx context.Context, in *v0.ListPermissionsByResourceRequest, opts ...client.CallOption) (*v0.ListPermissionsByResourceResponse, error) { _va := make([]interface{}, len(opts)) diff --git a/services/graph/pkg/service/v0/graph.go b/services/graph/pkg/service/v0/graph.go index 6978317db..79b52fdd5 100644 --- a/services/graph/pkg/service/v0/graph.go +++ b/services/graph/pkg/service/v0/graph.go @@ -71,6 +71,7 @@ type Publisher interface { // Permissions is the interface used to access the permissions service type Permissions interface { + ListPermissions(ctx context.Context, req *settingssvc.ListPermissionsRequest, opts ...client.CallOption) (*settingssvc.ListPermissionsResponse, error) GetPermissionByID(ctx context.Context, request *settingssvc.GetPermissionByIDRequest, opts ...client.CallOption) (*settingssvc.GetPermissionByIDResponse, error) ListPermissionsByResource(ctx context.Context, in *settingssvc.ListPermissionsByResourceRequest, opts ...client.CallOption) (*settingssvc.ListPermissionsByResourceResponse, error) } diff --git a/services/settings/pkg/service/v0/service.go b/services/settings/pkg/service/v0/service.go index e5db4683d..ec2966cf2 100644 --- a/services/settings/pkg/service/v0/service.go +++ b/services/settings/pkg/service/v0/service.go @@ -5,7 +5,7 @@ import ( "errors" "fmt" - permissions "github.com/cs3org/go-cs3apis/cs3/permissions/v1beta1" + cs3permissions "github.com/cs3org/go-cs3apis/cs3/permissions/v1beta1" rpcv1beta1 "github.com/cs3org/go-cs3apis/cs3/rpc/v1beta1" "github.com/cs3org/reva/v2/pkg/rgrpc/status" "github.com/owncloud/ocis/v2/ocis-pkg/log" @@ -54,20 +54,20 @@ func NewService(cfg *config.Config, logger log.Logger) Service { // CheckPermission implements the CS3 API Permssions service. // It's used to check if a subject (user or group) has a permission. -func (g Service) CheckPermission(ctx context.Context, req *permissions.CheckPermissionRequest) (*permissions.CheckPermissionResponse, error) { +func (g Service) CheckPermission(ctx context.Context, req *cs3permissions.CheckPermissionRequest) (*cs3permissions.CheckPermissionResponse, error) { spec := req.SubjectRef.Spec var accountID string switch ref := spec.(type) { - case *permissions.SubjectReference_UserId: + case *cs3permissions.SubjectReference_UserId: accountID = ref.UserId.OpaqueId - case *permissions.SubjectReference_GroupId: + case *cs3permissions.SubjectReference_GroupId: accountID = ref.GroupId.OpaqueId } assignments, err := g.manager.ListRoleAssignments(accountID) if err != nil { - return &permissions.CheckPermissionResponse{ + return &cs3permissions.CheckPermissionResponse{ Status: status.NewInternal(ctx, err.Error()), }, nil } @@ -80,21 +80,21 @@ func (g Service) CheckPermission(ctx context.Context, req *permissions.CheckPerm permission, err := g.manager.ReadPermissionByName(req.Permission, roleIDs) if err != nil { if !errors.Is(err, settings.ErrNotFound) { - return &permissions.CheckPermissionResponse{ + return &cs3permissions.CheckPermissionResponse{ Status: status.NewInternal(ctx, err.Error()), }, nil } } if permission == nil { - return &permissions.CheckPermissionResponse{ + return &cs3permissions.CheckPermissionResponse{ Status: &rpcv1beta1.Status{ Code: rpcv1beta1.Code_CODE_PERMISSION_DENIED, }, }, nil } - return &permissions.CheckPermissionResponse{ + return &cs3permissions.CheckPermissionResponse{ Status: status.NewOK(ctx), }, nil } @@ -463,6 +463,55 @@ func (g Service) RemoveRoleFromUser(ctx context.Context, req *settingssvc.Remove return nil } +// ListPermissions implements the PermissionServiceHandler interface +func (g Service) ListPermissions(ctx context.Context, req *settingssvc.ListPermissionsRequest, res *settingssvc.ListPermissionsResponse) error { + ownAccountUUID, ok := metadata.Get(ctx, middleware.AccountID) + if !ok { + g.logger.Debug().Str("id", g.id).Msg("user not in context") + return merrors.InternalServerError(g.id, "user not in context") + } + + if ownAccountUUID != req.AccountUuid { + return merrors.NotFound(g.id, "user not found: %s", req.AccountUuid) + } + + assignments, err := g.manager.ListRoleAssignments(req.AccountUuid) + if err != nil { + return err + } + + // deduplicate role ids + roleIDs := map[string]struct{}{} + for _, a := range assignments { + roleIDs[a.RoleId] = struct{}{} + } + + // deduplicate permission names + permissionNames := map[string]struct{}{} + for roleID := range roleIDs { + bundle, err := g.manager.ReadBundle(roleID) + if err != nil { + if !errors.Is(err, settings.ErrNotFound) { + return err + } + continue + } + + if bundle != nil { + for _, setting := range bundle.GetSettings() { + permissionNames[setting.Name] = struct{}{} + } + } + } + + res.Permissions = make([]string, 0, len(permissionNames)) + for p := range permissionNames { + res.Permissions = append(res.Permissions, p) + } + + return nil +} + // ListPermissionsByResource implements the PermissionServiceHandler interface func (g Service) ListPermissionsByResource(ctx context.Context, req *settingssvc.ListPermissionsByResourceRequest, res *settingssvc.ListPermissionsByResourceResponse) error { if validationError := validateListPermissionsByResource(req); validationError != nil { diff --git a/services/settings/pkg/service/v0/service_test.go b/services/settings/pkg/service/v0/service_test.go index 86b4ec479..c927cd66a 100644 --- a/services/settings/pkg/service/v0/service_test.go +++ b/services/settings/pkg/service/v0/service_test.go @@ -2,6 +2,7 @@ package svc import ( "context" + "net/http" "testing" "github.com/owncloud/ocis/v2/ocis-pkg/middleware" @@ -11,6 +12,7 @@ import ( "github.com/owncloud/ocis/v2/services/settings/pkg/store/defaults" "github.com/stretchr/testify/assert" "github.com/test-go/testify/mock" + merrors "go-micro.dev/v4/errors" "go-micro.dev/v4/metadata" ) @@ -169,3 +171,66 @@ func TestRemoveOwnRoleAssignment(t *testing.T) { err = svc.RemoveRoleFromUser(ctxWithUUID, &req, nil) assert.Nil(t, err) } + +func TestListPermissionsOfCurrentUser(t *testing.T) { + manager := &mocks.Manager{} + a := []*settingsmsg.UserRoleAssignment{ + { + Id: "00000000-0000-0000-0000-000000000001", + AccountUuid: "61445573-4dbe-4d56-88dc-88ab47aceba7", + RoleId: "aceb15b8-7486-479f-ae32-c91118e07a39", + }, + } + manager.On("ListRoleAssignments", mock.Anything).Return(a, nil) + b := &settingsmsg.Bundle{ + Id: "aceb15b8-7486-479f-ae32-c91118e07a39", + Settings: []*settingsmsg.Setting{ + { + Name: "some-permission", + }, + { + Name: "other-permission", + }, + { + Name: "duplicate-permission", + }, + { + Name: "duplicate-permission", + }, + }, + } + manager.On("ReadBundle", mock.Anything).Return(b, nil) + svc := Service{ + manager: manager, + } + + // Listing permissions for yourself + req := v0.ListPermissionsRequest{ + AccountUuid: "61445573-4dbe-4d56-88dc-88ab47aceba7", + } + res := v0.ListPermissionsResponse{} + err := svc.ListPermissions(ctxWithUUID, &req, &res) + assert.NoError(t, err) + assert.Len(t, res.Permissions, 3) +} + +func TestListPermissionsOfOtherUser(t *testing.T) { + manager := &mocks.Manager{} + svc := Service{ + manager: manager, + } + + // Listing permissions for another user produces a not found error + req := v0.ListPermissionsRequest{ + AccountUuid: "66666666-4444-4444-8888-88ab47aceba7", + } + res := v0.ListPermissionsResponse{} + err := svc.ListPermissions(ctxWithUUID, &req, &res) + assert.Error(t, err) + + // assert the requested account uuid was not found + merr, ok := merrors.As(err) + assert.True(t, ok) + assert.Equal(t, int32(http.StatusNotFound), merr.Code) + assert.Contains(t, err.Error(), req.AccountUuid) +}