From 0923f31def98194a398fe8b2cfbb165b204cc477 Mon Sep 17 00:00:00 2001 From: denisonbarbosa Date: Thu, 7 Sep 2023 10:44:22 -0400 Subject: [PATCH 1/2] Add NSS service and messages to the proto files --- authd.pb.go | 1056 ++++++++++++++++++++++++++++++++++++++-------- authd.proto | 73 +++- authd_grpc.pb.go | 307 ++++++++++++-- 3 files changed, 1231 insertions(+), 205 deletions(-) diff --git a/authd.pb.go b/authd.pb.go index d396c2544..f8483ce16 100644 --- a/authd.pb.go +++ b/authd.pb.go @@ -870,6 +870,510 @@ func (x *ESRequest) GetSessionId() string { return "" } +type GetByNameRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetByNameRequest) Reset() { + *x = GetByNameRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_authd_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetByNameRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetByNameRequest) ProtoMessage() {} + +func (x *GetByNameRequest) ProtoReflect() protoreflect.Message { + mi := &file_authd_proto_msgTypes[16] + 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 GetByNameRequest.ProtoReflect.Descriptor instead. +func (*GetByNameRequest) Descriptor() ([]byte, []int) { + return file_authd_proto_rawDescGZIP(), []int{16} +} + +func (x *GetByNameRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type GetByIDRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *GetByIDRequest) Reset() { + *x = GetByIDRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_authd_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetByIDRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetByIDRequest) ProtoMessage() {} + +func (x *GetByIDRequest) ProtoReflect() protoreflect.Message { + mi := &file_authd_proto_msgTypes[17] + 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 GetByIDRequest.ProtoReflect.Descriptor instead. +func (*GetByIDRequest) Descriptor() ([]byte, []int) { + return file_authd_proto_rawDescGZIP(), []int{17} +} + +func (x *GetByIDRequest) GetId() uint32 { + if x != nil { + return x.Id + } + return 0 +} + +type PasswdEntry struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Passwd string `protobuf:"bytes,2,opt,name=passwd,proto3" json:"passwd,omitempty"` + Uid uint32 `protobuf:"varint,3,opt,name=uid,proto3" json:"uid,omitempty"` + Gid uint32 `protobuf:"varint,4,opt,name=gid,proto3" json:"gid,omitempty"` + Gecos string `protobuf:"bytes,5,opt,name=gecos,proto3" json:"gecos,omitempty"` + Homedir string `protobuf:"bytes,6,opt,name=homedir,proto3" json:"homedir,omitempty"` + Shell string `protobuf:"bytes,7,opt,name=shell,proto3" json:"shell,omitempty"` +} + +func (x *PasswdEntry) Reset() { + *x = PasswdEntry{} + if protoimpl.UnsafeEnabled { + mi := &file_authd_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PasswdEntry) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PasswdEntry) ProtoMessage() {} + +func (x *PasswdEntry) ProtoReflect() protoreflect.Message { + mi := &file_authd_proto_msgTypes[18] + 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 PasswdEntry.ProtoReflect.Descriptor instead. +func (*PasswdEntry) Descriptor() ([]byte, []int) { + return file_authd_proto_rawDescGZIP(), []int{18} +} + +func (x *PasswdEntry) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *PasswdEntry) GetPasswd() string { + if x != nil { + return x.Passwd + } + return "" +} + +func (x *PasswdEntry) GetUid() uint32 { + if x != nil { + return x.Uid + } + return 0 +} + +func (x *PasswdEntry) GetGid() uint32 { + if x != nil { + return x.Gid + } + return 0 +} + +func (x *PasswdEntry) GetGecos() string { + if x != nil { + return x.Gecos + } + return "" +} + +func (x *PasswdEntry) GetHomedir() string { + if x != nil { + return x.Homedir + } + return "" +} + +func (x *PasswdEntry) GetShell() string { + if x != nil { + return x.Shell + } + return "" +} + +type PasswdEntries struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Entries []*PasswdEntry `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries,omitempty"` +} + +func (x *PasswdEntries) Reset() { + *x = PasswdEntries{} + if protoimpl.UnsafeEnabled { + mi := &file_authd_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PasswdEntries) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PasswdEntries) ProtoMessage() {} + +func (x *PasswdEntries) ProtoReflect() protoreflect.Message { + mi := &file_authd_proto_msgTypes[19] + 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 PasswdEntries.ProtoReflect.Descriptor instead. +func (*PasswdEntries) Descriptor() ([]byte, []int) { + return file_authd_proto_rawDescGZIP(), []int{19} +} + +func (x *PasswdEntries) GetEntries() []*PasswdEntry { + if x != nil { + return x.Entries + } + return nil +} + +type GroupEntry struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Passwd string `protobuf:"bytes,2,opt,name=passwd,proto3" json:"passwd,omitempty"` + Gid uint32 `protobuf:"varint,3,opt,name=gid,proto3" json:"gid,omitempty"` + Members []string `protobuf:"bytes,4,rep,name=members,proto3" json:"members,omitempty"` +} + +func (x *GroupEntry) Reset() { + *x = GroupEntry{} + if protoimpl.UnsafeEnabled { + mi := &file_authd_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GroupEntry) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GroupEntry) ProtoMessage() {} + +func (x *GroupEntry) ProtoReflect() protoreflect.Message { + mi := &file_authd_proto_msgTypes[20] + 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 GroupEntry.ProtoReflect.Descriptor instead. +func (*GroupEntry) Descriptor() ([]byte, []int) { + return file_authd_proto_rawDescGZIP(), []int{20} +} + +func (x *GroupEntry) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *GroupEntry) GetPasswd() string { + if x != nil { + return x.Passwd + } + return "" +} + +func (x *GroupEntry) GetGid() uint32 { + if x != nil { + return x.Gid + } + return 0 +} + +func (x *GroupEntry) GetMembers() []string { + if x != nil { + return x.Members + } + return nil +} + +type GroupEntries struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Entries []*GroupEntry `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries,omitempty"` +} + +func (x *GroupEntries) Reset() { + *x = GroupEntries{} + if protoimpl.UnsafeEnabled { + mi := &file_authd_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GroupEntries) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GroupEntries) ProtoMessage() {} + +func (x *GroupEntries) ProtoReflect() protoreflect.Message { + mi := &file_authd_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 GroupEntries.ProtoReflect.Descriptor instead. +func (*GroupEntries) Descriptor() ([]byte, []int) { + return file_authd_proto_rawDescGZIP(), []int{21} +} + +func (x *GroupEntries) GetEntries() []*GroupEntry { + if x != nil { + return x.Entries + } + return nil +} + +type ShadowEntry struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Passwd string `protobuf:"bytes,2,opt,name=passwd,proto3" json:"passwd,omitempty"` + LastChange int32 `protobuf:"varint,3,opt,name=last_change,json=lastChange,proto3" json:"last_change,omitempty"` + ChangeMinDays int32 `protobuf:"varint,4,opt,name=change_min_days,json=changeMinDays,proto3" json:"change_min_days,omitempty"` + ChangeMaxDays int32 `protobuf:"varint,5,opt,name=change_max_days,json=changeMaxDays,proto3" json:"change_max_days,omitempty"` + ChangeWarnDays int32 `protobuf:"varint,6,opt,name=change_warn_days,json=changeWarnDays,proto3" json:"change_warn_days,omitempty"` + ChangeInactiveDays int32 `protobuf:"varint,7,opt,name=change_inactive_days,json=changeInactiveDays,proto3" json:"change_inactive_days,omitempty"` + ExpireDate int32 `protobuf:"varint,8,opt,name=expire_date,json=expireDate,proto3" json:"expire_date,omitempty"` +} + +func (x *ShadowEntry) Reset() { + *x = ShadowEntry{} + if protoimpl.UnsafeEnabled { + mi := &file_authd_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ShadowEntry) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ShadowEntry) ProtoMessage() {} + +func (x *ShadowEntry) ProtoReflect() protoreflect.Message { + mi := &file_authd_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 ShadowEntry.ProtoReflect.Descriptor instead. +func (*ShadowEntry) Descriptor() ([]byte, []int) { + return file_authd_proto_rawDescGZIP(), []int{22} +} + +func (x *ShadowEntry) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ShadowEntry) GetPasswd() string { + if x != nil { + return x.Passwd + } + return "" +} + +func (x *ShadowEntry) GetLastChange() int32 { + if x != nil { + return x.LastChange + } + return 0 +} + +func (x *ShadowEntry) GetChangeMinDays() int32 { + if x != nil { + return x.ChangeMinDays + } + return 0 +} + +func (x *ShadowEntry) GetChangeMaxDays() int32 { + if x != nil { + return x.ChangeMaxDays + } + return 0 +} + +func (x *ShadowEntry) GetChangeWarnDays() int32 { + if x != nil { + return x.ChangeWarnDays + } + return 0 +} + +func (x *ShadowEntry) GetChangeInactiveDays() int32 { + if x != nil { + return x.ChangeInactiveDays + } + return 0 +} + +func (x *ShadowEntry) GetExpireDate() int32 { + if x != nil { + return x.ExpireDate + } + return 0 +} + +type ShadowEntries struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Entries []*ShadowEntry `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries,omitempty"` +} + +func (x *ShadowEntries) Reset() { + *x = ShadowEntries{} + if protoimpl.UnsafeEnabled { + mi := &file_authd_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ShadowEntries) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ShadowEntries) ProtoMessage() {} + +func (x *ShadowEntries) ProtoReflect() protoreflect.Message { + mi := &file_authd_proto_msgTypes[23] + 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 ShadowEntries.ProtoReflect.Descriptor instead. +func (*ShadowEntries) Descriptor() ([]byte, []int) { + return file_authd_proto_rawDescGZIP(), []int{23} +} + +func (x *ShadowEntries) GetEntries() []*ShadowEntry { + if x != nil { + return x.Entries + } + return nil +} + type ABResponse_BrokerInfo struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -883,7 +1387,7 @@ type ABResponse_BrokerInfo struct { func (x *ABResponse_BrokerInfo) Reset() { *x = ABResponse_BrokerInfo{} if protoimpl.UnsafeEnabled { - mi := &file_authd_proto_msgTypes[16] + mi := &file_authd_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -896,7 +1400,7 @@ func (x *ABResponse_BrokerInfo) String() string { func (*ABResponse_BrokerInfo) ProtoMessage() {} func (x *ABResponse_BrokerInfo) ProtoReflect() protoreflect.Message { - mi := &file_authd_proto_msgTypes[16] + mi := &file_authd_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -945,7 +1449,7 @@ type GAMResponse_AuthenticationMode struct { func (x *GAMResponse_AuthenticationMode) Reset() { *x = GAMResponse_AuthenticationMode{} if protoimpl.UnsafeEnabled { - mi := &file_authd_proto_msgTypes[17] + mi := &file_authd_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -958,7 +1462,7 @@ func (x *GAMResponse_AuthenticationMode) String() string { func (*GAMResponse_AuthenticationMode) ProtoMessage() {} func (x *GAMResponse_AuthenticationMode) ProtoReflect() protoreflect.Message { - mi := &file_authd_proto_msgTypes[17] + mi := &file_authd_proto_msgTypes[25] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -991,126 +1495,213 @@ func (x *GAMResponse_AuthenticationMode) GetLabel() string { var File_authd_proto protoreflect.FileDescriptor var file_authd_proto_rawDesc = []byte{ - 0x0a, 0x0b, 0x61, 0x75, 0x74, 0x68, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x07, 0x0a, - 0x05, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x28, 0x0a, 0x0a, 0x47, 0x50, 0x42, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, - 0x22, 0x4f, 0x0a, 0x0b, 0x47, 0x50, 0x42, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x2c, 0x0a, 0x0f, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x62, 0x72, 0x6f, 0x6b, - 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0e, 0x70, 0x72, 0x65, 0x76, - 0x69, 0x6f, 0x75, 0x73, 0x42, 0x72, 0x6f, 0x6b, 0x65, 0x72, 0x88, 0x01, 0x01, 0x42, 0x12, 0x0a, - 0x10, 0x5f, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x62, 0x72, 0x6f, 0x6b, 0x65, - 0x72, 0x22, 0xae, 0x01, 0x0a, 0x0a, 0x41, 0x42, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x3b, 0x0a, 0x0d, 0x62, 0x72, 0x6f, 0x6b, 0x65, 0x72, 0x73, 0x5f, 0x69, 0x6e, 0x66, 0x6f, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x41, 0x42, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x72, 0x6f, 0x6b, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, - 0x0c, 0x62, 0x72, 0x6f, 0x6b, 0x65, 0x72, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x1a, 0x63, 0x0a, - 0x0a, 0x42, 0x72, 0x6f, 0x6b, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x22, 0x0a, 0x0a, 0x62, 0x72, 0x61, 0x6e, 0x64, 0x5f, 0x69, 0x63, 0x6f, 0x6e, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x09, 0x62, 0x72, 0x61, 0x6e, 0x64, 0x49, 0x63, 0x6f, 0x6e, - 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x62, 0x72, 0x61, 0x6e, 0x64, 0x5f, 0x69, 0x63, - 0x6f, 0x6e, 0x22, 0x22, 0x0a, 0x0e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x22, 0x58, 0x0a, 0x09, 0x53, 0x42, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x62, 0x72, 0x6f, 0x6b, 0x65, 0x72, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x72, 0x6f, 0x6b, 0x65, 0x72, 0x49, 0x64, - 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, - 0x6c, 0x61, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6c, 0x61, 0x6e, 0x67, - 0x22, 0x52, 0x0a, 0x0a, 0x53, 0x42, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, - 0x0a, 0x0a, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x25, 0x0a, - 0x0e, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x4b, 0x65, 0x79, 0x22, 0x68, 0x0a, 0x0a, 0x47, 0x41, 0x4d, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, - 0x64, 0x12, 0x3b, 0x0a, 0x14, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x75, - 0x69, 0x5f, 0x6c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x09, 0x2e, 0x55, 0x49, 0x4c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x52, 0x12, 0x73, 0x75, 0x70, 0x70, - 0x6f, 0x72, 0x74, 0x65, 0x64, 0x55, 0x69, 0x4c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x73, 0x22, 0xdd, - 0x01, 0x0a, 0x08, 0x55, 0x49, 0x4c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x74, - 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, - 0x19, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, - 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x62, 0x75, - 0x74, 0x74, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x06, 0x62, 0x75, - 0x74, 0x74, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x77, 0x61, 0x69, 0x74, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x04, 0x77, 0x61, 0x69, 0x74, 0x88, 0x01, 0x01, - 0x12, 0x19, 0x0a, 0x05, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, - 0x03, 0x52, 0x05, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x07, 0x63, - 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x04, 0x52, 0x07, - 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x6c, - 0x61, 0x62, 0x65, 0x6c, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x42, - 0x07, 0x0a, 0x05, 0x5f, 0x77, 0x61, 0x69, 0x74, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x65, 0x6e, 0x74, - 0x72, 0x79, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x9d, - 0x01, 0x0a, 0x0b, 0x47, 0x41, 0x4d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x52, - 0x0a, 0x14, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x47, - 0x41, 0x4d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x65, - 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x13, 0x61, + 0x0a, 0x0b, 0x61, 0x75, 0x74, 0x68, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x61, + 0x75, 0x74, 0x68, 0x64, 0x22, 0x07, 0x0a, 0x05, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x28, 0x0a, + 0x0a, 0x47, 0x50, 0x42, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x75, + 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, + 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x4f, 0x0a, 0x0b, 0x47, 0x50, 0x42, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x0f, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, + 0x75, 0x73, 0x5f, 0x62, 0x72, 0x6f, 0x6b, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x00, 0x52, 0x0e, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x42, 0x72, 0x6f, 0x6b, 0x65, + 0x72, 0x88, 0x01, 0x01, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, + 0x73, 0x5f, 0x62, 0x72, 0x6f, 0x6b, 0x65, 0x72, 0x22, 0xb4, 0x01, 0x0a, 0x0a, 0x41, 0x42, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x0d, 0x62, 0x72, 0x6f, 0x6b, 0x65, + 0x72, 0x73, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, + 0x2e, 0x61, 0x75, 0x74, 0x68, 0x64, 0x2e, 0x41, 0x42, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x2e, 0x42, 0x72, 0x6f, 0x6b, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0c, 0x62, 0x72, + 0x6f, 0x6b, 0x65, 0x72, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x1a, 0x63, 0x0a, 0x0a, 0x42, 0x72, + 0x6f, 0x6b, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0a, + 0x62, 0x72, 0x61, 0x6e, 0x64, 0x5f, 0x69, 0x63, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x48, 0x00, 0x52, 0x09, 0x62, 0x72, 0x61, 0x6e, 0x64, 0x49, 0x63, 0x6f, 0x6e, 0x88, 0x01, 0x01, + 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x62, 0x72, 0x61, 0x6e, 0x64, 0x5f, 0x69, 0x63, 0x6f, 0x6e, 0x22, + 0x22, 0x0a, 0x0e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x6d, 0x73, 0x67, 0x22, 0x58, 0x0a, 0x09, 0x53, 0x42, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x1b, 0x0a, 0x09, 0x62, 0x72, 0x6f, 0x6b, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x72, 0x6f, 0x6b, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, + 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x61, 0x6e, + 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6c, 0x61, 0x6e, 0x67, 0x22, 0x52, 0x0a, + 0x0a, 0x53, 0x42, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, + 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x6e, + 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0d, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, + 0x79, 0x22, 0x6e, 0x0a, 0x0a, 0x47, 0x41, 0x4d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x41, + 0x0a, 0x14, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x75, 0x69, 0x5f, 0x6c, + 0x61, 0x79, 0x6f, 0x75, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x61, + 0x75, 0x74, 0x68, 0x64, 0x2e, 0x55, 0x49, 0x4c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x52, 0x12, 0x73, + 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x55, 0x69, 0x4c, 0x61, 0x79, 0x6f, 0x75, 0x74, + 0x73, 0x22, 0xdd, 0x01, 0x0a, 0x08, 0x55, 0x49, 0x4c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x12, 0x12, + 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, + 0x70, 0x65, 0x12, 0x19, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x48, 0x00, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, + 0x06, 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, + 0x06, 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x77, 0x61, + 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x04, 0x77, 0x61, 0x69, 0x74, + 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x03, 0x52, 0x05, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x88, 0x01, 0x01, 0x12, 0x1d, + 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x04, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, + 0x06, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x62, 0x75, 0x74, 0x74, + 0x6f, 0x6e, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x77, 0x61, 0x69, 0x74, 0x42, 0x08, 0x0a, 0x06, 0x5f, + 0x65, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x22, 0xa3, 0x01, 0x0a, 0x0b, 0x47, 0x41, 0x4d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x58, 0x0a, 0x14, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x25, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x64, 0x2e, 0x47, 0x41, 0x4d, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x13, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x73, 0x1a, 0x3a, 0x0a, 0x12, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, - 0x65, 0x73, 0x1a, 0x3a, 0x0a, 0x12, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, - 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x22, 0x61, - 0x0a, 0x0a, 0x53, 0x41, 0x4d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, - 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x34, 0x0a, 0x16, 0x61, - 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x6f, - 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x61, 0x75, 0x74, - 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x49, - 0x64, 0x22, 0x3e, 0x0a, 0x0b, 0x53, 0x41, 0x4d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x2f, 0x0a, 0x0e, 0x75, 0x69, 0x5f, 0x6c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x5f, 0x69, 0x6e, - 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x55, 0x49, 0x4c, 0x61, 0x79, - 0x6f, 0x75, 0x74, 0x52, 0x0c, 0x75, 0x69, 0x4c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x49, 0x6e, 0x66, - 0x6f, 0x22, 0x5b, 0x0a, 0x09, 0x49, 0x41, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, - 0x0a, 0x0a, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x2f, 0x0a, - 0x13, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x61, 0x75, 0x74, 0x68, - 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x22, 0x38, - 0x0a, 0x0a, 0x49, 0x41, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, - 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x47, 0x0a, 0x0c, 0x53, 0x44, 0x42, 0x46, - 0x55, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x62, 0x72, 0x6f, 0x6b, - 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x72, 0x6f, - 0x6b, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, - 0x65, 0x22, 0x2a, 0x0a, 0x09, 0x45, 0x53, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, - 0x0a, 0x0a, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x32, 0xf3, 0x02, - 0x0a, 0x03, 0x50, 0x41, 0x4d, 0x12, 0x27, 0x0a, 0x10, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, - 0x6c, 0x65, 0x42, 0x72, 0x6f, 0x6b, 0x65, 0x72, 0x73, 0x12, 0x06, 0x2e, 0x45, 0x6d, 0x70, 0x74, - 0x79, 0x1a, 0x0b, 0x2e, 0x41, 0x42, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, - 0x0a, 0x11, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x42, 0x72, 0x6f, - 0x6b, 0x65, 0x72, 0x12, 0x0b, 0x2e, 0x47, 0x50, 0x42, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x0c, 0x2e, 0x47, 0x50, 0x42, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, - 0x0a, 0x0c, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x42, 0x72, 0x6f, 0x6b, 0x65, 0x72, 0x12, 0x0a, - 0x2e, 0x53, 0x42, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0b, 0x2e, 0x53, 0x42, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x41, 0x75, - 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, - 0x73, 0x12, 0x0b, 0x2e, 0x47, 0x41, 0x4d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0c, - 0x2e, 0x47, 0x41, 0x4d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x18, - 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x0b, 0x2e, 0x53, 0x41, 0x4d, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0c, 0x2e, 0x53, 0x41, 0x4d, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x0f, 0x49, 0x73, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, - 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x0a, 0x2e, 0x49, 0x41, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x0b, 0x2e, 0x49, 0x41, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x20, 0x0a, 0x0a, 0x45, 0x6e, 0x64, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x0a, 0x2e, - 0x45, 0x53, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x06, 0x2e, 0x45, 0x6d, 0x70, 0x74, - 0x79, 0x12, 0x30, 0x0a, 0x17, 0x53, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x42, - 0x72, 0x6f, 0x6b, 0x65, 0x72, 0x46, 0x6f, 0x72, 0x55, 0x73, 0x65, 0x72, 0x12, 0x0d, 0x2e, 0x53, - 0x44, 0x42, 0x46, 0x55, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x06, 0x2e, 0x45, 0x6d, - 0x70, 0x74, 0x79, 0x32, 0x29, 0x0a, 0x03, 0x4e, 0x53, 0x53, 0x12, 0x22, 0x0a, 0x07, 0x54, 0x65, - 0x73, 0x74, 0x4e, 0x53, 0x53, 0x12, 0x06, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x0f, 0x2e, - 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x19, - 0x5a, 0x17, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x75, 0x62, 0x75, - 0x6e, 0x74, 0x75, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, + 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x22, 0x61, 0x0a, 0x0a, 0x53, 0x41, 0x4d, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x34, 0x0a, 0x16, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x22, 0x44, 0x0a, 0x0b, 0x53, 0x41, + 0x4d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x0e, 0x75, 0x69, 0x5f, + 0x6c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0f, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x64, 0x2e, 0x55, 0x49, 0x4c, 0x61, 0x79, 0x6f, + 0x75, 0x74, 0x52, 0x0c, 0x75, 0x69, 0x4c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x49, 0x6e, 0x66, 0x6f, + 0x22, 0x5b, 0x0a, 0x09, 0x49, 0x41, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, + 0x0a, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x2f, 0x0a, 0x13, + 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, + 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x61, 0x75, 0x74, 0x68, 0x65, + 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x22, 0x38, 0x0a, + 0x0a, 0x49, 0x41, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x61, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x47, 0x0a, 0x0c, 0x53, 0x44, 0x42, 0x46, 0x55, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x62, 0x72, 0x6f, 0x6b, 0x65, + 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x72, 0x6f, 0x6b, + 0x65, 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, + 0x22, 0x2a, 0x0a, 0x09, 0x45, 0x53, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, + 0x0a, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x26, 0x0a, 0x10, + 0x47, 0x65, 0x74, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x20, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x42, 0x79, 0x49, 0x44, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x22, 0xa3, 0x01, 0x0a, 0x0b, 0x50, 0x61, 0x73, 0x73, 0x77, + 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, + 0x73, 0x73, 0x77, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x73, 0x73, + 0x77, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x03, 0x75, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x03, 0x67, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x65, 0x63, 0x6f, 0x73, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x67, 0x65, 0x63, 0x6f, 0x73, 0x12, 0x18, 0x0a, 0x07, + 0x68, 0x6f, 0x6d, 0x65, 0x64, 0x69, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x68, + 0x6f, 0x6d, 0x65, 0x64, 0x69, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x65, 0x6c, 0x6c, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x65, 0x6c, 0x6c, 0x22, 0x3d, 0x0a, 0x0d, + 0x50, 0x61, 0x73, 0x73, 0x77, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x2c, 0x0a, + 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, + 0x2e, 0x61, 0x75, 0x74, 0x68, 0x64, 0x2e, 0x50, 0x61, 0x73, 0x73, 0x77, 0x64, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x52, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x22, 0x64, 0x0a, 0x0a, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, + 0x06, 0x70, 0x61, 0x73, 0x73, 0x77, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, + 0x61, 0x73, 0x73, 0x77, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x03, 0x67, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, + 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, + 0x73, 0x22, 0x3b, 0x0a, 0x0c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, + 0x73, 0x12, 0x2b, 0x0a, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x64, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x22, 0xa7, + 0x02, 0x0a, 0x0b, 0x53, 0x68, 0x61, 0x64, 0x6f, 0x77, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x73, 0x73, 0x77, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x73, 0x73, 0x77, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x6c, 0x61, + 0x73, 0x74, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x0a, 0x6c, 0x61, 0x73, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x63, + 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x6d, 0x69, 0x6e, 0x5f, 0x64, 0x61, 0x79, 0x73, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x69, 0x6e, 0x44, + 0x61, 0x79, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x6d, 0x61, + 0x78, 0x5f, 0x64, 0x61, 0x79, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x63, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x78, 0x44, 0x61, 0x79, 0x73, 0x12, 0x28, 0x0a, 0x10, 0x63, + 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x77, 0x61, 0x72, 0x6e, 0x5f, 0x64, 0x61, 0x79, 0x73, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x57, 0x61, 0x72, + 0x6e, 0x44, 0x61, 0x79, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, + 0x69, 0x6e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x61, 0x79, 0x73, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x12, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x49, 0x6e, 0x61, 0x63, 0x74, + 0x69, 0x76, 0x65, 0x44, 0x61, 0x79, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x78, 0x70, 0x69, 0x72, + 0x65, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x65, 0x78, + 0x70, 0x69, 0x72, 0x65, 0x44, 0x61, 0x74, 0x65, 0x22, 0x3d, 0x0a, 0x0d, 0x53, 0x68, 0x61, 0x64, + 0x6f, 0x77, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x2c, 0x0a, 0x07, 0x65, 0x6e, 0x74, + 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x61, 0x75, 0x74, + 0x68, 0x64, 0x2e, 0x53, 0x68, 0x61, 0x64, 0x6f, 0x77, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, + 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x32, 0xd3, 0x03, 0x0a, 0x03, 0x50, 0x41, 0x4d, 0x12, + 0x33, 0x0a, 0x10, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x72, 0x6f, 0x6b, + 0x65, 0x72, 0x73, 0x12, 0x0c, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x64, 0x2e, 0x45, 0x6d, 0x70, 0x74, + 0x79, 0x1a, 0x11, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x64, 0x2e, 0x41, 0x42, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x76, 0x69, + 0x6f, 0x75, 0x73, 0x42, 0x72, 0x6f, 0x6b, 0x65, 0x72, 0x12, 0x11, 0x2e, 0x61, 0x75, 0x74, 0x68, + 0x64, 0x2e, 0x47, 0x50, 0x42, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x61, + 0x75, 0x74, 0x68, 0x64, 0x2e, 0x47, 0x50, 0x42, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x33, 0x0a, 0x0c, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x42, 0x72, 0x6f, 0x6b, 0x65, 0x72, + 0x12, 0x10, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x64, 0x2e, 0x53, 0x42, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x64, 0x2e, 0x53, 0x42, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x41, 0x75, 0x74, 0x68, + 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x73, 0x12, + 0x11, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x64, 0x2e, 0x47, 0x41, 0x4d, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x64, 0x2e, 0x47, 0x41, 0x4d, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x18, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, + 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, + 0x64, 0x65, 0x12, 0x11, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x64, 0x2e, 0x53, 0x41, 0x4d, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x64, 0x2e, 0x53, 0x41, + 0x4d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x0f, 0x49, 0x73, 0x41, + 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x10, 0x2e, 0x61, + 0x75, 0x74, 0x68, 0x64, 0x2e, 0x49, 0x41, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, + 0x2e, 0x61, 0x75, 0x74, 0x68, 0x64, 0x2e, 0x49, 0x41, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x2c, 0x0a, 0x0a, 0x45, 0x6e, 0x64, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, + 0x10, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x64, 0x2e, 0x45, 0x53, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x0c, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x64, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, + 0x3c, 0x0a, 0x17, 0x53, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x42, 0x72, 0x6f, + 0x6b, 0x65, 0x72, 0x46, 0x6f, 0x72, 0x55, 0x73, 0x65, 0x72, 0x12, 0x13, 0x2e, 0x61, 0x75, 0x74, + 0x68, 0x64, 0x2e, 0x53, 0x44, 0x42, 0x46, 0x55, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x0c, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x64, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x32, 0xe1, 0x03, + 0x0a, 0x03, 0x4e, 0x53, 0x53, 0x12, 0x3e, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x50, 0x61, 0x73, 0x73, + 0x77, 0x64, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x17, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x64, + 0x2e, 0x47, 0x65, 0x74, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x12, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x64, 0x2e, 0x50, 0x61, 0x73, 0x73, 0x77, 0x64, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x3b, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x73, 0x73, + 0x77, 0x64, 0x42, 0x79, 0x55, 0x49, 0x44, 0x12, 0x15, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x64, 0x2e, + 0x47, 0x65, 0x74, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, + 0x2e, 0x61, 0x75, 0x74, 0x68, 0x64, 0x2e, 0x50, 0x61, 0x73, 0x73, 0x77, 0x64, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x12, 0x36, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, 0x64, 0x45, + 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x0c, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x64, 0x2e, 0x45, + 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x14, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x64, 0x2e, 0x50, 0x61, 0x73, + 0x73, 0x77, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x3c, 0x0a, 0x0e, 0x47, 0x65, + 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x17, 0x2e, 0x61, + 0x75, 0x74, 0x68, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x64, 0x2e, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x39, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x42, 0x79, 0x47, 0x49, 0x44, 0x12, 0x15, 0x2e, 0x61, 0x75, 0x74, 0x68, + 0x64, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x11, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x64, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x12, 0x34, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x45, + 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x0c, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x64, 0x2e, 0x45, + 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x13, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x64, 0x2e, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x3e, 0x0a, 0x0f, 0x47, 0x65, 0x74, + 0x53, 0x68, 0x61, 0x64, 0x6f, 0x77, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x17, 0x2e, 0x61, + 0x75, 0x74, 0x68, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x64, 0x2e, 0x53, 0x68, + 0x61, 0x64, 0x6f, 0x77, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x36, 0x0a, 0x10, 0x47, 0x65, 0x74, + 0x53, 0x68, 0x61, 0x64, 0x6f, 0x77, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x0c, 0x2e, + 0x61, 0x75, 0x74, 0x68, 0x64, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x14, 0x2e, 0x61, 0x75, + 0x74, 0x68, 0x64, 0x2e, 0x53, 0x68, 0x61, 0x64, 0x6f, 0x77, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, + 0x73, 0x42, 0x19, 0x5a, 0x17, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x75, 0x62, 0x75, 0x6e, 0x74, 0x75, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x64, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1125,55 +1716,80 @@ func file_authd_proto_rawDescGZIP() []byte { return file_authd_proto_rawDescData } -var file_authd_proto_msgTypes = make([]protoimpl.MessageInfo, 18) +var file_authd_proto_msgTypes = make([]protoimpl.MessageInfo, 26) var file_authd_proto_goTypes = []interface{}{ - (*Empty)(nil), // 0: Empty - (*GPBRequest)(nil), // 1: GPBRequest - (*GPBResponse)(nil), // 2: GPBResponse - (*ABResponse)(nil), // 3: ABResponse - (*StringResponse)(nil), // 4: StringResponse - (*SBRequest)(nil), // 5: SBRequest - (*SBResponse)(nil), // 6: SBResponse - (*GAMRequest)(nil), // 7: GAMRequest - (*UILayout)(nil), // 8: UILayout - (*GAMResponse)(nil), // 9: GAMResponse - (*SAMRequest)(nil), // 10: SAMRequest - (*SAMResponse)(nil), // 11: SAMResponse - (*IARequest)(nil), // 12: IARequest - (*IAResponse)(nil), // 13: IAResponse - (*SDBFURequest)(nil), // 14: SDBFURequest - (*ESRequest)(nil), // 15: ESRequest - (*ABResponse_BrokerInfo)(nil), // 16: ABResponse.BrokerInfo - (*GAMResponse_AuthenticationMode)(nil), // 17: GAMResponse.AuthenticationMode + (*Empty)(nil), // 0: authd.Empty + (*GPBRequest)(nil), // 1: authd.GPBRequest + (*GPBResponse)(nil), // 2: authd.GPBResponse + (*ABResponse)(nil), // 3: authd.ABResponse + (*StringResponse)(nil), // 4: authd.StringResponse + (*SBRequest)(nil), // 5: authd.SBRequest + (*SBResponse)(nil), // 6: authd.SBResponse + (*GAMRequest)(nil), // 7: authd.GAMRequest + (*UILayout)(nil), // 8: authd.UILayout + (*GAMResponse)(nil), // 9: authd.GAMResponse + (*SAMRequest)(nil), // 10: authd.SAMRequest + (*SAMResponse)(nil), // 11: authd.SAMResponse + (*IARequest)(nil), // 12: authd.IARequest + (*IAResponse)(nil), // 13: authd.IAResponse + (*SDBFURequest)(nil), // 14: authd.SDBFURequest + (*ESRequest)(nil), // 15: authd.ESRequest + (*GetByNameRequest)(nil), // 16: authd.GetByNameRequest + (*GetByIDRequest)(nil), // 17: authd.GetByIDRequest + (*PasswdEntry)(nil), // 18: authd.PasswdEntry + (*PasswdEntries)(nil), // 19: authd.PasswdEntries + (*GroupEntry)(nil), // 20: authd.GroupEntry + (*GroupEntries)(nil), // 21: authd.GroupEntries + (*ShadowEntry)(nil), // 22: authd.ShadowEntry + (*ShadowEntries)(nil), // 23: authd.ShadowEntries + (*ABResponse_BrokerInfo)(nil), // 24: authd.ABResponse.BrokerInfo + (*GAMResponse_AuthenticationMode)(nil), // 25: authd.GAMResponse.AuthenticationMode } var file_authd_proto_depIdxs = []int32{ - 16, // 0: ABResponse.brokers_infos:type_name -> ABResponse.BrokerInfo - 8, // 1: GAMRequest.supported_ui_layouts:type_name -> UILayout - 17, // 2: GAMResponse.authentication_modes:type_name -> GAMResponse.AuthenticationMode - 8, // 3: SAMResponse.ui_layout_info:type_name -> UILayout - 0, // 4: PAM.AvailableBrokers:input_type -> Empty - 1, // 5: PAM.GetPreviousBroker:input_type -> GPBRequest - 5, // 6: PAM.SelectBroker:input_type -> SBRequest - 7, // 7: PAM.GetAuthenticationModes:input_type -> GAMRequest - 10, // 8: PAM.SelectAuthenticationMode:input_type -> SAMRequest - 12, // 9: PAM.IsAuthenticated:input_type -> IARequest - 15, // 10: PAM.EndSession:input_type -> ESRequest - 14, // 11: PAM.SetDefaultBrokerForUser:input_type -> SDBFURequest - 0, // 12: NSS.TestNSS:input_type -> Empty - 3, // 13: PAM.AvailableBrokers:output_type -> ABResponse - 2, // 14: PAM.GetPreviousBroker:output_type -> GPBResponse - 6, // 15: PAM.SelectBroker:output_type -> SBResponse - 9, // 16: PAM.GetAuthenticationModes:output_type -> GAMResponse - 11, // 17: PAM.SelectAuthenticationMode:output_type -> SAMResponse - 13, // 18: PAM.IsAuthenticated:output_type -> IAResponse - 0, // 19: PAM.EndSession:output_type -> Empty - 0, // 20: PAM.SetDefaultBrokerForUser:output_type -> Empty - 4, // 21: NSS.TestNSS:output_type -> StringResponse - 13, // [13:22] is the sub-list for method output_type - 4, // [4:13] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name + 24, // 0: authd.ABResponse.brokers_infos:type_name -> authd.ABResponse.BrokerInfo + 8, // 1: authd.GAMRequest.supported_ui_layouts:type_name -> authd.UILayout + 25, // 2: authd.GAMResponse.authentication_modes:type_name -> authd.GAMResponse.AuthenticationMode + 8, // 3: authd.SAMResponse.ui_layout_info:type_name -> authd.UILayout + 18, // 4: authd.PasswdEntries.entries:type_name -> authd.PasswdEntry + 20, // 5: authd.GroupEntries.entries:type_name -> authd.GroupEntry + 22, // 6: authd.ShadowEntries.entries:type_name -> authd.ShadowEntry + 0, // 7: authd.PAM.AvailableBrokers:input_type -> authd.Empty + 1, // 8: authd.PAM.GetPreviousBroker:input_type -> authd.GPBRequest + 5, // 9: authd.PAM.SelectBroker:input_type -> authd.SBRequest + 7, // 10: authd.PAM.GetAuthenticationModes:input_type -> authd.GAMRequest + 10, // 11: authd.PAM.SelectAuthenticationMode:input_type -> authd.SAMRequest + 12, // 12: authd.PAM.IsAuthenticated:input_type -> authd.IARequest + 15, // 13: authd.PAM.EndSession:input_type -> authd.ESRequest + 14, // 14: authd.PAM.SetDefaultBrokerForUser:input_type -> authd.SDBFURequest + 16, // 15: authd.NSS.GetPasswdByName:input_type -> authd.GetByNameRequest + 17, // 16: authd.NSS.GetPasswdByUID:input_type -> authd.GetByIDRequest + 0, // 17: authd.NSS.GetPasswdEntries:input_type -> authd.Empty + 16, // 18: authd.NSS.GetGroupByName:input_type -> authd.GetByNameRequest + 17, // 19: authd.NSS.GetGroupByGID:input_type -> authd.GetByIDRequest + 0, // 20: authd.NSS.GetGroupEntries:input_type -> authd.Empty + 16, // 21: authd.NSS.GetShadowByName:input_type -> authd.GetByNameRequest + 0, // 22: authd.NSS.GetShadowEntries:input_type -> authd.Empty + 3, // 23: authd.PAM.AvailableBrokers:output_type -> authd.ABResponse + 2, // 24: authd.PAM.GetPreviousBroker:output_type -> authd.GPBResponse + 6, // 25: authd.PAM.SelectBroker:output_type -> authd.SBResponse + 9, // 26: authd.PAM.GetAuthenticationModes:output_type -> authd.GAMResponse + 11, // 27: authd.PAM.SelectAuthenticationMode:output_type -> authd.SAMResponse + 13, // 28: authd.PAM.IsAuthenticated:output_type -> authd.IAResponse + 0, // 29: authd.PAM.EndSession:output_type -> authd.Empty + 0, // 30: authd.PAM.SetDefaultBrokerForUser:output_type -> authd.Empty + 18, // 31: authd.NSS.GetPasswdByName:output_type -> authd.PasswdEntry + 18, // 32: authd.NSS.GetPasswdByUID:output_type -> authd.PasswdEntry + 19, // 33: authd.NSS.GetPasswdEntries:output_type -> authd.PasswdEntries + 20, // 34: authd.NSS.GetGroupByName:output_type -> authd.GroupEntry + 20, // 35: authd.NSS.GetGroupByGID:output_type -> authd.GroupEntry + 21, // 36: authd.NSS.GetGroupEntries:output_type -> authd.GroupEntries + 22, // 37: authd.NSS.GetShadowByName:output_type -> authd.ShadowEntry + 23, // 38: authd.NSS.GetShadowEntries:output_type -> authd.ShadowEntries + 23, // [23:39] is the sub-list for method output_type + 7, // [7:23] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name } func init() { file_authd_proto_init() } @@ -1375,7 +1991,7 @@ func file_authd_proto_init() { } } file_authd_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ABResponse_BrokerInfo); i { + switch v := v.(*GetByNameRequest); i { case 0: return &v.state case 1: @@ -1387,6 +2003,102 @@ func file_authd_proto_init() { } } file_authd_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetByIDRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_authd_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PasswdEntry); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_authd_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PasswdEntries); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_authd_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GroupEntry); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_authd_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GroupEntries); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_authd_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ShadowEntry); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_authd_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ShadowEntries); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_authd_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ABResponse_BrokerInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_authd_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GAMResponse_AuthenticationMode); i { case 0: return &v.state @@ -1401,14 +2113,14 @@ func file_authd_proto_init() { } file_authd_proto_msgTypes[2].OneofWrappers = []interface{}{} file_authd_proto_msgTypes[8].OneofWrappers = []interface{}{} - file_authd_proto_msgTypes[16].OneofWrappers = []interface{}{} + file_authd_proto_msgTypes[24].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_authd_proto_rawDesc, NumEnums: 0, - NumMessages: 18, + NumMessages: 26, NumExtensions: 0, NumServices: 2, }, diff --git a/authd.proto b/authd.proto index 2395f573b..920f6f2cd 100644 --- a/authd.proto +++ b/authd.proto @@ -1,7 +1,10 @@ syntax = "proto3"; +package authd; option go_package = "github.com/ubuntu/authd"; +message Empty {} + service PAM { rpc AvailableBrokers(Empty) returns (ABResponse); rpc GetPreviousBroker(GPBRequest) returns (GPBResponse); @@ -15,14 +18,6 @@ service PAM { rpc SetDefaultBrokerForUser(SDBFURequest) returns (Empty); } -service NSS { - rpc TestNSS(Empty) returns (StringResponse); -} - - -message Empty { -} - message GPBRequest { string username = 1; } @@ -49,7 +44,6 @@ message SBRequest { string broker_id = 1; string username = 2; string lang = 3; - } message SBResponse { @@ -113,3 +107,64 @@ message SDBFURequest { message ESRequest { string session_id = 1; } + +service NSS { + rpc GetPasswdByName(GetByNameRequest) returns (PasswdEntry); + rpc GetPasswdByUID(GetByIDRequest) returns (PasswdEntry); + rpc GetPasswdEntries(Empty) returns (PasswdEntries); + + rpc GetGroupByName(GetByNameRequest) returns (GroupEntry); + rpc GetGroupByGID(GetByIDRequest) returns (GroupEntry); + rpc GetGroupEntries(Empty) returns (GroupEntries); + + rpc GetShadowByName(GetByNameRequest) returns (ShadowEntry); + rpc GetShadowEntries(Empty) returns (ShadowEntries); +} + +message GetByNameRequest{ + string name = 1; +} + +message GetByIDRequest{ + uint32 id = 1; +} + +message PasswdEntry { + string name = 1; + string passwd = 2; + uint32 uid = 3; + uint32 gid = 4; + string gecos = 5; + string homedir = 6; + string shell = 7; +} + +message PasswdEntries { + repeated PasswdEntry entries = 1; +} + +message GroupEntry { + string name = 1; + string passwd = 2; + uint32 gid = 3; + repeated string members = 4; +} + +message GroupEntries { + repeated GroupEntry entries = 1; +} + +message ShadowEntry { + string name = 1; + string passwd = 2; + int32 last_change = 3; + int32 change_min_days = 4; + int32 change_max_days = 5; + int32 change_warn_days = 6; + int32 change_inactive_days = 7; + int32 expire_date = 8; +} + +message ShadowEntries { + repeated ShadowEntry entries = 1; +} diff --git a/authd_grpc.pb.go b/authd_grpc.pb.go index 575a32b52..cdb690e0a 100644 --- a/authd_grpc.pb.go +++ b/authd_grpc.pb.go @@ -19,14 +19,14 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - PAM_AvailableBrokers_FullMethodName = "/PAM/AvailableBrokers" - PAM_GetPreviousBroker_FullMethodName = "/PAM/GetPreviousBroker" - PAM_SelectBroker_FullMethodName = "/PAM/SelectBroker" - PAM_GetAuthenticationModes_FullMethodName = "/PAM/GetAuthenticationModes" - PAM_SelectAuthenticationMode_FullMethodName = "/PAM/SelectAuthenticationMode" - PAM_IsAuthenticated_FullMethodName = "/PAM/IsAuthenticated" - PAM_EndSession_FullMethodName = "/PAM/EndSession" - PAM_SetDefaultBrokerForUser_FullMethodName = "/PAM/SetDefaultBrokerForUser" + PAM_AvailableBrokers_FullMethodName = "/authd.PAM/AvailableBrokers" + PAM_GetPreviousBroker_FullMethodName = "/authd.PAM/GetPreviousBroker" + PAM_SelectBroker_FullMethodName = "/authd.PAM/SelectBroker" + PAM_GetAuthenticationModes_FullMethodName = "/authd.PAM/GetAuthenticationModes" + PAM_SelectAuthenticationMode_FullMethodName = "/authd.PAM/SelectAuthenticationMode" + PAM_IsAuthenticated_FullMethodName = "/authd.PAM/IsAuthenticated" + PAM_EndSession_FullMethodName = "/authd.PAM/EndSession" + PAM_SetDefaultBrokerForUser_FullMethodName = "/authd.PAM/SetDefaultBrokerForUser" ) // PAMClient is the client API for PAM service. @@ -327,7 +327,7 @@ func _PAM_SetDefaultBrokerForUser_Handler(srv interface{}, ctx context.Context, // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var PAM_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "PAM", + ServiceName: "authd.PAM", HandlerType: (*PAMServer)(nil), Methods: []grpc.MethodDesc{ { @@ -368,14 +368,28 @@ var PAM_ServiceDesc = grpc.ServiceDesc{ } const ( - NSS_TestNSS_FullMethodName = "/NSS/TestNSS" + NSS_GetPasswdByName_FullMethodName = "/authd.NSS/GetPasswdByName" + NSS_GetPasswdByUID_FullMethodName = "/authd.NSS/GetPasswdByUID" + NSS_GetPasswdEntries_FullMethodName = "/authd.NSS/GetPasswdEntries" + NSS_GetGroupByName_FullMethodName = "/authd.NSS/GetGroupByName" + NSS_GetGroupByGID_FullMethodName = "/authd.NSS/GetGroupByGID" + NSS_GetGroupEntries_FullMethodName = "/authd.NSS/GetGroupEntries" + NSS_GetShadowByName_FullMethodName = "/authd.NSS/GetShadowByName" + NSS_GetShadowEntries_FullMethodName = "/authd.NSS/GetShadowEntries" ) // NSSClient is the client API for NSS service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type NSSClient interface { - TestNSS(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*StringResponse, error) + GetPasswdByName(ctx context.Context, in *GetByNameRequest, opts ...grpc.CallOption) (*PasswdEntry, error) + GetPasswdByUID(ctx context.Context, in *GetByIDRequest, opts ...grpc.CallOption) (*PasswdEntry, error) + GetPasswdEntries(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*PasswdEntries, error) + GetGroupByName(ctx context.Context, in *GetByNameRequest, opts ...grpc.CallOption) (*GroupEntry, error) + GetGroupByGID(ctx context.Context, in *GetByIDRequest, opts ...grpc.CallOption) (*GroupEntry, error) + GetGroupEntries(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*GroupEntries, error) + GetShadowByName(ctx context.Context, in *GetByNameRequest, opts ...grpc.CallOption) (*ShadowEntry, error) + GetShadowEntries(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ShadowEntries, error) } type nSSClient struct { @@ -386,9 +400,72 @@ func NewNSSClient(cc grpc.ClientConnInterface) NSSClient { return &nSSClient{cc} } -func (c *nSSClient) TestNSS(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*StringResponse, error) { - out := new(StringResponse) - err := c.cc.Invoke(ctx, NSS_TestNSS_FullMethodName, in, out, opts...) +func (c *nSSClient) GetPasswdByName(ctx context.Context, in *GetByNameRequest, opts ...grpc.CallOption) (*PasswdEntry, error) { + out := new(PasswdEntry) + err := c.cc.Invoke(ctx, NSS_GetPasswdByName_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *nSSClient) GetPasswdByUID(ctx context.Context, in *GetByIDRequest, opts ...grpc.CallOption) (*PasswdEntry, error) { + out := new(PasswdEntry) + err := c.cc.Invoke(ctx, NSS_GetPasswdByUID_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *nSSClient) GetPasswdEntries(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*PasswdEntries, error) { + out := new(PasswdEntries) + err := c.cc.Invoke(ctx, NSS_GetPasswdEntries_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *nSSClient) GetGroupByName(ctx context.Context, in *GetByNameRequest, opts ...grpc.CallOption) (*GroupEntry, error) { + out := new(GroupEntry) + err := c.cc.Invoke(ctx, NSS_GetGroupByName_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *nSSClient) GetGroupByGID(ctx context.Context, in *GetByIDRequest, opts ...grpc.CallOption) (*GroupEntry, error) { + out := new(GroupEntry) + err := c.cc.Invoke(ctx, NSS_GetGroupByGID_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *nSSClient) GetGroupEntries(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*GroupEntries, error) { + out := new(GroupEntries) + err := c.cc.Invoke(ctx, NSS_GetGroupEntries_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *nSSClient) GetShadowByName(ctx context.Context, in *GetByNameRequest, opts ...grpc.CallOption) (*ShadowEntry, error) { + out := new(ShadowEntry) + err := c.cc.Invoke(ctx, NSS_GetShadowByName_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *nSSClient) GetShadowEntries(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ShadowEntries, error) { + out := new(ShadowEntries) + err := c.cc.Invoke(ctx, NSS_GetShadowEntries_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -399,7 +476,14 @@ func (c *nSSClient) TestNSS(ctx context.Context, in *Empty, opts ...grpc.CallOpt // All implementations must embed UnimplementedNSSServer // for forward compatibility type NSSServer interface { - TestNSS(context.Context, *Empty) (*StringResponse, error) + GetPasswdByName(context.Context, *GetByNameRequest) (*PasswdEntry, error) + GetPasswdByUID(context.Context, *GetByIDRequest) (*PasswdEntry, error) + GetPasswdEntries(context.Context, *Empty) (*PasswdEntries, error) + GetGroupByName(context.Context, *GetByNameRequest) (*GroupEntry, error) + GetGroupByGID(context.Context, *GetByIDRequest) (*GroupEntry, error) + GetGroupEntries(context.Context, *Empty) (*GroupEntries, error) + GetShadowByName(context.Context, *GetByNameRequest) (*ShadowEntry, error) + GetShadowEntries(context.Context, *Empty) (*ShadowEntries, error) mustEmbedUnimplementedNSSServer() } @@ -407,8 +491,29 @@ type NSSServer interface { type UnimplementedNSSServer struct { } -func (UnimplementedNSSServer) TestNSS(context.Context, *Empty) (*StringResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method TestNSS not implemented") +func (UnimplementedNSSServer) GetPasswdByName(context.Context, *GetByNameRequest) (*PasswdEntry, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetPasswdByName not implemented") +} +func (UnimplementedNSSServer) GetPasswdByUID(context.Context, *GetByIDRequest) (*PasswdEntry, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetPasswdByUID not implemented") +} +func (UnimplementedNSSServer) GetPasswdEntries(context.Context, *Empty) (*PasswdEntries, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetPasswdEntries not implemented") +} +func (UnimplementedNSSServer) GetGroupByName(context.Context, *GetByNameRequest) (*GroupEntry, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetGroupByName not implemented") +} +func (UnimplementedNSSServer) GetGroupByGID(context.Context, *GetByIDRequest) (*GroupEntry, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetGroupByGID not implemented") +} +func (UnimplementedNSSServer) GetGroupEntries(context.Context, *Empty) (*GroupEntries, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetGroupEntries not implemented") +} +func (UnimplementedNSSServer) GetShadowByName(context.Context, *GetByNameRequest) (*ShadowEntry, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetShadowByName not implemented") +} +func (UnimplementedNSSServer) GetShadowEntries(context.Context, *Empty) (*ShadowEntries, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetShadowEntries not implemented") } func (UnimplementedNSSServer) mustEmbedUnimplementedNSSServer() {} @@ -423,20 +528,146 @@ func RegisterNSSServer(s grpc.ServiceRegistrar, srv NSSServer) { s.RegisterService(&NSS_ServiceDesc, srv) } -func _NSS_TestNSS_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _NSS_GetPasswdByName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetByNameRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NSSServer).GetPasswdByName(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: NSS_GetPasswdByName_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NSSServer).GetPasswdByName(ctx, req.(*GetByNameRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NSS_GetPasswdByUID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetByIDRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NSSServer).GetPasswdByUID(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: NSS_GetPasswdByUID_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NSSServer).GetPasswdByUID(ctx, req.(*GetByIDRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NSS_GetPasswdEntries_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NSSServer).GetPasswdEntries(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: NSS_GetPasswdEntries_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NSSServer).GetPasswdEntries(ctx, req.(*Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _NSS_GetGroupByName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetByNameRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NSSServer).GetGroupByName(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: NSS_GetGroupByName_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NSSServer).GetGroupByName(ctx, req.(*GetByNameRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NSS_GetGroupByGID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetByIDRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NSSServer).GetGroupByGID(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: NSS_GetGroupByGID_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NSSServer).GetGroupByGID(ctx, req.(*GetByIDRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NSS_GetGroupEntries_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NSSServer).GetGroupEntries(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: NSS_GetGroupEntries_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NSSServer).GetGroupEntries(ctx, req.(*Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _NSS_GetShadowByName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetByNameRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NSSServer).GetShadowByName(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: NSS_GetShadowByName_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NSSServer).GetShadowByName(ctx, req.(*GetByNameRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NSS_GetShadowEntries_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(Empty) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(NSSServer).TestNSS(ctx, in) + return srv.(NSSServer).GetShadowEntries(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: NSS_TestNSS_FullMethodName, + FullMethod: NSS_GetShadowEntries_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(NSSServer).TestNSS(ctx, req.(*Empty)) + return srv.(NSSServer).GetShadowEntries(ctx, req.(*Empty)) } return interceptor(ctx, in, info, handler) } @@ -445,12 +676,40 @@ func _NSS_TestNSS_Handler(srv interface{}, ctx context.Context, dec func(interfa // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var NSS_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "NSS", + ServiceName: "authd.NSS", HandlerType: (*NSSServer)(nil), Methods: []grpc.MethodDesc{ { - MethodName: "TestNSS", - Handler: _NSS_TestNSS_Handler, + MethodName: "GetPasswdByName", + Handler: _NSS_GetPasswdByName_Handler, + }, + { + MethodName: "GetPasswdByUID", + Handler: _NSS_GetPasswdByUID_Handler, + }, + { + MethodName: "GetPasswdEntries", + Handler: _NSS_GetPasswdEntries_Handler, + }, + { + MethodName: "GetGroupByName", + Handler: _NSS_GetGroupByName_Handler, + }, + { + MethodName: "GetGroupByGID", + Handler: _NSS_GetGroupByGID_Handler, + }, + { + MethodName: "GetGroupEntries", + Handler: _NSS_GetGroupEntries_Handler, + }, + { + MethodName: "GetShadowByName", + Handler: _NSS_GetShadowByName_Handler, + }, + { + MethodName: "GetShadowEntries", + Handler: _NSS_GetShadowEntries_Handler, }, }, Streams: []grpc.StreamDesc{}, From 822be65bdbf08824a15426c6b4d3470f06ee8214 Mon Sep 17 00:00:00 2001 From: denisonbarbosa Date: Thu, 7 Sep 2023 10:45:23 -0400 Subject: [PATCH 2/2] Add static impl of the Go NSS server --- internal/services/nss/nss.go | 163 +++++++++++++++++++++++++++++++++++ 1 file changed, 163 insertions(+) diff --git a/internal/services/nss/nss.go b/internal/services/nss/nss.go index 30ee9c966..83eac3754 100644 --- a/internal/services/nss/nss.go +++ b/internal/services/nss/nss.go @@ -3,6 +3,7 @@ package nss import ( "context" + "fmt" "github.com/ubuntu/authd" "github.com/ubuntu/authd/internal/log" @@ -19,3 +20,165 @@ func NewService(ctx context.Context) Service { return Service{} } + +// GetPasswdByName returns the passwd entry for the given username. +func (s Service) GetPasswdByName(ctx context.Context, req *authd.GetByNameRequest) (*authd.PasswdEntry, error) { + if req.GetName() != "static-user" { + return nil, fmt.Errorf("user %q not found", req.GetName()) + } + return &authd.PasswdEntry{ + Name: "static-user", + Passwd: "x", + Uid: 1111, + Gid: 1111, + Gecos: "Static User", + Homedir: "/home/static-user/", + Shell: "/bin/bash", + }, nil +} + +// GetPasswdByUID returns the passwd entry for the given UID. +func (s Service) GetPasswdByUID(ctx context.Context, req *authd.GetByIDRequest) (*authd.PasswdEntry, error) { + if req.GetId() != 1111 { + return nil, fmt.Errorf("user with ID %d not found", req.GetId()) + } + + return &authd.PasswdEntry{ + Name: "static-user", + Passwd: "x", + Uid: 1111, + Gid: 1111, + Gecos: "Static User", + Homedir: "/home/static-user/", + Shell: "/bin/bash", + }, nil +} + +// GetPasswdEntries returns all passwd entries. +func (s Service) GetPasswdEntries(ctx context.Context, req *authd.Empty) (*authd.PasswdEntries, error) { + return &authd.PasswdEntries{ + Entries: []*authd.PasswdEntry{ + { + Name: "static-user", + Passwd: "x", + Uid: 1111, + Gid: 1111, + Gecos: "Static User", + Homedir: "/home/static-user/", + Shell: "/bin/bash", + }, + { + Name: "static-user-2", + Passwd: "x", + Uid: 2222, + Gid: 3333, + Gecos: "Static User 2", + Homedir: "/home/static-user-2/", + Shell: "/bin/bash", + }, + }, + }, nil +} + +// GetGroupByName returns the group entry for the given group name. +func (s Service) GetGroupByName(ctx context.Context, req *authd.GetByNameRequest) (*authd.GroupEntry, error) { + if req.GetName() != "static-user" { + return nil, fmt.Errorf("group %q not found", req.GetName()) + } + + return &authd.GroupEntry{ + Name: "static-user", + Passwd: "x", + Gid: 1111, + Members: []string{ + "static-user", + }, + }, nil +} + +// GetGroupByGID returns the group entry for the given GID. +func (s Service) GetGroupByGID(ctx context.Context, req *authd.GetByIDRequest) (*authd.GroupEntry, error) { + if req.GetId() != 1111 { + return nil, fmt.Errorf("group with ID %d not found", req.GetId()) + } + + return &authd.GroupEntry{ + Name: "static-user", + Passwd: "x", + Gid: 1111, + Members: []string{ + "static-user", + }, + }, nil +} + +// GetGroupEntries returns all group entries. +func (s Service) GetGroupEntries(ctx context.Context, req *authd.Empty) (*authd.GroupEntries, error) { + return &authd.GroupEntries{ + Entries: []*authd.GroupEntry{ + { + Name: "static-group", + Passwd: "x", + Gid: 1111, + Members: []string{ + "static-user", + }, + }, + { + Name: "static-group-2", + Passwd: "x", + Gid: 3333, + Members: []string{ + "static-user", + "static-user-2", + }, + }, + }, + }, nil +} + +// GetShadowByName returns the shadow entry for the given username. +func (s Service) GetShadowByName(ctx context.Context, req *authd.GetByNameRequest) (*authd.ShadowEntry, error) { + if req.GetName() != "static-user" { + return nil, fmt.Errorf("user %q not found", req.GetName()) + } + + return &authd.ShadowEntry{ + Name: "static-user", + Passwd: "", + LastChange: -1, + ChangeMinDays: -1, + ChangeMaxDays: -1, + ChangeWarnDays: -1, + ChangeInactiveDays: -1, + ExpireDate: -1, + }, nil +} + +// GetShadowEntries returns all shadow entries. +func (s Service) GetShadowEntries(ctx context.Context, req *authd.Empty) (*authd.ShadowEntries, error) { + return &authd.ShadowEntries{ + Entries: []*authd.ShadowEntry{ + { + Name: "static-user", + Passwd: "", + LastChange: -1, + ChangeMinDays: -1, + ChangeMaxDays: -1, + ChangeWarnDays: -1, + ChangeInactiveDays: -1, + ExpireDate: -1, + }, + { + Name: "static-user-2", + Passwd: "", + LastChange: -1, + ChangeMinDays: -1, + ChangeMaxDays: -1, + ChangeWarnDays: -1, + ChangeInactiveDays: -1, + ExpireDate: -1, + }, + }, + }, nil +}