mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2025-11-03 20:40:25 +08:00
SSH认证支持sudo
This commit is contained in:
@@ -43,6 +43,7 @@ type CreateNodeGrantRequest struct {
|
||||
Passphrase string `protobuf:"bytes,8,opt,name=passphrase,proto3" json:"passphrase,omitempty"`
|
||||
Description string `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"`
|
||||
NodeId int64 `protobuf:"varint,7,opt,name=nodeId,proto3" json:"nodeId,omitempty"`
|
||||
Su bool `protobuf:"varint,9,opt,name=su,proto3" json:"su,omitempty"`
|
||||
}
|
||||
|
||||
func (x *CreateNodeGrantRequest) Reset() {
|
||||
@@ -133,6 +134,13 @@ func (x *CreateNodeGrantRequest) GetNodeId() int64 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *CreateNodeGrantRequest) GetSu() bool {
|
||||
if x != nil {
|
||||
return x.Su
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
type CreateNodeGrantResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
@@ -195,6 +203,7 @@ type UpdateNodeGrantRequest struct {
|
||||
Passphrase string `protobuf:"bytes,9,opt,name=passphrase,proto3" json:"passphrase,omitempty"`
|
||||
Description string `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"`
|
||||
NodeId int64 `protobuf:"varint,7,opt,name=nodeId,proto3" json:"nodeId,omitempty"`
|
||||
Su bool `protobuf:"varint,10,opt,name=su,proto3" json:"su,omitempty"`
|
||||
}
|
||||
|
||||
func (x *UpdateNodeGrantRequest) Reset() {
|
||||
@@ -292,6 +301,13 @@ func (x *UpdateNodeGrantRequest) GetNodeId() int64 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UpdateNodeGrantRequest) GetSu() bool {
|
||||
if x != nil {
|
||||
return x.Su
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// 禁用节点认证
|
||||
type DisableNodeGrantRequest struct {
|
||||
state protoimpl.MessageState
|
||||
@@ -948,7 +964,7 @@ var file_service_node_grant_proto_rawDesc = []byte{
|
||||
0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x6e, 0x6f, 0x64,
|
||||
0x65, 0x5f, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x6d,
|
||||
0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x72, 0x70, 0x63, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67,
|
||||
0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf6, 0x01, 0x0a, 0x16, 0x43, 0x72, 0x65,
|
||||
0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x86, 0x02, 0x0a, 0x16, 0x43, 0x72, 0x65,
|
||||
0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f,
|
||||
@@ -964,10 +980,11 @@ var file_service_node_grant_proto_rawDesc = []byte{
|
||||
0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65,
|
||||
0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x6f, 0x64,
|
||||
0x65, 0x49, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49,
|
||||
0x64, 0x22, 0x3b, 0x0a, 0x17, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x47,
|
||||
0x64, 0x12, 0x0e, 0x0a, 0x02, 0x73, 0x75, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x02, 0x73,
|
||||
0x75, 0x22, 0x3b, 0x0a, 0x17, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x47,
|
||||
0x72, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x20, 0x0a, 0x0b,
|
||||
0x6e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x03, 0x52, 0x0b, 0x6e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x98,
|
||||
0x03, 0x52, 0x0b, 0x6e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x22, 0xa8,
|
||||
0x02, 0x0a, 0x16, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x61,
|
||||
0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x6e, 0x6f, 0x64,
|
||||
0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b,
|
||||
@@ -985,7 +1002,8 @@ var file_service_node_grant_proto_rawDesc = []byte{
|
||||
0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28,
|
||||
0x03, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x22, 0x3b, 0x0a, 0x17, 0x44, 0x69, 0x73,
|
||||
0x03, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x73, 0x75, 0x18,
|
||||
0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x02, 0x73, 0x75, 0x22, 0x3b, 0x0a, 0x17, 0x44, 0x69, 0x73,
|
||||
0x61, 0x62, 0x6c, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x6e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x61, 0x6e,
|
||||
0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x6e, 0x6f, 0x64, 0x65, 0x47,
|
||||
|
||||
@@ -44,6 +44,7 @@ message CreateNodeGrantRequest {
|
||||
string passphrase = 8;
|
||||
string description = 6;
|
||||
int64 nodeId = 7;
|
||||
bool su = 9;
|
||||
}
|
||||
|
||||
message CreateNodeGrantResponse {
|
||||
@@ -61,6 +62,7 @@ message UpdateNodeGrantRequest {
|
||||
string passphrase = 9;
|
||||
string description = 6;
|
||||
int64 nodeId = 7;
|
||||
bool su = 10;
|
||||
}
|
||||
|
||||
// 禁用节点认证
|
||||
|
||||
Reference in New Issue
Block a user