diff --git a/cmd/common/beat_service.go b/cmd/common/beat_service.go index 1f3cfb8..8a1a0c4 100644 --- a/cmd/common/beat_service.go +++ b/cmd/common/beat_service.go @@ -15,14 +15,20 @@ import ( func NewBeatService(apiClient *service.JMService) *BeatService { return &BeatService{ - sessMap: make(map[string]struct{}), + sessMap: make(map[string]*SessionToken), apiClient: apiClient, taskChan: make(chan *model.TerminalTask, 5), } } +type SessionToken struct { + model.Session + TokenId string + invalid bool +} + type BeatService struct { - sessMap map[string]struct{} + sessMap map[string]*SessionToken apiClient *service.JMService @@ -88,18 +94,14 @@ func (b *BeatService) receiveWsTask(ws *websocket.Conn, done chan struct{}) { } if len(tasks) != 0 { for i := range tasks { - select { - case b.taskChan <- &tasks[i]: - default: - logger.Infof("Discard task %v", tasks[i]) - } + b.sendTask(&tasks[i]) } } } } func (b *BeatService) GetStatusData() interface{} { - sessions := b.getSessions() + sessions := b.getSessionIds() payload := model.HeartbeatData{ SessionOnlineIds: sessions, CpuUsed: common.CpuLoad1Usage(), @@ -113,7 +115,7 @@ func (b *BeatService) GetStatusData() interface{} { } } -func (b *BeatService) getSessions() []string { +func (b *BeatService) getSessionIds() []string { b.Lock() defer b.Unlock() sids := make([]string, 0, len(b.sessMap)) @@ -123,12 +125,20 @@ func (b *BeatService) getSessions() []string { return sids } -var empty = struct{}{} +func (b *BeatService) StoreSessionId(sess *SessionToken) { + b.Lock() + defer b.Unlock() + b.sessMap[sess.ID] = sess +} -func (b *BeatService) StoreSessionId(sid string) { +func (b *BeatService) GetSessions() []*SessionToken { b.Lock() defer b.Unlock() - b.sessMap[sid] = empty + sids := make([]*SessionToken, 0, len(b.sessMap)) + for sid := range b.sessMap { + sids = append(sids, b.sessMap[sid]) + } + return sids } func (b *BeatService) RemoveSessionId(sid string) { @@ -144,3 +154,57 @@ func (b *BeatService) GetTerminalTaskChan() <-chan *model.TerminalTask { func (b *BeatService) FinishTask(taskId string) error { return b.apiClient.FinishTask(taskId) } + +func (b *BeatService) KeepCheckTokens() { + for { + time.Sleep(5 * time.Minute) + sessions := b.GetSessions() + tokens := make(map[string]model.TokenCheckStatus, len(sessions)) + for _, s := range sessions { + ret, ok := tokens[s.TokenId] + if ok { + b.handleTokenCheck(s, &ret) + continue + } + ret, err := b.apiClient.CheckTokenStatus(s.TokenId) + if err != nil && ret.Code == "" { + logger.Errorf("Check token status failed: %s", err) + continue + } + tokens[s.TokenId] = ret + b.handleTokenCheck(s, &ret) + } + } +} + +func (b *BeatService) sendTask(task *model.TerminalTask) { + select { + case b.taskChan <- task: + default: + logger.Errorf("Discard task %v", task) + } +} + +func (b *BeatService) handleTokenCheck(session *SessionToken, tokenStatus *model.TokenCheckStatus) { + var action string + switch tokenStatus.Code { + case model.CodePermOk: + action = model.TaskPermValid + if !session.invalid { + return + } + session.invalid = false + default: + if session.invalid { + return + } + session.invalid = true + action = model.TaskPermExpired + } + task := model.TerminalTask{ + Name: action, + Args: session.ID, + TokenStatus: *tokenStatus, + } + b.sendTask(&task) +} diff --git a/cmd/impl/convert_model.go b/cmd/impl/convert_model.go index 2771144..6bf4012 100644 --- a/cmd/impl/convert_model.go +++ b/cmd/impl/convert_model.go @@ -32,6 +32,7 @@ func ConvertToSession(sees *pb.Session) model.Session { AssetID: sees.AssetId, AccountID: sees.AccountId, Type: model.NORMALType, + TokenId: sees.TokenId, } } diff --git a/cmd/impl/jms.go b/cmd/impl/jms.go index dfbeeab..aed4184 100644 --- a/cmd/impl/jms.go +++ b/cmd/impl/jms.go @@ -99,8 +99,12 @@ func (j *JMServer) CreateSession(ctx context.Context, req *pb.SessionCreateReque return &pb.SessionCreateResponse{Status: &status}, nil } status.Ok = true - j.beat.StoreSessionId(apiResp.ID) - logger.Debugf("Creat session %s", apiResp.ID) + sessionToken := common.SessionToken{ + Session: apiResp, + TokenId: req.Data.TokenId, + } + j.beat.StoreSessionId(&sessionToken) + logger.Debugf("Creat session %s", apiSess.ID) return &pb.SessionCreateResponse{Status: &status, Data: ConvertToProtobufSession(apiResp)}, nil } @@ -199,6 +203,17 @@ func (j *JMServer) sendStreamTask(ctx context.Context, stream pb.Service_Dispatc case model.TaskUnlockSession: pbTask.Action = pb.TaskAction_UnlockSession pbTask.CreatedBy = task.Kwargs.CreatedByUser + case model.TaskPermExpired: + pbTask.Action = pb.TaskAction_TokenPermExpired + pbTask.TokenStatus = &pb.TokenStatus{ + Code: "", + Detail: "", + IsExpired: false, + } + + case model.TaskPermValid: + pbTask.Action = pb.TaskAction_TokenPermValid + default: logger.Errorf("Unknown task name %s", task.Name) continue diff --git a/cmd/root.go b/cmd/root.go index e38e02c..fb3d4d2 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -55,6 +55,7 @@ var rootCmd = &cobra.Command{ beat := common.NewBeatService(apiClient) { go beat.KeepHeartBeat() + go beat.KeepCheckTokens() } ctx := common.GetSignalCtx() grpcImplSrv := impl.NewJMServer(apiClient, uploader, beat) diff --git a/pkg/common/random.go b/pkg/common/random.go index 99333d5..636398c 100644 --- a/pkg/common/random.go +++ b/pkg/common/random.go @@ -7,8 +7,10 @@ import ( const letters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" +var localRand = rand.New(rand.NewSource(time.Now().UnixNano())) + func RandomStr(length int) string { - rand.Seed(time.Now().UnixNano()) + localRand.Seed(time.Now().UnixNano()) b := make([]byte, length) for i := range b { b[i] = letters[rand.Intn(len(letters))] diff --git a/pkg/jms-sdk-go/model/session.go b/pkg/jms-sdk-go/model/session.go index 474e02e..1a8f1e8 100644 --- a/pkg/jms-sdk-go/model/session.go +++ b/pkg/jms-sdk-go/model/session.go @@ -50,6 +50,7 @@ type Session struct { AssetID string `json:"asset_id"` AccountID string `json:"account_id"` Type LabelFiled `json:"type"` + TokenId string `json:"token_id"` } type ReplayVersion string diff --git a/pkg/jms-sdk-go/model/terminal.go b/pkg/jms-sdk-go/model/terminal.go index d93dbe9..eef85ac 100644 --- a/pkg/jms-sdk-go/model/terminal.go +++ b/pkg/jms-sdk-go/model/terminal.go @@ -33,17 +33,23 @@ type Terminal struct { } type TerminalTask struct { - ID string `json:"id"` - Name string `json:"name"` - Args string `json:"args"` - Kwargs TaskKwargs `json:"kwargs"` - IsFinished bool + ID string `json:"id"` + Name string `json:"name"` + Args string `json:"args"` + Kwargs TaskKwargs `json:"kwargs"` + + TokenStatus TokenCheckStatus `json:"-"` } const ( TaskKillSession = "kill_session" TaskLockSession = "lock_session" TaskUnlockSession = "unlock_session" + + // TaskPermExpired TaskPermValid 非 api 数据,仅用于内部处理 + + TaskPermExpired = "perm_expired" + TaskPermValid = "perm_valid" ) type TaskKwargs struct { diff --git a/pkg/jms-sdk-go/model/token.go b/pkg/jms-sdk-go/model/token.go index e1f4469..9d1ac0e 100644 --- a/pkg/jms-sdk-go/model/token.go +++ b/pkg/jms-sdk-go/model/token.go @@ -37,3 +37,17 @@ type ConnectTokenInfo struct { AccountName string `json:"account_name"` Protocol string `json:"protocol"` } + +// token 授权和过期状态 + +type TokenCheckStatus struct { + Detail string `json:"detail"` + Code string `json:"code"` + Expired bool `json:"expired"` +} + +const ( + CodePermOk = "perm_ok" + CodePermAccountInvalid = "perm_account_invalid" + CodePermExpired = "perm_expired" +) diff --git a/pkg/jms-sdk-go/service/jms_token.go b/pkg/jms-sdk-go/service/jms_token.go index e36569b..cf1ba44 100644 --- a/pkg/jms-sdk-go/service/jms_token.go +++ b/pkg/jms-sdk-go/service/jms_token.go @@ -32,3 +32,9 @@ type TokenRenewalResponse struct { Ok bool `json:"ok"` Msg string `json:"msg"` } + +func (s *JMService) CheckTokenStatus(tokenId string) (res model.TokenCheckStatus, err error) { + reqURL := fmt.Sprintf(SuperConnectTokenCheckURL, tokenId) + _, err = s.authClient.Get(reqURL, &res) + return +} diff --git a/pkg/jms-sdk-go/service/url.go b/pkg/jms-sdk-go/service/url.go index ee93d98..166a83d 100644 --- a/pkg/jms-sdk-go/service/url.go +++ b/pkg/jms-sdk-go/service/url.go @@ -76,6 +76,7 @@ const ( SuperConnectTokenSecretURL = "/api/v1/authentication/super-connection-token/secret/" SuperConnectTokenInfoURL = "/api/v1/authentication/super-connection-token/" SuperTokenRenewalURL = "/api/v1/authentication/super-connection-token/renewal/" + SuperConnectTokenCheckURL = "/api/v1/authentication/super-connection-token/%s/check/" UserPermsAssetsURL = "/api/v1/perms/users/%s/assets/" diff --git a/protobuf-go/protobuf/common.pb.go b/protobuf-go/protobuf/common.pb.go index d6714bb..4941676 100644 --- a/protobuf-go/protobuf/common.pb.go +++ b/protobuf-go/protobuf/common.pb.go @@ -23,9 +23,11 @@ const ( type TaskAction int32 const ( - TaskAction_KillSession TaskAction = 0 - TaskAction_LockSession TaskAction = 1 - TaskAction_UnlockSession TaskAction = 2 + TaskAction_KillSession TaskAction = 0 + TaskAction_LockSession TaskAction = 1 + TaskAction_UnlockSession TaskAction = 2 + TaskAction_TokenPermExpired TaskAction = 3 + TaskAction_TokenPermValid TaskAction = 4 ) // Enum value maps for TaskAction. @@ -34,11 +36,15 @@ var ( 0: "KillSession", 1: "LockSession", 2: "UnlockSession", + 3: "TokenPermExpired", + 4: "TokenPermValid", } TaskAction_value = map[string]int32{ - "KillSession": 0, - "LockSession": 1, - "UnlockSession": 2, + "KillSession": 0, + "LockSession": 1, + "UnlockSession": 2, + "TokenPermExpired": 3, + "TokenPermValid": 4, } ) @@ -313,7 +319,7 @@ func (x LifecycleLogDataEventType) Number() protoreflect.EnumNumber { // Deprecated: Use LifecycleLogDataEventType.Descriptor instead. func (LifecycleLogDataEventType) EnumDescriptor() ([]byte, []int) { - return file_common_proto_rawDescGZIP(), []int{19, 0} + return file_common_proto_rawDescGZIP(), []int{20, 0} } type User struct { @@ -1115,6 +1121,7 @@ type Session struct { UserId string `protobuf:"bytes,10,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` AssetId string `protobuf:"bytes,11,opt,name=asset_id,json=assetId,proto3" json:"asset_id,omitempty"` AccountId string `protobuf:"bytes,12,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` + TokenId string `protobuf:"bytes,13,opt,name=token_id,json=tokenId,proto3" json:"token_id,omitempty"` } func (x *Session) Reset() { @@ -1233,22 +1240,93 @@ func (x *Session) GetAccountId() string { return "" } +func (x *Session) GetTokenId() string { + if x != nil { + return x.TokenId + } + return "" +} + +type TokenStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"` + Detail string `protobuf:"bytes,2,opt,name=detail,proto3" json:"detail,omitempty"` + IsExpired bool `protobuf:"varint,3,opt,name=is_expired,json=isExpired,proto3" json:"is_expired,omitempty"` +} + +func (x *TokenStatus) Reset() { + *x = TokenStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_common_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TokenStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TokenStatus) ProtoMessage() {} + +func (x *TokenStatus) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[11] + 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 TokenStatus.ProtoReflect.Descriptor instead. +func (*TokenStatus) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{11} +} + +func (x *TokenStatus) GetCode() string { + if x != nil { + return x.Code + } + return "" +} + +func (x *TokenStatus) GetDetail() string { + if x != nil { + return x.Detail + } + return "" +} + +func (x *TokenStatus) GetIsExpired() bool { + if x != nil { + return x.IsExpired + } + return false +} + type TerminalTask struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Action TaskAction `protobuf:"varint,2,opt,name=action,proto3,enum=message.TaskAction" json:"action,omitempty"` - SessionId string `protobuf:"bytes,3,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` - TerminatedBy string `protobuf:"bytes,4,opt,name=terminated_by,json=terminatedBy,proto3" json:"terminated_by,omitempty"` - CreatedBy string `protobuf:"bytes,5,opt,name=created_by,json=createdBy,proto3" json:"created_by,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Action TaskAction `protobuf:"varint,2,opt,name=action,proto3,enum=message.TaskAction" json:"action,omitempty"` + SessionId string `protobuf:"bytes,3,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` + TerminatedBy string `protobuf:"bytes,4,opt,name=terminated_by,json=terminatedBy,proto3" json:"terminated_by,omitempty"` + CreatedBy string `protobuf:"bytes,5,opt,name=created_by,json=createdBy,proto3" json:"created_by,omitempty"` + TokenStatus *TokenStatus `protobuf:"bytes,6,opt,name=token_status,json=tokenStatus,proto3" json:"token_status,omitempty"` } func (x *TerminalTask) Reset() { *x = TerminalTask{} if protoimpl.UnsafeEnabled { - mi := &file_common_proto_msgTypes[11] + mi := &file_common_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1261,7 +1339,7 @@ func (x *TerminalTask) String() string { func (*TerminalTask) ProtoMessage() {} func (x *TerminalTask) ProtoReflect() protoreflect.Message { - mi := &file_common_proto_msgTypes[11] + mi := &file_common_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1274,7 +1352,7 @@ func (x *TerminalTask) ProtoReflect() protoreflect.Message { // Deprecated: Use TerminalTask.ProtoReflect.Descriptor instead. func (*TerminalTask) Descriptor() ([]byte, []int) { - return file_common_proto_rawDescGZIP(), []int{11} + return file_common_proto_rawDescGZIP(), []int{12} } func (x *TerminalTask) GetId() string { @@ -1312,6 +1390,13 @@ func (x *TerminalTask) GetCreatedBy() string { return "" } +func (x *TerminalTask) GetTokenStatus() *TokenStatus { + if x != nil { + return x.TokenStatus + } + return nil +} + type TokenAuthInfo struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1333,7 +1418,7 @@ type TokenAuthInfo struct { func (x *TokenAuthInfo) Reset() { *x = TokenAuthInfo{} if protoimpl.UnsafeEnabled { - mi := &file_common_proto_msgTypes[12] + mi := &file_common_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1346,7 +1431,7 @@ func (x *TokenAuthInfo) String() string { func (*TokenAuthInfo) ProtoMessage() {} func (x *TokenAuthInfo) ProtoReflect() protoreflect.Message { - mi := &file_common_proto_msgTypes[12] + mi := &file_common_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1359,7 +1444,7 @@ func (x *TokenAuthInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use TokenAuthInfo.ProtoReflect.Descriptor instead. func (*TokenAuthInfo) Descriptor() ([]byte, []int) { - return file_common_proto_rawDescGZIP(), []int{12} + return file_common_proto_rawDescGZIP(), []int{13} } func (x *TokenAuthInfo) GetKeyId() string { @@ -1455,7 +1540,7 @@ type Platform struct { func (x *Platform) Reset() { *x = Platform{} if protoimpl.UnsafeEnabled { - mi := &file_common_proto_msgTypes[13] + mi := &file_common_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1468,7 +1553,7 @@ func (x *Platform) String() string { func (*Platform) ProtoMessage() {} func (x *Platform) ProtoReflect() protoreflect.Message { - mi := &file_common_proto_msgTypes[13] + mi := &file_common_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1481,7 +1566,7 @@ func (x *Platform) ProtoReflect() protoreflect.Message { // Deprecated: Use Platform.ProtoReflect.Descriptor instead. func (*Platform) Descriptor() ([]byte, []int) { - return file_common_proto_rawDescGZIP(), []int{13} + return file_common_proto_rawDescGZIP(), []int{14} } func (x *Platform) GetId() int32 { @@ -1540,7 +1625,7 @@ type PlatformProtocol struct { func (x *PlatformProtocol) Reset() { *x = PlatformProtocol{} if protoimpl.UnsafeEnabled { - mi := &file_common_proto_msgTypes[14] + mi := &file_common_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1553,7 +1638,7 @@ func (x *PlatformProtocol) String() string { func (*PlatformProtocol) ProtoMessage() {} func (x *PlatformProtocol) ProtoReflect() protoreflect.Message { - mi := &file_common_proto_msgTypes[14] + mi := &file_common_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1566,7 +1651,7 @@ func (x *PlatformProtocol) ProtoReflect() protoreflect.Message { // Deprecated: Use PlatformProtocol.ProtoReflect.Descriptor instead. func (*PlatformProtocol) Descriptor() ([]byte, []int) { - return file_common_proto_rawDescGZIP(), []int{14} + return file_common_proto_rawDescGZIP(), []int{15} } func (x *PlatformProtocol) GetId() int32 { @@ -1609,7 +1694,7 @@ type ComponentSetting struct { func (x *ComponentSetting) Reset() { *x = ComponentSetting{} if protoimpl.UnsafeEnabled { - mi := &file_common_proto_msgTypes[15] + mi := &file_common_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1622,7 +1707,7 @@ func (x *ComponentSetting) String() string { func (*ComponentSetting) ProtoMessage() {} func (x *ComponentSetting) ProtoReflect() protoreflect.Message { - mi := &file_common_proto_msgTypes[15] + mi := &file_common_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1635,7 +1720,7 @@ func (x *ComponentSetting) ProtoReflect() protoreflect.Message { // Deprecated: Use ComponentSetting.ProtoReflect.Descriptor instead. func (*ComponentSetting) Descriptor() ([]byte, []int) { - return file_common_proto_rawDescGZIP(), []int{15} + return file_common_proto_rawDescGZIP(), []int{16} } func (x *ComponentSetting) GetMaxIdleTime() int32 { @@ -1665,7 +1750,7 @@ type Forward struct { func (x *Forward) Reset() { *x = Forward{} if protoimpl.UnsafeEnabled { - mi := &file_common_proto_msgTypes[16] + mi := &file_common_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1678,7 +1763,7 @@ func (x *Forward) String() string { func (*Forward) ProtoMessage() {} func (x *Forward) ProtoReflect() protoreflect.Message { - mi := &file_common_proto_msgTypes[16] + mi := &file_common_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1691,7 +1776,7 @@ func (x *Forward) ProtoReflect() protoreflect.Message { // Deprecated: Use Forward.ProtoReflect.Descriptor instead. func (*Forward) Descriptor() ([]byte, []int) { - return file_common_proto_rawDescGZIP(), []int{16} + return file_common_proto_rawDescGZIP(), []int{17} } func (x *Forward) GetId() string { @@ -1731,7 +1816,7 @@ type PublicSetting struct { func (x *PublicSetting) Reset() { *x = PublicSetting{} if protoimpl.UnsafeEnabled { - mi := &file_common_proto_msgTypes[17] + mi := &file_common_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1744,7 +1829,7 @@ func (x *PublicSetting) String() string { func (*PublicSetting) ProtoMessage() {} func (x *PublicSetting) ProtoReflect() protoreflect.Message { - mi := &file_common_proto_msgTypes[17] + mi := &file_common_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1757,7 +1842,7 @@ func (x *PublicSetting) ProtoReflect() protoreflect.Message { // Deprecated: Use PublicSetting.ProtoReflect.Descriptor instead. func (*PublicSetting) Descriptor() ([]byte, []int) { - return file_common_proto_rawDescGZIP(), []int{17} + return file_common_proto_rawDescGZIP(), []int{18} } func (x *PublicSetting) GetXpackEnabled() bool { @@ -1814,7 +1899,7 @@ type Cookie struct { func (x *Cookie) Reset() { *x = Cookie{} if protoimpl.UnsafeEnabled { - mi := &file_common_proto_msgTypes[18] + mi := &file_common_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1827,7 +1912,7 @@ func (x *Cookie) String() string { func (*Cookie) ProtoMessage() {} func (x *Cookie) ProtoReflect() protoreflect.Message { - mi := &file_common_proto_msgTypes[18] + mi := &file_common_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1840,7 +1925,7 @@ func (x *Cookie) ProtoReflect() protoreflect.Message { // Deprecated: Use Cookie.ProtoReflect.Descriptor instead. func (*Cookie) Descriptor() ([]byte, []int) { - return file_common_proto_rawDescGZIP(), []int{18} + return file_common_proto_rawDescGZIP(), []int{19} } func (x *Cookie) GetName() string { @@ -1870,7 +1955,7 @@ type LifecycleLogData struct { func (x *LifecycleLogData) Reset() { *x = LifecycleLogData{} if protoimpl.UnsafeEnabled { - mi := &file_common_proto_msgTypes[19] + mi := &file_common_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1883,7 +1968,7 @@ func (x *LifecycleLogData) String() string { func (*LifecycleLogData) ProtoMessage() {} func (x *LifecycleLogData) ProtoReflect() protoreflect.Message { - mi := &file_common_proto_msgTypes[19] + mi := &file_common_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1896,7 +1981,7 @@ func (x *LifecycleLogData) ProtoReflect() protoreflect.Message { // Deprecated: Use LifecycleLogData.ProtoReflect.Descriptor instead. func (*LifecycleLogData) Descriptor() ([]byte, []int) { - return file_common_proto_rawDescGZIP(), []int{19} + return file_common_proto_rawDescGZIP(), []int{20} } func (x *LifecycleLogData) GetEvent() LifecycleLogDataEventType { @@ -1943,7 +2028,7 @@ type Asset_Specific struct { func (x *Asset_Specific) Reset() { *x = Asset_Specific{} if protoimpl.UnsafeEnabled { - mi := &file_common_proto_msgTypes[20] + mi := &file_common_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1956,7 +2041,7 @@ func (x *Asset_Specific) String() string { func (*Asset_Specific) ProtoMessage() {} func (x *Asset_Specific) ProtoReflect() protoreflect.Message { - mi := &file_common_proto_msgTypes[20] + mi := &file_common_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2193,7 +2278,7 @@ var file_common_proto_rawDesc = []byte{ 0x6e, 0x6f, 0x72, 0x65, 0x43, 0x61, 0x73, 0x65, 0x22, 0x29, 0x0a, 0x0a, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x5f, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x65, 0x78, 0x70, 0x69, 0x72, - 0x65, 0x41, 0x74, 0x22, 0x8b, 0x03, 0x0a, 0x07, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, + 0x65, 0x41, 0x74, 0x22, 0xa6, 0x03, 0x0a, 0x07, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, @@ -2215,144 +2300,158 @@ var file_common_proto_rawDesc = []byte{ 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x73, 0x73, 0x65, 0x74, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x49, 0x64, 0x22, 0x2b, 0x0a, 0x09, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x46, 0x72, 0x6f, - 0x6d, 0x12, 0x06, 0x0a, 0x02, 0x57, 0x54, 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x53, 0x54, 0x10, - 0x01, 0x12, 0x06, 0x0a, 0x02, 0x52, 0x54, 0x10, 0x02, 0x12, 0x06, 0x0a, 0x02, 0x44, 0x54, 0x10, - 0x03, 0x22, 0xae, 0x01, 0x0a, 0x0c, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x6c, 0x54, 0x61, - 0x73, 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, - 0x69, 0x64, 0x12, 0x2b, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x54, 0x61, 0x73, - 0x6b, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x23, - 0x0a, 0x0d, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, - 0x64, 0x42, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62, - 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, - 0x42, 0x79, 0x22, 0xef, 0x03, 0x0a, 0x0d, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x41, 0x75, 0x74, 0x68, - 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x15, 0x0a, 0x06, 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6b, 0x65, 0x79, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x73, - 0x65, 0x63, 0x72, 0x65, 0x74, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x65, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x05, 0x61, 0x73, - 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, - 0x12, 0x21, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, - 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, - 0x73, 0x65, 0x72, 0x12, 0x2a, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x41, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, - 0x33, 0x0a, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x50, 0x65, - 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x34, 0x0a, 0x0b, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x5f, 0x69, - 0x6e, 0x66, 0x6f, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x2e, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, - 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x36, 0x0a, 0x0c, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x13, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, - 0x6e, 0x64, 0x41, 0x43, 0x4c, 0x52, 0x0b, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x75, 0x6c, - 0x65, 0x73, 0x12, 0x2c, 0x0a, 0x08, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x73, 0x18, 0x09, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x47, - 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x52, 0x08, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x73, - 0x12, 0x33, 0x0a, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x0a, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x19, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x70, - 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x73, 0x65, - 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x2d, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, - 0x6d, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, - 0x66, 0x6f, 0x72, 0x6d, 0x22, 0xb1, 0x01, 0x0a, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, - 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 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, 0x1a, 0x0a, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, - 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, - 0x79, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x72, 0x73, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x72, 0x73, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x74, - 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, - 0x37, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x18, 0x06, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x50, 0x6c, 0x61, - 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x52, 0x09, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x22, 0xcc, 0x01, 0x0a, 0x10, 0x50, 0x6c, 0x61, - 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 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, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x43, 0x0a, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, - 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x2e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x52, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x1a, 0x3b, 0x0a, 0x0d, 0x53, 0x65, - 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, - 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x60, 0x0a, 0x10, 0x43, 0x6f, 0x6d, 0x70, 0x6f, - 0x6e, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x22, 0x0a, 0x0d, 0x6d, - 0x61, 0x78, 0x5f, 0x69, 0x64, 0x6c, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x0b, 0x6d, 0x61, 0x78, 0x49, 0x64, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, - 0x28, 0x0a, 0x10, 0x6d, 0x61, 0x78, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x74, - 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x6d, 0x61, 0x78, 0x53, 0x65, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x41, 0x0a, 0x07, 0x46, 0x6f, 0x72, - 0x77, 0x61, 0x72, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x48, 0x6f, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x22, 0xd5, 0x01, 0x0a, - 0x0d, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x23, - 0x0a, 0x0d, 0x78, 0x70, 0x61, 0x63, 0x6b, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x78, 0x70, 0x61, 0x63, 0x6b, 0x45, 0x6e, 0x61, 0x62, - 0x6c, 0x65, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x6c, 0x69, 0x63, - 0x65, 0x6e, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x12, 0x20, 0x0a, 0x0c, 0x67, 0x70, 0x74, 0x5f, - 0x62, 0x61, 0x73, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, - 0x67, 0x70, 0x74, 0x42, 0x61, 0x73, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x1e, 0x0a, 0x0b, 0x67, 0x70, - 0x74, 0x5f, 0x61, 0x70, 0x69, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x67, 0x70, 0x74, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x70, - 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x67, - 0x70, 0x74, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x70, 0x74, 0x5f, 0x6d, - 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x67, 0x70, 0x74, 0x4d, - 0x6f, 0x64, 0x65, 0x6c, 0x22, 0x32, 0x0a, 0x06, 0x43, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x12, 0x12, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xbd, 0x03, 0x0a, 0x10, 0x4c, 0x69, 0x66, - 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x4c, 0x6f, 0x67, 0x44, 0x61, 0x74, 0x61, 0x12, 0x3a, 0x0a, - 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x6d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x4c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, - 0x4c, 0x6f, 0x67, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, - 0x70, 0x65, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61, - 0x73, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, - 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0xc0, 0x02, 0x0a, 0x0a, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, - 0x74, 0x79, 0x70, 0x65, 0x12, 0x17, 0x0a, 0x13, 0x41, 0x73, 0x73, 0x65, 0x74, 0x43, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x10, 0x00, 0x12, 0x18, 0x0a, - 0x14, 0x41, 0x73, 0x73, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x46, 0x69, 0x6e, - 0x69, 0x73, 0x68, 0x65, 0x64, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x53, 0x68, 0x61, 0x72, 0x65, 0x4c, 0x69, 0x6e, 0x6b, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, - 0x55, 0x73, 0x65, 0x72, 0x4a, 0x6f, 0x69, 0x6e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x10, - 0x03, 0x12, 0x14, 0x0a, 0x10, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x53, 0x65, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x10, 0x04, 0x12, 0x14, 0x0a, 0x10, 0x41, 0x64, 0x6d, 0x69, 0x6e, - 0x4a, 0x6f, 0x69, 0x6e, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x10, 0x05, 0x12, 0x14, 0x0a, - 0x10, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x45, 0x78, 0x69, 0x74, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, - 0x72, 0x10, 0x06, 0x12, 0x16, 0x0a, 0x12, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x43, 0x6f, 0x6e, - 0x76, 0x65, 0x72, 0x74, 0x53, 0x74, 0x61, 0x72, 0x74, 0x10, 0x07, 0x12, 0x18, 0x0a, 0x14, 0x52, - 0x65, 0x70, 0x6c, 0x61, 0x79, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x53, 0x75, 0x63, 0x63, - 0x65, 0x73, 0x73, 0x10, 0x08, 0x12, 0x18, 0x0a, 0x14, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x43, - 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x10, 0x09, 0x12, - 0x15, 0x0a, 0x11, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x53, - 0x74, 0x61, 0x72, 0x74, 0x10, 0x0a, 0x12, 0x17, 0x0a, 0x13, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x79, - 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x10, 0x0b, 0x12, - 0x17, 0x0a, 0x13, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x46, - 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x10, 0x0c, 0x2a, 0x41, 0x0a, 0x0a, 0x54, 0x61, 0x73, 0x6b, - 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0f, 0x0a, 0x0b, 0x4b, 0x69, 0x6c, 0x6c, 0x53, 0x65, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x4c, 0x6f, 0x63, 0x6b, 0x53, - 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x55, 0x6e, 0x6c, 0x6f, - 0x63, 0x6b, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x10, 0x02, 0x2a, 0x66, 0x0a, 0x09, 0x52, - 0x69, 0x73, 0x6b, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x0a, 0x0a, 0x06, 0x4e, 0x6f, 0x72, 0x6d, - 0x61, 0x6c, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x57, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x10, - 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x52, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x10, 0x02, 0x12, 0x10, 0x0a, - 0x0c, 0x52, 0x65, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x10, 0x03, 0x12, - 0x10, 0x0a, 0x0c, 0x52, 0x65, 0x76, 0x69, 0x65, 0x77, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x10, - 0x04, 0x12, 0x10, 0x0a, 0x0c, 0x52, 0x65, 0x76, 0x69, 0x65, 0x77, 0x43, 0x61, 0x6e, 0x63, 0x65, - 0x6c, 0x10, 0x05, 0x42, 0x20, 0x0a, 0x13, 0x6f, 0x72, 0x67, 0x2e, 0x6a, 0x75, 0x6d, 0x70, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x77, 0x69, 0x73, 0x70, 0x5a, 0x09, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6e, 0x74, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x69, 0x64, + 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x49, 0x64, 0x22, + 0x2b, 0x0a, 0x09, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x46, 0x72, 0x6f, 0x6d, 0x12, 0x06, 0x0a, 0x02, + 0x57, 0x54, 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x53, 0x54, 0x10, 0x01, 0x12, 0x06, 0x0a, 0x02, + 0x52, 0x54, 0x10, 0x02, 0x12, 0x06, 0x0a, 0x02, 0x44, 0x54, 0x10, 0x03, 0x22, 0x58, 0x0a, 0x0b, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x63, + 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, + 0x16, 0x0a, 0x06, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x65, 0x78, + 0x70, 0x69, 0x72, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x45, + 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x22, 0xe7, 0x01, 0x0a, 0x0c, 0x54, 0x65, 0x72, 0x6d, 0x69, + 0x6e, 0x61, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2b, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, + 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, + 0x64, 0x5f, 0x62, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x74, 0x65, 0x72, 0x6d, + 0x69, 0x6e, 0x61, 0x74, 0x65, 0x64, 0x42, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x64, 0x42, 0x79, 0x12, 0x37, 0x0a, 0x0c, 0x74, 0x6f, 0x6b, 0x65, 0x6e, + 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x52, 0x0b, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x22, 0xef, 0x03, 0x0a, 0x0d, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x41, 0x75, 0x74, 0x68, 0x49, 0x6e, + 0x66, 0x6f, 0x12, 0x15, 0x0a, 0x06, 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x6b, 0x65, 0x79, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x63, + 0x72, 0x65, 0x74, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, + 0x65, 0x63, 0x72, 0x65, 0x74, 0x65, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x05, 0x61, 0x73, 0x73, 0x65, + 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x12, 0x21, + 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, + 0x72, 0x12, 0x2a, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x33, 0x0a, + 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x13, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x50, 0x65, 0x72, 0x6d, + 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x12, 0x34, 0x0a, 0x0b, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x5f, 0x69, 0x6e, 0x66, + 0x6f, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x2e, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x65, 0x78, + 0x70, 0x69, 0x72, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x36, 0x0a, 0x0c, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, + 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, + 0x41, 0x43, 0x4c, 0x52, 0x0b, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x75, 0x6c, 0x65, 0x73, + 0x12, 0x2c, 0x0a, 0x08, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x73, 0x18, 0x09, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x47, 0x61, 0x74, + 0x65, 0x77, 0x61, 0x79, 0x52, 0x08, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x73, 0x12, 0x33, + 0x0a, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, + 0x65, 0x6e, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x73, 0x65, 0x74, 0x74, + 0x69, 0x6e, 0x67, 0x12, 0x2d, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, + 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, + 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, + 0x72, 0x6d, 0x22, 0xb1, 0x01, 0x0a, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, + 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 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, 0x1a, 0x0a, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, + 0x18, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x72, 0x73, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x63, 0x68, 0x61, 0x72, 0x73, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x37, 0x0a, + 0x09, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, + 0x6f, 0x72, 0x6d, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x52, 0x09, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x22, 0xcc, 0x01, 0x0a, 0x10, 0x50, 0x6c, 0x61, 0x74, 0x66, + 0x6f, 0x72, 0x6d, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 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, + 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, + 0x6f, 0x72, 0x74, 0x12, 0x43, 0x0a, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, + 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, + 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x2e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, + 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x1a, 0x3b, 0x0a, 0x0d, 0x53, 0x65, 0x74, 0x74, + 0x69, 0x6e, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x60, 0x0a, 0x10, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, + 0x6e, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x22, 0x0a, 0x0d, 0x6d, 0x61, 0x78, + 0x5f, 0x69, 0x64, 0x6c, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x0b, 0x6d, 0x61, 0x78, 0x49, 0x64, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x28, 0x0a, + 0x10, 0x6d, 0x61, 0x78, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x6d, 0x61, 0x78, 0x53, 0x65, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x41, 0x0a, 0x07, 0x46, 0x6f, 0x72, 0x77, 0x61, + 0x72, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, + 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x48, 0x6f, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x22, 0xd5, 0x01, 0x0a, 0x0d, 0x50, + 0x75, 0x62, 0x6c, 0x69, 0x63, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x23, 0x0a, 0x0d, + 0x78, 0x70, 0x61, 0x63, 0x6b, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x0c, 0x78, 0x70, 0x61, 0x63, 0x6b, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, + 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x6c, 0x69, 0x63, 0x65, 0x6e, + 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x4c, + 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x12, 0x20, 0x0a, 0x0c, 0x67, 0x70, 0x74, 0x5f, 0x62, 0x61, + 0x73, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x67, 0x70, + 0x74, 0x42, 0x61, 0x73, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x1e, 0x0a, 0x0b, 0x67, 0x70, 0x74, 0x5f, + 0x61, 0x70, 0x69, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, + 0x70, 0x74, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x70, 0x74, 0x5f, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x67, 0x70, 0x74, + 0x50, 0x72, 0x6f, 0x78, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x70, 0x74, 0x5f, 0x6d, 0x6f, 0x64, + 0x65, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x67, 0x70, 0x74, 0x4d, 0x6f, 0x64, + 0x65, 0x6c, 0x22, 0x32, 0x0a, 0x06, 0x43, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xbd, 0x03, 0x0a, 0x10, 0x4c, 0x69, 0x66, 0x65, 0x63, + 0x79, 0x63, 0x6c, 0x65, 0x4c, 0x6f, 0x67, 0x44, 0x61, 0x74, 0x61, 0x12, 0x3a, 0x0a, 0x05, 0x65, + 0x76, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x2e, 0x4c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x4c, 0x6f, + 0x67, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, + 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, + 0x12, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, + 0x73, 0x65, 0x72, 0x22, 0xc0, 0x02, 0x0a, 0x0a, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, + 0x70, 0x65, 0x12, 0x17, 0x0a, 0x13, 0x41, 0x73, 0x73, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x41, + 0x73, 0x73, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x46, 0x69, 0x6e, 0x69, 0x73, + 0x68, 0x65, 0x64, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, + 0x68, 0x61, 0x72, 0x65, 0x4c, 0x69, 0x6e, 0x6b, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x55, 0x73, + 0x65, 0x72, 0x4a, 0x6f, 0x69, 0x6e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x10, 0x03, 0x12, + 0x14, 0x0a, 0x10, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x53, 0x65, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x10, 0x04, 0x12, 0x14, 0x0a, 0x10, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x4a, 0x6f, + 0x69, 0x6e, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x10, 0x05, 0x12, 0x14, 0x0a, 0x10, 0x41, + 0x64, 0x6d, 0x69, 0x6e, 0x45, 0x78, 0x69, 0x74, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x10, + 0x06, 0x12, 0x16, 0x0a, 0x12, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x43, 0x6f, 0x6e, 0x76, 0x65, + 0x72, 0x74, 0x53, 0x74, 0x61, 0x72, 0x74, 0x10, 0x07, 0x12, 0x18, 0x0a, 0x14, 0x52, 0x65, 0x70, + 0x6c, 0x61, 0x79, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x10, 0x08, 0x12, 0x18, 0x0a, 0x14, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x43, 0x6f, 0x6e, + 0x76, 0x65, 0x72, 0x74, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x10, 0x09, 0x12, 0x15, 0x0a, + 0x11, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x74, 0x61, + 0x72, 0x74, 0x10, 0x0a, 0x12, 0x17, 0x0a, 0x13, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x55, 0x70, + 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x10, 0x0b, 0x12, 0x17, 0x0a, + 0x13, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x46, 0x61, 0x69, + 0x6c, 0x75, 0x72, 0x65, 0x10, 0x0c, 0x2a, 0x6b, 0x0a, 0x0a, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0f, 0x0a, 0x0b, 0x4b, 0x69, 0x6c, 0x6c, 0x53, 0x65, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x4c, 0x6f, 0x63, 0x6b, 0x53, 0x65, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, + 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x50, 0x65, 0x72, 0x6d, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x10, 0x03, 0x12, + 0x12, 0x0a, 0x0e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x50, 0x65, 0x72, 0x6d, 0x56, 0x61, 0x6c, 0x69, + 0x64, 0x10, 0x04, 0x2a, 0x66, 0x0a, 0x09, 0x52, 0x69, 0x73, 0x6b, 0x4c, 0x65, 0x76, 0x65, 0x6c, + 0x12, 0x0a, 0x0a, 0x06, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, + 0x57, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x52, 0x65, 0x6a, + 0x65, 0x63, 0x74, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x52, 0x65, 0x76, 0x69, 0x65, 0x77, 0x52, + 0x65, 0x6a, 0x65, 0x63, 0x74, 0x10, 0x03, 0x12, 0x10, 0x0a, 0x0c, 0x52, 0x65, 0x76, 0x69, 0x65, + 0x77, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x10, 0x04, 0x12, 0x10, 0x0a, 0x0c, 0x52, 0x65, 0x76, + 0x69, 0x65, 0x77, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x10, 0x05, 0x42, 0x20, 0x0a, 0x13, 0x6f, + 0x72, 0x67, 0x2e, 0x6a, 0x75, 0x6d, 0x70, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x77, 0x69, + 0x73, 0x70, 0x5a, 0x09, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2368,7 +2467,7 @@ func file_common_proto_rawDescGZIP() []byte { } var file_common_proto_enumTypes = make([]protoimpl.EnumInfo, 5) -var file_common_proto_msgTypes = make([]protoimpl.MessageInfo, 22) +var file_common_proto_msgTypes = make([]protoimpl.MessageInfo, 23) var file_common_proto_goTypes = []interface{}{ (TaskAction)(0), // 0: message.TaskAction (RiskLevel)(0), // 1: message.RiskLevel @@ -2386,43 +2485,45 @@ var file_common_proto_goTypes = []interface{}{ (*CommandGroup)(nil), // 13: message.CommandGroup (*ExpireInfo)(nil), // 14: message.ExpireInfo (*Session)(nil), // 15: message.Session - (*TerminalTask)(nil), // 16: message.TerminalTask - (*TokenAuthInfo)(nil), // 17: message.TokenAuthInfo - (*Platform)(nil), // 18: message.Platform - (*PlatformProtocol)(nil), // 19: message.PlatformProtocol - (*ComponentSetting)(nil), // 20: message.ComponentSetting - (*Forward)(nil), // 21: message.Forward - (*PublicSetting)(nil), // 22: message.PublicSetting - (*Cookie)(nil), // 23: message.Cookie - (*LifecycleLogData)(nil), // 24: message.LifecycleLogData - (*Asset_Specific)(nil), // 25: message.Asset.Specific - nil, // 26: message.PlatformProtocol.SettingsEntry + (*TokenStatus)(nil), // 16: message.TokenStatus + (*TerminalTask)(nil), // 17: message.TerminalTask + (*TokenAuthInfo)(nil), // 18: message.TokenAuthInfo + (*Platform)(nil), // 19: message.Platform + (*PlatformProtocol)(nil), // 20: message.PlatformProtocol + (*ComponentSetting)(nil), // 21: message.ComponentSetting + (*Forward)(nil), // 22: message.Forward + (*PublicSetting)(nil), // 23: message.PublicSetting + (*Cookie)(nil), // 24: message.Cookie + (*LifecycleLogData)(nil), // 25: message.LifecycleLogData + (*Asset_Specific)(nil), // 26: message.Asset.Specific + nil, // 27: message.PlatformProtocol.SettingsEntry } var file_common_proto_depIdxs = []int32{ 7, // 0: message.Account.secretType:type_name -> message.LabelValue 9, // 1: message.Asset.protocols:type_name -> message.Protocol - 25, // 2: message.Asset.specific:type_name -> message.Asset.Specific + 26, // 2: message.Asset.specific:type_name -> message.Asset.Specific 2, // 3: message.CommandACL.action:type_name -> message.CommandACL.Action 13, // 4: message.CommandACL.command_groups:type_name -> message.CommandGroup 3, // 5: message.Session.login_from:type_name -> message.Session.LoginFrom 0, // 6: message.TerminalTask.action:type_name -> message.TaskAction - 8, // 7: message.TokenAuthInfo.asset:type_name -> message.Asset - 5, // 8: message.TokenAuthInfo.user:type_name -> message.User - 6, // 9: message.TokenAuthInfo.account:type_name -> message.Account - 11, // 10: message.TokenAuthInfo.permission:type_name -> message.Permission - 14, // 11: message.TokenAuthInfo.expire_info:type_name -> message.ExpireInfo - 12, // 12: message.TokenAuthInfo.filter_rules:type_name -> message.CommandACL - 10, // 13: message.TokenAuthInfo.gateways:type_name -> message.Gateway - 20, // 14: message.TokenAuthInfo.setting:type_name -> message.ComponentSetting - 18, // 15: message.TokenAuthInfo.platform:type_name -> message.Platform - 19, // 16: message.Platform.protocols:type_name -> message.PlatformProtocol - 26, // 17: message.PlatformProtocol.settings:type_name -> message.PlatformProtocol.SettingsEntry - 4, // 18: message.LifecycleLogData.event:type_name -> message.LifecycleLogData.event_type - 19, // [19:19] is the sub-list for method output_type - 19, // [19:19] is the sub-list for method input_type - 19, // [19:19] is the sub-list for extension type_name - 19, // [19:19] is the sub-list for extension extendee - 0, // [0:19] is the sub-list for field type_name + 16, // 7: message.TerminalTask.token_status:type_name -> message.TokenStatus + 8, // 8: message.TokenAuthInfo.asset:type_name -> message.Asset + 5, // 9: message.TokenAuthInfo.user:type_name -> message.User + 6, // 10: message.TokenAuthInfo.account:type_name -> message.Account + 11, // 11: message.TokenAuthInfo.permission:type_name -> message.Permission + 14, // 12: message.TokenAuthInfo.expire_info:type_name -> message.ExpireInfo + 12, // 13: message.TokenAuthInfo.filter_rules:type_name -> message.CommandACL + 10, // 14: message.TokenAuthInfo.gateways:type_name -> message.Gateway + 21, // 15: message.TokenAuthInfo.setting:type_name -> message.ComponentSetting + 19, // 16: message.TokenAuthInfo.platform:type_name -> message.Platform + 20, // 17: message.Platform.protocols:type_name -> message.PlatformProtocol + 27, // 18: message.PlatformProtocol.settings:type_name -> message.PlatformProtocol.SettingsEntry + 4, // 19: message.LifecycleLogData.event:type_name -> message.LifecycleLogData.event_type + 20, // [20:20] is the sub-list for method output_type + 20, // [20:20] is the sub-list for method input_type + 20, // [20:20] is the sub-list for extension type_name + 20, // [20:20] is the sub-list for extension extendee + 0, // [0:20] is the sub-list for field type_name } func init() { file_common_proto_init() } @@ -2564,7 +2665,7 @@ func file_common_proto_init() { } } file_common_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TerminalTask); i { + switch v := v.(*TokenStatus); i { case 0: return &v.state case 1: @@ -2576,7 +2677,7 @@ func file_common_proto_init() { } } file_common_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TokenAuthInfo); i { + switch v := v.(*TerminalTask); i { case 0: return &v.state case 1: @@ -2588,7 +2689,7 @@ func file_common_proto_init() { } } file_common_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Platform); i { + switch v := v.(*TokenAuthInfo); i { case 0: return &v.state case 1: @@ -2600,7 +2701,7 @@ func file_common_proto_init() { } } file_common_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PlatformProtocol); i { + switch v := v.(*Platform); i { case 0: return &v.state case 1: @@ -2612,7 +2713,7 @@ func file_common_proto_init() { } } file_common_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ComponentSetting); i { + switch v := v.(*PlatformProtocol); i { case 0: return &v.state case 1: @@ -2624,7 +2725,7 @@ func file_common_proto_init() { } } file_common_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Forward); i { + switch v := v.(*ComponentSetting); i { case 0: return &v.state case 1: @@ -2636,7 +2737,7 @@ func file_common_proto_init() { } } file_common_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PublicSetting); i { + switch v := v.(*Forward); i { case 0: return &v.state case 1: @@ -2648,7 +2749,7 @@ func file_common_proto_init() { } } file_common_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Cookie); i { + switch v := v.(*PublicSetting); i { case 0: return &v.state case 1: @@ -2660,7 +2761,7 @@ func file_common_proto_init() { } } file_common_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LifecycleLogData); i { + switch v := v.(*Cookie); i { case 0: return &v.state case 1: @@ -2672,6 +2773,18 @@ func file_common_proto_init() { } } file_common_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LifecycleLogData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_common_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Asset_Specific); i { case 0: return &v.state @@ -2690,7 +2803,7 @@ func file_common_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_common_proto_rawDesc, NumEnums: 5, - NumMessages: 22, + NumMessages: 23, NumExtensions: 0, NumServices: 0, }, diff --git a/protobuf-java/org/jumpserver/wisp/Common.java b/protobuf-java/org/jumpserver/wisp/Common.java index 4cc4d21..354c84b 100644 --- a/protobuf-java/org/jumpserver/wisp/Common.java +++ b/protobuf-java/org/jumpserver/wisp/Common.java @@ -41,6 +41,14 @@ public enum TaskAction * UnlockSession = 2; */ UnlockSession(2), + /** + * TokenPermExpired = 3; + */ + TokenPermExpired(3), + /** + * TokenPermValid = 4; + */ + TokenPermValid(4), UNRECOGNIZED(-1), ; @@ -65,6 +73,14 @@ public enum TaskAction * UnlockSession = 2; */ public static final int UnlockSession_VALUE = 2; + /** + * TokenPermExpired = 3; + */ + public static final int TokenPermExpired_VALUE = 3; + /** + * TokenPermValid = 4; + */ + public static final int TokenPermValid_VALUE = 4; public final int getNumber() { @@ -94,6 +110,8 @@ public static TaskAction forNumber(int value) { case 0: return KillSession; case 1: return LockSession; case 2: return UnlockSession; + case 3: return TokenPermExpired; + case 4: return TokenPermValid; default: return null; } } @@ -13088,6 +13106,18 @@ public interface SessionOrBuilder extends */ com.google.protobuf.ByteString getAccountIdBytes(); + + /** + * string token_id = 13; + * @return The tokenId. + */ + java.lang.String getTokenId(); + /** + * string token_id = 13; + * @return The bytes for tokenId. + */ + com.google.protobuf.ByteString + getTokenIdBytes(); } /** * Protobuf type {@code message.Session} @@ -13122,6 +13152,7 @@ private Session() { userId_ = ""; assetId_ = ""; accountId_ = ""; + tokenId_ = ""; } public static final com.google.protobuf.Descriptors.Descriptor @@ -13691,6 +13722,45 @@ public java.lang.String getAccountId() { } } + public static final int TOKEN_ID_FIELD_NUMBER = 13; + @SuppressWarnings("serial") + private volatile java.lang.Object tokenId_ = ""; + /** + * string token_id = 13; + * @return The tokenId. + */ + @java.lang.Override + public java.lang.String getTokenId() { + java.lang.Object ref = tokenId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tokenId_ = s; + return s; + } + } + /** + * string token_id = 13; + * @return The bytes for tokenId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTokenIdBytes() { + java.lang.Object ref = tokenId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + tokenId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -13741,6 +13811,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (!com.google.protobuf.GeneratedMessage.isStringEmpty(accountId_)) { com.google.protobuf.GeneratedMessage.writeString(output, 12, accountId_); } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tokenId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 13, tokenId_); + } getUnknownFields().writeTo(output); } @@ -13788,6 +13861,9 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessage.isStringEmpty(accountId_)) { size += com.google.protobuf.GeneratedMessage.computeStringSize(12, accountId_); } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tokenId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(13, tokenId_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -13826,6 +13902,8 @@ public boolean equals(final java.lang.Object obj) { .equals(other.getAssetId())) return false; if (!getAccountId() .equals(other.getAccountId())) return false; + if (!getTokenId() + .equals(other.getTokenId())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -13862,6 +13940,8 @@ public int hashCode() { hash = (53 * hash) + getAssetId().hashCode(); hash = (37 * hash) + ACCOUNT_ID_FIELD_NUMBER; hash = (53 * hash) + getAccountId().hashCode(); + hash = (37 * hash) + TOKEN_ID_FIELD_NUMBER; + hash = (53 * hash) + getTokenId().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -14005,6 +14085,7 @@ public Builder clear() { userId_ = ""; assetId_ = ""; accountId_ = ""; + tokenId_ = ""; return this; } @@ -14074,6 +14155,9 @@ private void buildPartial0(org.jumpserver.wisp.Common.Session result) { if (((from_bitField0_ & 0x00000800) != 0)) { result.accountId_ = accountId_; } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.tokenId_ = tokenId_; + } } @java.lang.Override @@ -14144,6 +14228,11 @@ public Builder mergeFrom(org.jumpserver.wisp.Common.Session other) { bitField0_ |= 0x00000800; onChanged(); } + if (!other.getTokenId().isEmpty()) { + tokenId_ = other.tokenId_; + bitField0_ |= 0x00001000; + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -14230,6 +14319,11 @@ public Builder mergeFrom( bitField0_ |= 0x00000800; break; } // case 98 + case 106: { + tokenId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00001000; + break; + } // case 106 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag @@ -15052,6 +15146,78 @@ public Builder setAccountIdBytes( return this; } + private java.lang.Object tokenId_ = ""; + /** + * string token_id = 13; + * @return The tokenId. + */ + public java.lang.String getTokenId() { + java.lang.Object ref = tokenId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tokenId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string token_id = 13; + * @return The bytes for tokenId. + */ + public com.google.protobuf.ByteString + getTokenIdBytes() { + java.lang.Object ref = tokenId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + tokenId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string token_id = 13; + * @param value The tokenId to set. + * @return This builder for chaining. + */ + public Builder setTokenId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + tokenId_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * string token_id = 13; + * @return This builder for chaining. + */ + public Builder clearTokenId() { + tokenId_ = getDefaultInstance().getTokenId(); + bitField0_ = (bitField0_ & ~0x00001000); + onChanged(); + return this; + } + /** + * string token_id = 13; + * @param value The bytes for tokenId to set. + * @return This builder for chaining. + */ + public Builder setTokenIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + tokenId_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + // @@protoc_insertion_point(builder_scope:message.Session) } @@ -15103,76 +15269,47 @@ public org.jumpserver.wisp.Common.Session getDefaultInstanceForType() { } - public interface TerminalTaskOrBuilder extends - // @@protoc_insertion_point(interface_extends:message.TerminalTask) + public interface TokenStatusOrBuilder extends + // @@protoc_insertion_point(interface_extends:message.TokenStatus) com.google.protobuf.MessageOrBuilder { /** - * string id = 1; - * @return The id. - */ - java.lang.String getId(); - /** - * string id = 1; - * @return The bytes for id. - */ - com.google.protobuf.ByteString - getIdBytes(); - - /** - * .message.TaskAction action = 2; - * @return The enum numeric value on the wire for action. - */ - int getActionValue(); - /** - * .message.TaskAction action = 2; - * @return The action. - */ - org.jumpserver.wisp.Common.TaskAction getAction(); - - /** - * string session_id = 3; - * @return The sessionId. + * string code = 1; + * @return The code. */ - java.lang.String getSessionId(); + java.lang.String getCode(); /** - * string session_id = 3; - * @return The bytes for sessionId. + * string code = 1; + * @return The bytes for code. */ com.google.protobuf.ByteString - getSessionIdBytes(); + getCodeBytes(); /** - * string terminated_by = 4; - * @return The terminatedBy. + * string detail = 2; + * @return The detail. */ - java.lang.String getTerminatedBy(); + java.lang.String getDetail(); /** - * string terminated_by = 4; - * @return The bytes for terminatedBy. + * string detail = 2; + * @return The bytes for detail. */ com.google.protobuf.ByteString - getTerminatedByBytes(); + getDetailBytes(); /** - * string created_by = 5; - * @return The createdBy. - */ - java.lang.String getCreatedBy(); - /** - * string created_by = 5; - * @return The bytes for createdBy. + * bool is_expired = 3; + * @return The isExpired. */ - com.google.protobuf.ByteString - getCreatedByBytes(); + boolean getIsExpired(); } /** - * Protobuf type {@code message.TerminalTask} + * Protobuf type {@code message.TokenStatus} */ - public static final class TerminalTask extends + public static final class TokenStatus extends com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:message.TerminalTask) - TerminalTaskOrBuilder { + // @@protoc_insertion_point(message_implements:message.TokenStatus) + TokenStatusOrBuilder { private static final long serialVersionUID = 0L; static { com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( @@ -15181,178 +15318,954 @@ public static final class TerminalTask extends /* minor= */ 26, /* patch= */ 1, /* suffix= */ "", - TerminalTask.class.getName()); + TokenStatus.class.getName()); } - // Use TerminalTask.newBuilder() to construct. - private TerminalTask(com.google.protobuf.GeneratedMessage.Builder builder) { + // Use TokenStatus.newBuilder() to construct. + private TokenStatus(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } - private TerminalTask() { - id_ = ""; - action_ = 0; - sessionId_ = ""; - terminatedBy_ = ""; - createdBy_ = ""; + private TokenStatus() { + code_ = ""; + detail_ = ""; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return org.jumpserver.wisp.Common.internal_static_message_TerminalTask_descriptor; + return org.jumpserver.wisp.Common.internal_static_message_TokenStatus_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return org.jumpserver.wisp.Common.internal_static_message_TerminalTask_fieldAccessorTable + return org.jumpserver.wisp.Common.internal_static_message_TokenStatus_fieldAccessorTable .ensureFieldAccessorsInitialized( - org.jumpserver.wisp.Common.TerminalTask.class, org.jumpserver.wisp.Common.TerminalTask.Builder.class); + org.jumpserver.wisp.Common.TokenStatus.class, org.jumpserver.wisp.Common.TokenStatus.Builder.class); } - public static final int ID_FIELD_NUMBER = 1; + public static final int CODE_FIELD_NUMBER = 1; @SuppressWarnings("serial") - private volatile java.lang.Object id_ = ""; + private volatile java.lang.Object code_ = ""; /** - * string id = 1; - * @return The id. + * string code = 1; + * @return The code. */ @java.lang.Override - public java.lang.String getId() { - java.lang.Object ref = id_; + public java.lang.String getCode() { + java.lang.Object ref = code_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - id_ = s; + code_ = s; return s; } } /** - * string id = 1; - * @return The bytes for id. + * string code = 1; + * @return The bytes for code. */ @java.lang.Override public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; + getCodeBytes() { + java.lang.Object ref = code_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); - id_ = b; + code_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - public static final int ACTION_FIELD_NUMBER = 2; - private int action_ = 0; - /** - * .message.TaskAction action = 2; - * @return The enum numeric value on the wire for action. - */ - @java.lang.Override public int getActionValue() { - return action_; - } - /** - * .message.TaskAction action = 2; - * @return The action. - */ - @java.lang.Override public org.jumpserver.wisp.Common.TaskAction getAction() { - org.jumpserver.wisp.Common.TaskAction result = org.jumpserver.wisp.Common.TaskAction.forNumber(action_); - return result == null ? org.jumpserver.wisp.Common.TaskAction.UNRECOGNIZED : result; - } - - public static final int SESSION_ID_FIELD_NUMBER = 3; + public static final int DETAIL_FIELD_NUMBER = 2; @SuppressWarnings("serial") - private volatile java.lang.Object sessionId_ = ""; + private volatile java.lang.Object detail_ = ""; /** - * string session_id = 3; - * @return The sessionId. + * string detail = 2; + * @return The detail. */ @java.lang.Override - public java.lang.String getSessionId() { - java.lang.Object ref = sessionId_; + public java.lang.String getDetail() { + java.lang.Object ref = detail_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - sessionId_ = s; + detail_ = s; return s; } } /** - * string session_id = 3; - * @return The bytes for sessionId. + * string detail = 2; + * @return The bytes for detail. */ @java.lang.Override public com.google.protobuf.ByteString - getSessionIdBytes() { - java.lang.Object ref = sessionId_; + getDetailBytes() { + java.lang.Object ref = detail_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); - sessionId_ = b; + detail_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - public static final int TERMINATED_BY_FIELD_NUMBER = 4; - @SuppressWarnings("serial") - private volatile java.lang.Object terminatedBy_ = ""; + public static final int IS_EXPIRED_FIELD_NUMBER = 3; + private boolean isExpired_ = false; /** - * string terminated_by = 4; - * @return The terminatedBy. + * bool is_expired = 3; + * @return The isExpired. */ @java.lang.Override - public java.lang.String getTerminatedBy() { - java.lang.Object ref = terminatedBy_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - terminatedBy_ = s; - return s; - } + public boolean getIsExpired() { + return isExpired_; } - /** - * string terminated_by = 4; - * @return The bytes for terminatedBy. - */ + + private byte memoizedIsInitialized = -1; @java.lang.Override - public com.google.protobuf.ByteString - getTerminatedByBytes() { - java.lang.Object ref = terminatedBy_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - terminatedBy_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(code_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, code_); } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(detail_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, detail_); + } + if (isExpired_ != false) { + output.writeBool(3, isExpired_); + } + getUnknownFields().writeTo(output); } - public static final int CREATED_BY_FIELD_NUMBER = 5; - @SuppressWarnings("serial") - private volatile java.lang.Object createdBy_ = ""; - /** - * string created_by = 5; - * @return The createdBy. - */ @java.lang.Override - public java.lang.String getCreatedBy() { - java.lang.Object ref = createdBy_; + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(code_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, code_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(detail_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, detail_); + } + if (isExpired_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, isExpired_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.jumpserver.wisp.Common.TokenStatus)) { + return super.equals(obj); + } + org.jumpserver.wisp.Common.TokenStatus other = (org.jumpserver.wisp.Common.TokenStatus) obj; + + if (!getCode() + .equals(other.getCode())) return false; + if (!getDetail() + .equals(other.getDetail())) return false; + if (getIsExpired() + != other.getIsExpired()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CODE_FIELD_NUMBER; + hash = (53 * hash) + getCode().hashCode(); + hash = (37 * hash) + DETAIL_FIELD_NUMBER; + hash = (53 * hash) + getDetail().hashCode(); + hash = (37 * hash) + IS_EXPIRED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIsExpired()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.jumpserver.wisp.Common.TokenStatus parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.jumpserver.wisp.Common.TokenStatus parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.jumpserver.wisp.Common.TokenStatus parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.jumpserver.wisp.Common.TokenStatus parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.jumpserver.wisp.Common.TokenStatus parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.jumpserver.wisp.Common.TokenStatus parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.jumpserver.wisp.Common.TokenStatus parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static org.jumpserver.wisp.Common.TokenStatus parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static org.jumpserver.wisp.Common.TokenStatus parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static org.jumpserver.wisp.Common.TokenStatus parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.jumpserver.wisp.Common.TokenStatus parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static org.jumpserver.wisp.Common.TokenStatus parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.jumpserver.wisp.Common.TokenStatus prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code message.TokenStatus} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:message.TokenStatus) + org.jumpserver.wisp.Common.TokenStatusOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.jumpserver.wisp.Common.internal_static_message_TokenStatus_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.jumpserver.wisp.Common.internal_static_message_TokenStatus_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.jumpserver.wisp.Common.TokenStatus.class, org.jumpserver.wisp.Common.TokenStatus.Builder.class); + } + + // Construct using org.jumpserver.wisp.Common.TokenStatus.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + code_ = ""; + detail_ = ""; + isExpired_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.jumpserver.wisp.Common.internal_static_message_TokenStatus_descriptor; + } + + @java.lang.Override + public org.jumpserver.wisp.Common.TokenStatus getDefaultInstanceForType() { + return org.jumpserver.wisp.Common.TokenStatus.getDefaultInstance(); + } + + @java.lang.Override + public org.jumpserver.wisp.Common.TokenStatus build() { + org.jumpserver.wisp.Common.TokenStatus result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.jumpserver.wisp.Common.TokenStatus buildPartial() { + org.jumpserver.wisp.Common.TokenStatus result = new org.jumpserver.wisp.Common.TokenStatus(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(org.jumpserver.wisp.Common.TokenStatus result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.code_ = code_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.detail_ = detail_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.isExpired_ = isExpired_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.jumpserver.wisp.Common.TokenStatus) { + return mergeFrom((org.jumpserver.wisp.Common.TokenStatus)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.jumpserver.wisp.Common.TokenStatus other) { + if (other == org.jumpserver.wisp.Common.TokenStatus.getDefaultInstance()) return this; + if (!other.getCode().isEmpty()) { + code_ = other.code_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDetail().isEmpty()) { + detail_ = other.detail_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getIsExpired() != false) { + setIsExpired(other.getIsExpired()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + code_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + detail_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + isExpired_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object code_ = ""; + /** + * string code = 1; + * @return The code. + */ + public java.lang.String getCode() { + java.lang.Object ref = code_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + code_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string code = 1; + * @return The bytes for code. + */ + public com.google.protobuf.ByteString + getCodeBytes() { + java.lang.Object ref = code_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + code_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string code = 1; + * @param value The code to set. + * @return This builder for chaining. + */ + public Builder setCode( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + code_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string code = 1; + * @return This builder for chaining. + */ + public Builder clearCode() { + code_ = getDefaultInstance().getCode(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string code = 1; + * @param value The bytes for code to set. + * @return This builder for chaining. + */ + public Builder setCodeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + code_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object detail_ = ""; + /** + * string detail = 2; + * @return The detail. + */ + public java.lang.String getDetail() { + java.lang.Object ref = detail_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + detail_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string detail = 2; + * @return The bytes for detail. + */ + public com.google.protobuf.ByteString + getDetailBytes() { + java.lang.Object ref = detail_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + detail_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string detail = 2; + * @param value The detail to set. + * @return This builder for chaining. + */ + public Builder setDetail( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + detail_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string detail = 2; + * @return This builder for chaining. + */ + public Builder clearDetail() { + detail_ = getDefaultInstance().getDetail(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string detail = 2; + * @param value The bytes for detail to set. + * @return This builder for chaining. + */ + public Builder setDetailBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + detail_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private boolean isExpired_ ; + /** + * bool is_expired = 3; + * @return The isExpired. + */ + @java.lang.Override + public boolean getIsExpired() { + return isExpired_; + } + /** + * bool is_expired = 3; + * @param value The isExpired to set. + * @return This builder for chaining. + */ + public Builder setIsExpired(boolean value) { + + isExpired_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * bool is_expired = 3; + * @return This builder for chaining. + */ + public Builder clearIsExpired() { + bitField0_ = (bitField0_ & ~0x00000004); + isExpired_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:message.TokenStatus) + } + + // @@protoc_insertion_point(class_scope:message.TokenStatus) + private static final org.jumpserver.wisp.Common.TokenStatus DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.jumpserver.wisp.Common.TokenStatus(); + } + + public static org.jumpserver.wisp.Common.TokenStatus getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TokenStatus parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.jumpserver.wisp.Common.TokenStatus getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface TerminalTaskOrBuilder extends + // @@protoc_insertion_point(interface_extends:message.TerminalTask) + com.google.protobuf.MessageOrBuilder { + + /** + * string id = 1; + * @return The id. + */ + java.lang.String getId(); + /** + * string id = 1; + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); + + /** + * .message.TaskAction action = 2; + * @return The enum numeric value on the wire for action. + */ + int getActionValue(); + /** + * .message.TaskAction action = 2; + * @return The action. + */ + org.jumpserver.wisp.Common.TaskAction getAction(); + + /** + * string session_id = 3; + * @return The sessionId. + */ + java.lang.String getSessionId(); + /** + * string session_id = 3; + * @return The bytes for sessionId. + */ + com.google.protobuf.ByteString + getSessionIdBytes(); + + /** + * string terminated_by = 4; + * @return The terminatedBy. + */ + java.lang.String getTerminatedBy(); + /** + * string terminated_by = 4; + * @return The bytes for terminatedBy. + */ + com.google.protobuf.ByteString + getTerminatedByBytes(); + + /** + * string created_by = 5; + * @return The createdBy. + */ + java.lang.String getCreatedBy(); + /** + * string created_by = 5; + * @return The bytes for createdBy. + */ + com.google.protobuf.ByteString + getCreatedByBytes(); + + /** + * .message.TokenStatus token_status = 6; + * @return Whether the tokenStatus field is set. + */ + boolean hasTokenStatus(); + /** + * .message.TokenStatus token_status = 6; + * @return The tokenStatus. + */ + org.jumpserver.wisp.Common.TokenStatus getTokenStatus(); + /** + * .message.TokenStatus token_status = 6; + */ + org.jumpserver.wisp.Common.TokenStatusOrBuilder getTokenStatusOrBuilder(); + } + /** + * Protobuf type {@code message.TerminalTask} + */ + public static final class TerminalTask extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:message.TerminalTask) + TerminalTaskOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 26, + /* patch= */ 1, + /* suffix= */ "", + TerminalTask.class.getName()); + } + // Use TerminalTask.newBuilder() to construct. + private TerminalTask(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private TerminalTask() { + id_ = ""; + action_ = 0; + sessionId_ = ""; + terminatedBy_ = ""; + createdBy_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.jumpserver.wisp.Common.internal_static_message_TerminalTask_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.jumpserver.wisp.Common.internal_static_message_TerminalTask_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.jumpserver.wisp.Common.TerminalTask.class, org.jumpserver.wisp.Common.TerminalTask.Builder.class); + } + + private int bitField0_; + public static final int ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + * string id = 1; + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + * string id = 1; + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ACTION_FIELD_NUMBER = 2; + private int action_ = 0; + /** + * .message.TaskAction action = 2; + * @return The enum numeric value on the wire for action. + */ + @java.lang.Override public int getActionValue() { + return action_; + } + /** + * .message.TaskAction action = 2; + * @return The action. + */ + @java.lang.Override public org.jumpserver.wisp.Common.TaskAction getAction() { + org.jumpserver.wisp.Common.TaskAction result = org.jumpserver.wisp.Common.TaskAction.forNumber(action_); + return result == null ? org.jumpserver.wisp.Common.TaskAction.UNRECOGNIZED : result; + } + + public static final int SESSION_ID_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object sessionId_ = ""; + /** + * string session_id = 3; + * @return The sessionId. + */ + @java.lang.Override + public java.lang.String getSessionId() { + java.lang.Object ref = sessionId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sessionId_ = s; + return s; + } + } + /** + * string session_id = 3; + * @return The bytes for sessionId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSessionIdBytes() { + java.lang.Object ref = sessionId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + sessionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TERMINATED_BY_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object terminatedBy_ = ""; + /** + * string terminated_by = 4; + * @return The terminatedBy. + */ + @java.lang.Override + public java.lang.String getTerminatedBy() { + java.lang.Object ref = terminatedBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + terminatedBy_ = s; + return s; + } + } + /** + * string terminated_by = 4; + * @return The bytes for terminatedBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTerminatedByBytes() { + java.lang.Object ref = terminatedBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + terminatedBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATED_BY_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object createdBy_ = ""; + /** + * string created_by = 5; + * @return The createdBy. + */ + @java.lang.Override + public java.lang.String getCreatedBy() { + java.lang.Object ref = createdBy_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { @@ -15382,6 +16295,32 @@ public java.lang.String getCreatedBy() { } } + public static final int TOKEN_STATUS_FIELD_NUMBER = 6; + private org.jumpserver.wisp.Common.TokenStatus tokenStatus_; + /** + * .message.TokenStatus token_status = 6; + * @return Whether the tokenStatus field is set. + */ + @java.lang.Override + public boolean hasTokenStatus() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .message.TokenStatus token_status = 6; + * @return The tokenStatus. + */ + @java.lang.Override + public org.jumpserver.wisp.Common.TokenStatus getTokenStatus() { + return tokenStatus_ == null ? org.jumpserver.wisp.Common.TokenStatus.getDefaultInstance() : tokenStatus_; + } + /** + * .message.TokenStatus token_status = 6; + */ + @java.lang.Override + public org.jumpserver.wisp.Common.TokenStatusOrBuilder getTokenStatusOrBuilder() { + return tokenStatus_ == null ? org.jumpserver.wisp.Common.TokenStatus.getDefaultInstance() : tokenStatus_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -15411,6 +16350,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (!com.google.protobuf.GeneratedMessage.isStringEmpty(createdBy_)) { com.google.protobuf.GeneratedMessage.writeString(output, 5, createdBy_); } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(6, getTokenStatus()); + } getUnknownFields().writeTo(output); } @@ -15436,6 +16378,10 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessage.isStringEmpty(createdBy_)) { size += com.google.protobuf.GeneratedMessage.computeStringSize(5, createdBy_); } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getTokenStatus()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -15460,6 +16406,11 @@ public boolean equals(final java.lang.Object obj) { .equals(other.getTerminatedBy())) return false; if (!getCreatedBy() .equals(other.getCreatedBy())) return false; + if (hasTokenStatus() != other.hasTokenStatus()) return false; + if (hasTokenStatus()) { + if (!getTokenStatus() + .equals(other.getTokenStatus())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -15481,6 +16432,10 @@ public int hashCode() { hash = (53 * hash) + getTerminatedBy().hashCode(); hash = (37 * hash) + CREATED_BY_FIELD_NUMBER; hash = (53 * hash) + getCreatedBy().hashCode(); + if (hasTokenStatus()) { + hash = (37 * hash) + TOKEN_STATUS_FIELD_NUMBER; + hash = (53 * hash) + getTokenStatus().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -15600,13 +16555,19 @@ public static final class Builder extends // Construct using org.jumpserver.wisp.Common.TerminalTask.newBuilder() private Builder() { - + maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); - + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getTokenStatusFieldBuilder(); + } } @java.lang.Override public Builder clear() { @@ -15617,6 +16578,11 @@ public Builder clear() { sessionId_ = ""; terminatedBy_ = ""; createdBy_ = ""; + tokenStatus_ = null; + if (tokenStatusBuilder_ != null) { + tokenStatusBuilder_.dispose(); + tokenStatusBuilder_ = null; + } return this; } @@ -15665,6 +16631,14 @@ private void buildPartial0(org.jumpserver.wisp.Common.TerminalTask result) { if (((from_bitField0_ & 0x00000010) != 0)) { result.createdBy_ = createdBy_; } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000020) != 0)) { + result.tokenStatus_ = tokenStatusBuilder_ == null + ? tokenStatus_ + : tokenStatusBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -15702,6 +16676,9 @@ public Builder mergeFrom(org.jumpserver.wisp.Common.TerminalTask other) { bitField0_ |= 0x00000010; onChanged(); } + if (other.hasTokenStatus()) { + mergeTokenStatus(other.getTokenStatus()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -15753,6 +16730,13 @@ public Builder mergeFrom( bitField0_ |= 0x00000010; break; } // case 42 + case 50: { + input.readMessage( + getTokenStatusFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag @@ -16111,6 +17095,127 @@ public Builder setCreatedByBytes( return this; } + private org.jumpserver.wisp.Common.TokenStatus tokenStatus_; + private com.google.protobuf.SingleFieldBuilder< + org.jumpserver.wisp.Common.TokenStatus, org.jumpserver.wisp.Common.TokenStatus.Builder, org.jumpserver.wisp.Common.TokenStatusOrBuilder> tokenStatusBuilder_; + /** + * .message.TokenStatus token_status = 6; + * @return Whether the tokenStatus field is set. + */ + public boolean hasTokenStatus() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * .message.TokenStatus token_status = 6; + * @return The tokenStatus. + */ + public org.jumpserver.wisp.Common.TokenStatus getTokenStatus() { + if (tokenStatusBuilder_ == null) { + return tokenStatus_ == null ? org.jumpserver.wisp.Common.TokenStatus.getDefaultInstance() : tokenStatus_; + } else { + return tokenStatusBuilder_.getMessage(); + } + } + /** + * .message.TokenStatus token_status = 6; + */ + public Builder setTokenStatus(org.jumpserver.wisp.Common.TokenStatus value) { + if (tokenStatusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tokenStatus_ = value; + } else { + tokenStatusBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * .message.TokenStatus token_status = 6; + */ + public Builder setTokenStatus( + org.jumpserver.wisp.Common.TokenStatus.Builder builderForValue) { + if (tokenStatusBuilder_ == null) { + tokenStatus_ = builderForValue.build(); + } else { + tokenStatusBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * .message.TokenStatus token_status = 6; + */ + public Builder mergeTokenStatus(org.jumpserver.wisp.Common.TokenStatus value) { + if (tokenStatusBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) && + tokenStatus_ != null && + tokenStatus_ != org.jumpserver.wisp.Common.TokenStatus.getDefaultInstance()) { + getTokenStatusBuilder().mergeFrom(value); + } else { + tokenStatus_ = value; + } + } else { + tokenStatusBuilder_.mergeFrom(value); + } + if (tokenStatus_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + /** + * .message.TokenStatus token_status = 6; + */ + public Builder clearTokenStatus() { + bitField0_ = (bitField0_ & ~0x00000020); + tokenStatus_ = null; + if (tokenStatusBuilder_ != null) { + tokenStatusBuilder_.dispose(); + tokenStatusBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .message.TokenStatus token_status = 6; + */ + public org.jumpserver.wisp.Common.TokenStatus.Builder getTokenStatusBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getTokenStatusFieldBuilder().getBuilder(); + } + /** + * .message.TokenStatus token_status = 6; + */ + public org.jumpserver.wisp.Common.TokenStatusOrBuilder getTokenStatusOrBuilder() { + if (tokenStatusBuilder_ != null) { + return tokenStatusBuilder_.getMessageOrBuilder(); + } else { + return tokenStatus_ == null ? + org.jumpserver.wisp.Common.TokenStatus.getDefaultInstance() : tokenStatus_; + } + } + /** + * .message.TokenStatus token_status = 6; + */ + private com.google.protobuf.SingleFieldBuilder< + org.jumpserver.wisp.Common.TokenStatus, org.jumpserver.wisp.Common.TokenStatus.Builder, org.jumpserver.wisp.Common.TokenStatusOrBuilder> + getTokenStatusFieldBuilder() { + if (tokenStatusBuilder_ == null) { + tokenStatusBuilder_ = new com.google.protobuf.SingleFieldBuilder< + org.jumpserver.wisp.Common.TokenStatus, org.jumpserver.wisp.Common.TokenStatus.Builder, org.jumpserver.wisp.Common.TokenStatusOrBuilder>( + getTokenStatus(), + getParentForChildren(), + isClean()); + tokenStatus_ = null; + } + return tokenStatusBuilder_; + } + // @@protoc_insertion_point(builder_scope:message.TerminalTask) } @@ -25386,6 +26491,11 @@ public org.jumpserver.wisp.Common.LifecycleLogData getDefaultInstanceForType() { private static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_message_Session_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_message_TokenStatus_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_message_TokenStatus_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_message_TerminalTask_descriptor; private static final @@ -25481,59 +26591,63 @@ public org.jumpserver.wisp.Common.LifecycleLogData getDefaultInstanceForType() { "\n\014CommandGroup\022\n\n\002id\030\001 \001(\t\022\014\n\004name\030\002 \001(\t" + "\022\017\n\007content\030\003 \001(\t\022\014\n\004Type\030\004 \001(\t\022\017\n\007patte" + "rn\030\005 \001(\t\022\023\n\013ignore_case\030\006 \001(\010\"\037\n\nExpireI" + - "nfo\022\021\n\texpire_at\030\001 \001(\003\"\242\002\n\007Session\022\n\n\002id" + + "nfo\022\021\n\texpire_at\030\001 \001(\003\"\264\002\n\007Session\022\n\n\002id" + "\030\001 \001(\t\022\014\n\004user\030\002 \001(\t\022\r\n\005asset\030\003 \001(\t\022\017\n\007a" + "ccount\030\004 \001(\t\022.\n\nlogin_from\030\005 \001(\0162\032.messa" + "ge.Session.LoginFrom\022\023\n\013remote_addr\030\006 \001(" + "\t\022\020\n\010protocol\030\007 \001(\t\022\022\n\ndate_start\030\010 \001(\003\022" + "\016\n\006org_id\030\t \001(\t\022\017\n\007user_id\030\n \001(\t\022\020\n\010asse" + - "t_id\030\013 \001(\t\022\022\n\naccount_id\030\014 \001(\t\"+\n\tLoginF" + - "rom\022\006\n\002WT\020\000\022\006\n\002ST\020\001\022\006\n\002RT\020\002\022\006\n\002DT\020\003\"~\n\014T" + - "erminalTask\022\n\n\002id\030\001 \001(\t\022#\n\006action\030\002 \001(\0162" + - "\023.message.TaskAction\022\022\n\nsession_id\030\003 \001(\t" + - "\022\025\n\rterminated_by\030\004 \001(\t\022\022\n\ncreated_by\030\005 " + - "\001(\t\"\205\003\n\rTokenAuthInfo\022\016\n\006key_id\030\001 \001(\t\022\022\n" + - "\nsecrete_id\030\002 \001(\t\022\035\n\005asset\030\003 \001(\0132\016.messa" + - "ge.Asset\022\033\n\004user\030\004 \001(\0132\r.message.User\022!\n" + - "\007account\030\005 \001(\0132\020.message.Account\022\'\n\nperm" + - "ission\030\006 \001(\0132\023.message.Permission\022(\n\013exp" + - "ire_info\030\007 \001(\0132\023.message.ExpireInfo\022)\n\014f" + - "ilter_rules\030\010 \003(\0132\023.message.CommandACL\022\"" + - "\n\010gateways\030\t \003(\0132\020.message.Gateway\022*\n\007se" + - "tting\030\n \001(\0132\031.message.ComponentSetting\022#" + - "\n\010platform\030\013 \001(\0132\021.message.Platform\"\203\001\n\010" + - "Platform\022\n\n\002id\030\001 \001(\005\022\014\n\004name\030\002 \001(\t\022\020\n\010ca" + - "tegory\030\003 \001(\t\022\017\n\007charset\030\004 \001(\t\022\014\n\004type\030\005 " + - "\001(\t\022,\n\tprotocols\030\006 \003(\0132\031.message.Platfor" + - "mProtocol\"\246\001\n\020PlatformProtocol\022\n\n\002id\030\001 \001" + - "(\005\022\014\n\004name\030\002 \001(\t\022\014\n\004port\030\003 \001(\005\0229\n\010settin" + - "gs\030\004 \003(\0132\'.message.PlatformProtocol.Sett" + - "ingsEntry\032/\n\rSettingsEntry\022\013\n\003key\030\001 \001(\t\022" + - "\r\n\005value\030\002 \001(\t:\0028\001\"C\n\020ComponentSetting\022\025" + - "\n\rmax_idle_time\030\001 \001(\005\022\030\n\020max_session_tim" + - "e\030\002 \001(\005\"1\n\007Forward\022\n\n\002id\030\001 \001(\t\022\014\n\004Host\030\002" + - " \001(\t\022\014\n\004port\030\003 \001(\005\"\216\001\n\rPublicSetting\022\025\n\r" + - "xpack_enabled\030\001 \001(\010\022\025\n\rvalid_license\030\002 \001" + - "(\010\022\024\n\014gpt_base_url\030\003 \001(\t\022\023\n\013gpt_api_key\030" + - "\004 \001(\t\022\021\n\tgpt_proxy\030\005 \001(\t\022\021\n\tgpt_model\030\006 " + - "\001(\t\"%\n\006Cookie\022\014\n\004name\030\001 \001(\t\022\r\n\005value\030\002 \001" + - "(\t\"\250\003\n\020LifecycleLogData\0223\n\005event\030\001 \001(\0162$" + - ".message.LifecycleLogData.event_type\022\016\n\006" + - "reason\030\002 \001(\t\022\014\n\004user\030\003 \001(\t\"\300\002\n\nevent_typ" + - "e\022\027\n\023AssetConnectSuccess\020\000\022\030\n\024AssetConne" + - "ctFinished\020\001\022\023\n\017CreateShareLink\020\002\022\023\n\017Use" + - "rJoinSession\020\003\022\024\n\020UserLeaveSession\020\004\022\024\n\020" + - "AdminJoinMonitor\020\005\022\024\n\020AdminExitMonitor\020\006" + - "\022\026\n\022ReplayConvertStart\020\007\022\030\n\024ReplayConver" + - "tSuccess\020\010\022\030\n\024ReplayConvertFailure\020\t\022\025\n\021" + - "ReplayUploadStart\020\n\022\027\n\023ReplayUploadSucce" + - "ss\020\013\022\027\n\023ReplayUploadFailure\020\014*A\n\nTaskAct" + - "ion\022\017\n\013KillSession\020\000\022\017\n\013LockSession\020\001\022\021\n" + - "\rUnlockSession\020\002*f\n\tRiskLevel\022\n\n\006Normal\020" + - "\000\022\013\n\007Warning\020\001\022\n\n\006Reject\020\002\022\020\n\014ReviewReje" + - "ct\020\003\022\020\n\014ReviewAccept\020\004\022\020\n\014ReviewCancel\020\005" + - "B \n\023org.jumpserver.wispZ\t/protobufb\006prot" + - "o3" + "t_id\030\013 \001(\t\022\022\n\naccount_id\030\014 \001(\t\022\020\n\010token_" + + "id\030\r \001(\t\"+\n\tLoginFrom\022\006\n\002WT\020\000\022\006\n\002ST\020\001\022\006\n" + + "\002RT\020\002\022\006\n\002DT\020\003\"?\n\013TokenStatus\022\014\n\004code\030\001 \001" + + "(\t\022\016\n\006detail\030\002 \001(\t\022\022\n\nis_expired\030\003 \001(\010\"\252" + + "\001\n\014TerminalTask\022\n\n\002id\030\001 \001(\t\022#\n\006action\030\002 " + + "\001(\0162\023.message.TaskAction\022\022\n\nsession_id\030\003" + + " \001(\t\022\025\n\rterminated_by\030\004 \001(\t\022\022\n\ncreated_b" + + "y\030\005 \001(\t\022*\n\014token_status\030\006 \001(\0132\024.message." + + "TokenStatus\"\205\003\n\rTokenAuthInfo\022\016\n\006key_id\030" + + "\001 \001(\t\022\022\n\nsecrete_id\030\002 \001(\t\022\035\n\005asset\030\003 \001(\013" + + "2\016.message.Asset\022\033\n\004user\030\004 \001(\0132\r.message" + + ".User\022!\n\007account\030\005 \001(\0132\020.message.Account" + + "\022\'\n\npermission\030\006 \001(\0132\023.message.Permissio" + + "n\022(\n\013expire_info\030\007 \001(\0132\023.message.ExpireI" + + "nfo\022)\n\014filter_rules\030\010 \003(\0132\023.message.Comm" + + "andACL\022\"\n\010gateways\030\t \003(\0132\020.message.Gatew" + + "ay\022*\n\007setting\030\n \001(\0132\031.message.ComponentS" + + "etting\022#\n\010platform\030\013 \001(\0132\021.message.Platf" + + "orm\"\203\001\n\010Platform\022\n\n\002id\030\001 \001(\005\022\014\n\004name\030\002 \001" + + "(\t\022\020\n\010category\030\003 \001(\t\022\017\n\007charset\030\004 \001(\t\022\014\n" + + "\004type\030\005 \001(\t\022,\n\tprotocols\030\006 \003(\0132\031.message" + + ".PlatformProtocol\"\246\001\n\020PlatformProtocol\022\n" + + "\n\002id\030\001 \001(\005\022\014\n\004name\030\002 \001(\t\022\014\n\004port\030\003 \001(\005\0229" + + "\n\010settings\030\004 \003(\0132\'.message.PlatformProto" + + "col.SettingsEntry\032/\n\rSettingsEntry\022\013\n\003ke" + + "y\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"C\n\020ComponentS" + + "etting\022\025\n\rmax_idle_time\030\001 \001(\005\022\030\n\020max_ses" + + "sion_time\030\002 \001(\005\"1\n\007Forward\022\n\n\002id\030\001 \001(\t\022\014" + + "\n\004Host\030\002 \001(\t\022\014\n\004port\030\003 \001(\005\"\216\001\n\rPublicSet" + + "ting\022\025\n\rxpack_enabled\030\001 \001(\010\022\025\n\rvalid_lic" + + "ense\030\002 \001(\010\022\024\n\014gpt_base_url\030\003 \001(\t\022\023\n\013gpt_" + + "api_key\030\004 \001(\t\022\021\n\tgpt_proxy\030\005 \001(\t\022\021\n\tgpt_" + + "model\030\006 \001(\t\"%\n\006Cookie\022\014\n\004name\030\001 \001(\t\022\r\n\005v" + + "alue\030\002 \001(\t\"\250\003\n\020LifecycleLogData\0223\n\005event" + + "\030\001 \001(\0162$.message.LifecycleLogData.event_" + + "type\022\016\n\006reason\030\002 \001(\t\022\014\n\004user\030\003 \001(\t\"\300\002\n\ne" + + "vent_type\022\027\n\023AssetConnectSuccess\020\000\022\030\n\024As" + + "setConnectFinished\020\001\022\023\n\017CreateShareLink\020" + + "\002\022\023\n\017UserJoinSession\020\003\022\024\n\020UserLeaveSessi" + + "on\020\004\022\024\n\020AdminJoinMonitor\020\005\022\024\n\020AdminExitM" + + "onitor\020\006\022\026\n\022ReplayConvertStart\020\007\022\030\n\024Repl" + + "ayConvertSuccess\020\010\022\030\n\024ReplayConvertFailu" + + "re\020\t\022\025\n\021ReplayUploadStart\020\n\022\027\n\023ReplayUpl" + + "oadSuccess\020\013\022\027\n\023ReplayUploadFailure\020\014*k\n" + + "\nTaskAction\022\017\n\013KillSession\020\000\022\017\n\013LockSess" + + "ion\020\001\022\021\n\rUnlockSession\020\002\022\024\n\020TokenPermExp" + + "ired\020\003\022\022\n\016TokenPermValid\020\004*f\n\tRiskLevel\022" + + "\n\n\006Normal\020\000\022\013\n\007Warning\020\001\022\n\n\006Reject\020\002\022\020\n\014" + + "ReviewReject\020\003\022\020\n\014ReviewAccept\020\004\022\020\n\014Revi" + + "ewCancel\020\005B \n\023org.jumpserver.wispZ\t/prot" + + "obufb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -25610,27 +26724,33 @@ public org.jumpserver.wisp.Common.LifecycleLogData getDefaultInstanceForType() { internal_static_message_Session_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_message_Session_descriptor, - new java.lang.String[] { "Id", "User", "Asset", "Account", "LoginFrom", "RemoteAddr", "Protocol", "DateStart", "OrgId", "UserId", "AssetId", "AccountId", }); - internal_static_message_TerminalTask_descriptor = + new java.lang.String[] { "Id", "User", "Asset", "Account", "LoginFrom", "RemoteAddr", "Protocol", "DateStart", "OrgId", "UserId", "AssetId", "AccountId", "TokenId", }); + internal_static_message_TokenStatus_descriptor = getDescriptor().getMessageTypes().get(11); + internal_static_message_TokenStatus_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_message_TokenStatus_descriptor, + new java.lang.String[] { "Code", "Detail", "IsExpired", }); + internal_static_message_TerminalTask_descriptor = + getDescriptor().getMessageTypes().get(12); internal_static_message_TerminalTask_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_message_TerminalTask_descriptor, - new java.lang.String[] { "Id", "Action", "SessionId", "TerminatedBy", "CreatedBy", }); + new java.lang.String[] { "Id", "Action", "SessionId", "TerminatedBy", "CreatedBy", "TokenStatus", }); internal_static_message_TokenAuthInfo_descriptor = - getDescriptor().getMessageTypes().get(12); + getDescriptor().getMessageTypes().get(13); internal_static_message_TokenAuthInfo_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_message_TokenAuthInfo_descriptor, new java.lang.String[] { "KeyId", "SecreteId", "Asset", "User", "Account", "Permission", "ExpireInfo", "FilterRules", "Gateways", "Setting", "Platform", }); internal_static_message_Platform_descriptor = - getDescriptor().getMessageTypes().get(13); + getDescriptor().getMessageTypes().get(14); internal_static_message_Platform_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_message_Platform_descriptor, new java.lang.String[] { "Id", "Name", "Category", "Charset", "Type", "Protocols", }); internal_static_message_PlatformProtocol_descriptor = - getDescriptor().getMessageTypes().get(14); + getDescriptor().getMessageTypes().get(15); internal_static_message_PlatformProtocol_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_message_PlatformProtocol_descriptor, @@ -25642,31 +26762,31 @@ public org.jumpserver.wisp.Common.LifecycleLogData getDefaultInstanceForType() { internal_static_message_PlatformProtocol_SettingsEntry_descriptor, new java.lang.String[] { "Key", "Value", }); internal_static_message_ComponentSetting_descriptor = - getDescriptor().getMessageTypes().get(15); + getDescriptor().getMessageTypes().get(16); internal_static_message_ComponentSetting_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_message_ComponentSetting_descriptor, new java.lang.String[] { "MaxIdleTime", "MaxSessionTime", }); internal_static_message_Forward_descriptor = - getDescriptor().getMessageTypes().get(16); + getDescriptor().getMessageTypes().get(17); internal_static_message_Forward_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_message_Forward_descriptor, new java.lang.String[] { "Id", "Host", "Port", }); internal_static_message_PublicSetting_descriptor = - getDescriptor().getMessageTypes().get(17); + getDescriptor().getMessageTypes().get(18); internal_static_message_PublicSetting_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_message_PublicSetting_descriptor, new java.lang.String[] { "XpackEnabled", "ValidLicense", "GptBaseUrl", "GptApiKey", "GptProxy", "GptModel", }); internal_static_message_Cookie_descriptor = - getDescriptor().getMessageTypes().get(18); + getDescriptor().getMessageTypes().get(19); internal_static_message_Cookie_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_message_Cookie_descriptor, new java.lang.String[] { "Name", "Value", }); internal_static_message_LifecycleLogData_descriptor = - getDescriptor().getMessageTypes().get(19); + getDescriptor().getMessageTypes().get(20); internal_static_message_LifecycleLogData_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_message_LifecycleLogData_descriptor, diff --git a/protos/common.proto b/protos/common.proto index a9cf940..14e721d 100644 --- a/protos/common.proto +++ b/protos/common.proto @@ -127,12 +127,21 @@ message Session { string user_id = 10; string asset_id = 11; string account_id = 12; + string token_id = 13; } enum TaskAction { KillSession = 0; LockSession = 1; UnlockSession = 2; + TokenPermExpired = 3; + TokenPermValid = 4; +} + +message TokenStatus { + string code = 1; + string detail = 2; + bool is_expired = 3; } message TerminalTask { @@ -141,6 +150,7 @@ message TerminalTask { string session_id = 3; string terminated_by = 4; string created_by = 5; + TokenStatus token_status = 6; } enum RiskLevel {