mirror of
https://github.com/gravitational/teleport.git
synced 2026-08-29 05:27:37 +08:00
Add protos and OSS storage for EnrollPairing (#67862)
* Add RPCs for creating and getting EnrollPairing * Add storage service for EnrollPairing * `AWAITING_UNAUTHORIZED_CLIENT` -> `AWAITING_DEVICE` * Mention RFD 32e in the comment for EnrollPairing message * Use generic service to implement service for `EnrollPairing` * Remove fake clock from tests * Use a want object in tests * Use `ErrorAs` for error-type assertions * Add workaround for DynamoDB issue * Capture just clock as a field * Do not set PageLimit * Copy fields to `want` rather than adding ignores * Log and ignore error from GetResource on CreateEnrollPairing * Update the workaround comment to refer to #68038 * Fix imports
This commit is contained in:
@@ -4659,11 +4659,239 @@ func (b0 SyncInventoryMissingDevices_builder) Build() *SyncInventoryMissingDevic
|
||||
return m0
|
||||
}
|
||||
|
||||
// Request for CreateEnrollPairing.
|
||||
type CreateEnrollPairingRequest struct {
|
||||
state protoimpl.MessageState `protogen:"hybrid.v1"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *CreateEnrollPairingRequest) Reset() {
|
||||
*x = CreateEnrollPairingRequest{}
|
||||
mi := &file_teleport_devicetrust_v1_devicetrust_service_proto_msgTypes[40]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *CreateEnrollPairingRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*CreateEnrollPairingRequest) ProtoMessage() {}
|
||||
|
||||
func (x *CreateEnrollPairingRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_teleport_devicetrust_v1_devicetrust_service_proto_msgTypes[40]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
type CreateEnrollPairingRequest_builder struct {
|
||||
_ [0]func() // Prevents comparability and use of unkeyed literals for the builder.
|
||||
|
||||
}
|
||||
|
||||
func (b0 CreateEnrollPairingRequest_builder) Build() *CreateEnrollPairingRequest {
|
||||
m0 := &CreateEnrollPairingRequest{}
|
||||
b, x := &b0, m0
|
||||
_, _ = b, x
|
||||
return m0
|
||||
}
|
||||
|
||||
// Response for CreateEnrollPairing.
|
||||
type CreateEnrollPairingResponse struct {
|
||||
state protoimpl.MessageState `protogen:"hybrid.v1"`
|
||||
EnrollPairing *EnrollPairing `protobuf:"bytes,1,opt,name=enroll_pairing,json=enrollPairing,proto3" json:"enroll_pairing,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *CreateEnrollPairingResponse) Reset() {
|
||||
*x = CreateEnrollPairingResponse{}
|
||||
mi := &file_teleport_devicetrust_v1_devicetrust_service_proto_msgTypes[41]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *CreateEnrollPairingResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*CreateEnrollPairingResponse) ProtoMessage() {}
|
||||
|
||||
func (x *CreateEnrollPairingResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_teleport_devicetrust_v1_devicetrust_service_proto_msgTypes[41]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
func (x *CreateEnrollPairingResponse) GetEnrollPairing() *EnrollPairing {
|
||||
if x != nil {
|
||||
return x.EnrollPairing
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *CreateEnrollPairingResponse) SetEnrollPairing(v *EnrollPairing) {
|
||||
x.EnrollPairing = v
|
||||
}
|
||||
|
||||
func (x *CreateEnrollPairingResponse) HasEnrollPairing() bool {
|
||||
if x == nil {
|
||||
return false
|
||||
}
|
||||
return x.EnrollPairing != nil
|
||||
}
|
||||
|
||||
func (x *CreateEnrollPairingResponse) ClearEnrollPairing() {
|
||||
x.EnrollPairing = nil
|
||||
}
|
||||
|
||||
type CreateEnrollPairingResponse_builder struct {
|
||||
_ [0]func() // Prevents comparability and use of unkeyed literals for the builder.
|
||||
|
||||
EnrollPairing *EnrollPairing
|
||||
}
|
||||
|
||||
func (b0 CreateEnrollPairingResponse_builder) Build() *CreateEnrollPairingResponse {
|
||||
m0 := &CreateEnrollPairingResponse{}
|
||||
b, x := &b0, m0
|
||||
_, _ = b, x
|
||||
x.EnrollPairing = b.EnrollPairing
|
||||
return m0
|
||||
}
|
||||
|
||||
// Request for GetCurrentEnrollPairing.
|
||||
type GetCurrentEnrollPairingRequest struct {
|
||||
state protoimpl.MessageState `protogen:"hybrid.v1"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *GetCurrentEnrollPairingRequest) Reset() {
|
||||
*x = GetCurrentEnrollPairingRequest{}
|
||||
mi := &file_teleport_devicetrust_v1_devicetrust_service_proto_msgTypes[42]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GetCurrentEnrollPairingRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetCurrentEnrollPairingRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetCurrentEnrollPairingRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_teleport_devicetrust_v1_devicetrust_service_proto_msgTypes[42]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
type GetCurrentEnrollPairingRequest_builder struct {
|
||||
_ [0]func() // Prevents comparability and use of unkeyed literals for the builder.
|
||||
|
||||
}
|
||||
|
||||
func (b0 GetCurrentEnrollPairingRequest_builder) Build() *GetCurrentEnrollPairingRequest {
|
||||
m0 := &GetCurrentEnrollPairingRequest{}
|
||||
b, x := &b0, m0
|
||||
_, _ = b, x
|
||||
return m0
|
||||
}
|
||||
|
||||
// Response for GetCurrentEnrollPairing.
|
||||
type GetCurrentEnrollPairingResponse struct {
|
||||
state protoimpl.MessageState `protogen:"hybrid.v1"`
|
||||
// Current EnrollPairing for the calling user.
|
||||
EnrollPairing *EnrollPairing `protobuf:"bytes,1,opt,name=enroll_pairing,json=enrollPairing,proto3" json:"enroll_pairing,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *GetCurrentEnrollPairingResponse) Reset() {
|
||||
*x = GetCurrentEnrollPairingResponse{}
|
||||
mi := &file_teleport_devicetrust_v1_devicetrust_service_proto_msgTypes[43]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GetCurrentEnrollPairingResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetCurrentEnrollPairingResponse) ProtoMessage() {}
|
||||
|
||||
func (x *GetCurrentEnrollPairingResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_teleport_devicetrust_v1_devicetrust_service_proto_msgTypes[43]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
func (x *GetCurrentEnrollPairingResponse) GetEnrollPairing() *EnrollPairing {
|
||||
if x != nil {
|
||||
return x.EnrollPairing
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *GetCurrentEnrollPairingResponse) SetEnrollPairing(v *EnrollPairing) {
|
||||
x.EnrollPairing = v
|
||||
}
|
||||
|
||||
func (x *GetCurrentEnrollPairingResponse) HasEnrollPairing() bool {
|
||||
if x == nil {
|
||||
return false
|
||||
}
|
||||
return x.EnrollPairing != nil
|
||||
}
|
||||
|
||||
func (x *GetCurrentEnrollPairingResponse) ClearEnrollPairing() {
|
||||
x.EnrollPairing = nil
|
||||
}
|
||||
|
||||
type GetCurrentEnrollPairingResponse_builder struct {
|
||||
_ [0]func() // Prevents comparability and use of unkeyed literals for the builder.
|
||||
|
||||
// Current EnrollPairing for the calling user.
|
||||
EnrollPairing *EnrollPairing
|
||||
}
|
||||
|
||||
func (b0 GetCurrentEnrollPairingResponse_builder) Build() *GetCurrentEnrollPairingResponse {
|
||||
m0 := &GetCurrentEnrollPairingResponse{}
|
||||
b, x := &b0, m0
|
||||
_, _ = b, x
|
||||
x.EnrollPairing = b.EnrollPairing
|
||||
return m0
|
||||
}
|
||||
|
||||
var File_teleport_devicetrust_v1_devicetrust_service_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_teleport_devicetrust_v1_devicetrust_service_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"1teleport/devicetrust/v1/devicetrust_service.proto\x12\x17teleport.devicetrust.v1\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\x1a4teleport/devicetrust/v1/authenticate_challenge.proto\x1a$teleport/devicetrust/v1/device.proto\x1a3teleport/devicetrust/v1/device_collected_data.proto\x1a7teleport/devicetrust/v1/device_confirmation_token.proto\x1a1teleport/devicetrust/v1/device_enroll_token.proto\x1a+teleport/devicetrust/v1/device_source.proto\x1a.teleport/devicetrust/v1/device_web_token.proto\x1a%teleport/devicetrust/v1/os_type.proto\x1a!teleport/devicetrust/v1/tpm.proto\x1a/teleport/devicetrust/v1/user_certificates.proto\"\x81\x02\n" +
|
||||
"1teleport/devicetrust/v1/devicetrust_service.proto\x12\x17teleport.devicetrust.v1\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\x1a4teleport/devicetrust/v1/authenticate_challenge.proto\x1a$teleport/devicetrust/v1/device.proto\x1a3teleport/devicetrust/v1/device_collected_data.proto\x1a7teleport/devicetrust/v1/device_confirmation_token.proto\x1a1teleport/devicetrust/v1/device_enroll_token.proto\x1a+teleport/devicetrust/v1/device_source.proto\x1a.teleport/devicetrust/v1/device_web_token.proto\x1a,teleport/devicetrust/v1/enroll_pairing.proto\x1a%teleport/devicetrust/v1/os_type.proto\x1a!teleport/devicetrust/v1/tpm.proto\x1a/teleport/devicetrust/v1/user_certificates.proto\"\x81\x02\n" +
|
||||
"\x13CreateDeviceRequest\x127\n" +
|
||||
"\x06device\x18\x01 \x01(\v2\x1f.teleport.devicetrust.v1.DeviceR\x06device\x12.\n" +
|
||||
"\x13create_enroll_token\x18\x02 \x01(\bR\x11createEnrollToken\x12,\n" +
|
||||
@@ -4802,12 +5030,18 @@ const file_teleport_devicetrust_v1_devicetrust_service_proto_rawDesc = "" +
|
||||
"\x13SyncInventoryResult\x12A\n" +
|
||||
"\adevices\x18\x01 \x03(\v2'.teleport.devicetrust.v1.DeviceOrStatusR\adevices\"X\n" +
|
||||
"\x1bSyncInventoryMissingDevices\x129\n" +
|
||||
"\adevices\x18\x01 \x03(\v2\x1f.teleport.devicetrust.v1.DeviceR\adevices*Y\n" +
|
||||
"\adevices\x18\x01 \x03(\v2\x1f.teleport.devicetrust.v1.DeviceR\adevices\"\x1c\n" +
|
||||
"\x1aCreateEnrollPairingRequest\"l\n" +
|
||||
"\x1bCreateEnrollPairingResponse\x12M\n" +
|
||||
"\x0eenroll_pairing\x18\x01 \x01(\v2&.teleport.devicetrust.v1.EnrollPairingR\renrollPairing\" \n" +
|
||||
"\x1eGetCurrentEnrollPairingRequest\"p\n" +
|
||||
"\x1fGetCurrentEnrollPairingResponse\x12M\n" +
|
||||
"\x0eenroll_pairing\x18\x01 \x01(\v2&.teleport.devicetrust.v1.EnrollPairingR\renrollPairing*Y\n" +
|
||||
"\n" +
|
||||
"DeviceView\x12\x1b\n" +
|
||||
"\x17DEVICE_VIEW_UNSPECIFIED\x10\x00\x12\x14\n" +
|
||||
"\x10DEVICE_VIEW_LIST\x10\x01\x12\x18\n" +
|
||||
"\x14DEVICE_VIEW_RESOURCE\x10\x022\xb9\f\n" +
|
||||
"\x14DEVICE_VIEW_RESOURCE\x10\x022\xcb\x0e\n" +
|
||||
"\x12DeviceTrustService\x12]\n" +
|
||||
"\fCreateDevice\x12,.teleport.devicetrust.v1.CreateDeviceRequest\x1a\x1f.teleport.devicetrust.v1.Device\x12]\n" +
|
||||
"\fUpdateDevice\x12,.teleport.devicetrust.v1.UpdateDeviceRequest\x1a\x1f.teleport.devicetrust.v1.Device\x12]\n" +
|
||||
@@ -4822,10 +5056,12 @@ const file_teleport_devicetrust_v1_devicetrust_service_proto_rawDesc = "" +
|
||||
"\fEnrollDevice\x12,.teleport.devicetrust.v1.EnrollDeviceRequest\x1a-.teleport.devicetrust.v1.EnrollDeviceResponse(\x010\x01\x12\x81\x01\n" +
|
||||
"\x12AuthenticateDevice\x122.teleport.devicetrust.v1.AuthenticateDeviceRequest\x1a3.teleport.devicetrust.v1.AuthenticateDeviceResponse(\x010\x01\x12\xa1\x01\n" +
|
||||
"\x1eConfirmDeviceWebAuthentication\x12>.teleport.devicetrust.v1.ConfirmDeviceWebAuthenticationRequest\x1a?.teleport.devicetrust.v1.ConfirmDeviceWebAuthenticationResponse\x12r\n" +
|
||||
"\rSyncInventory\x12-.teleport.devicetrust.v1.SyncInventoryRequest\x1a..teleport.devicetrust.v1.SyncInventoryResponse(\x010\x01BZZXgithub.com/gravitational/teleport/api/gen/proto/go/teleport/devicetrust/v1;devicetrustv1b\x06proto3"
|
||||
"\rSyncInventory\x12-.teleport.devicetrust.v1.SyncInventoryRequest\x1a..teleport.devicetrust.v1.SyncInventoryResponse(\x010\x01\x12\x80\x01\n" +
|
||||
"\x13CreateEnrollPairing\x123.teleport.devicetrust.v1.CreateEnrollPairingRequest\x1a4.teleport.devicetrust.v1.CreateEnrollPairingResponse\x12\x8c\x01\n" +
|
||||
"\x17GetCurrentEnrollPairing\x127.teleport.devicetrust.v1.GetCurrentEnrollPairingRequest\x1a8.teleport.devicetrust.v1.GetCurrentEnrollPairingResponseBZZXgithub.com/gravitational/teleport/api/gen/proto/go/teleport/devicetrust/v1;devicetrustv1b\x06proto3"
|
||||
|
||||
var file_teleport_devicetrust_v1_devicetrust_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
||||
var file_teleport_devicetrust_v1_devicetrust_service_proto_msgTypes = make([]protoimpl.MessageInfo, 40)
|
||||
var file_teleport_devicetrust_v1_devicetrust_service_proto_msgTypes = make([]protoimpl.MessageInfo, 44)
|
||||
var file_teleport_devicetrust_v1_devicetrust_service_proto_goTypes = []any{
|
||||
(DeviceView)(0), // 0: teleport.devicetrust.v1.DeviceView
|
||||
(*CreateDeviceRequest)(nil), // 1: teleport.devicetrust.v1.CreateDeviceRequest
|
||||
@@ -4868,63 +5104,68 @@ var file_teleport_devicetrust_v1_devicetrust_service_proto_goTypes = []any{
|
||||
(*SyncInventoryAck)(nil), // 38: teleport.devicetrust.v1.SyncInventoryAck
|
||||
(*SyncInventoryResult)(nil), // 39: teleport.devicetrust.v1.SyncInventoryResult
|
||||
(*SyncInventoryMissingDevices)(nil), // 40: teleport.devicetrust.v1.SyncInventoryMissingDevices
|
||||
(*Device)(nil), // 41: teleport.devicetrust.v1.Device
|
||||
(*timestamppb.Timestamp)(nil), // 42: google.protobuf.Timestamp
|
||||
(*fieldmaskpb.FieldMask)(nil), // 43: google.protobuf.FieldMask
|
||||
(*status.Status)(nil), // 44: google.rpc.Status
|
||||
(*DeviceCollectedData)(nil), // 45: teleport.devicetrust.v1.DeviceCollectedData
|
||||
(*TPMPlatformParameters)(nil), // 46: teleport.devicetrust.v1.TPMPlatformParameters
|
||||
(*AuthenticateDeviceChallengeResponse)(nil), // 47: teleport.devicetrust.v1.AuthenticateDeviceChallengeResponse
|
||||
(*TPMAuthenticateDeviceChallengeResponse)(nil), // 48: teleport.devicetrust.v1.TPMAuthenticateDeviceChallengeResponse
|
||||
(*AuthenticateDeviceChallenge)(nil), // 49: teleport.devicetrust.v1.AuthenticateDeviceChallenge
|
||||
(*UserCertificates)(nil), // 50: teleport.devicetrust.v1.UserCertificates
|
||||
(*TPMAuthenticateDeviceChallenge)(nil), // 51: teleport.devicetrust.v1.TPMAuthenticateDeviceChallenge
|
||||
(*DeviceConfirmationToken)(nil), // 52: teleport.devicetrust.v1.DeviceConfirmationToken
|
||||
(*DeviceWebToken)(nil), // 53: teleport.devicetrust.v1.DeviceWebToken
|
||||
(*DeviceSource)(nil), // 54: teleport.devicetrust.v1.DeviceSource
|
||||
(OSType)(0), // 55: teleport.devicetrust.v1.OSType
|
||||
(*emptypb.Empty)(nil), // 56: google.protobuf.Empty
|
||||
(*DeviceEnrollToken)(nil), // 57: teleport.devicetrust.v1.DeviceEnrollToken
|
||||
(*CreateEnrollPairingRequest)(nil), // 41: teleport.devicetrust.v1.CreateEnrollPairingRequest
|
||||
(*CreateEnrollPairingResponse)(nil), // 42: teleport.devicetrust.v1.CreateEnrollPairingResponse
|
||||
(*GetCurrentEnrollPairingRequest)(nil), // 43: teleport.devicetrust.v1.GetCurrentEnrollPairingRequest
|
||||
(*GetCurrentEnrollPairingResponse)(nil), // 44: teleport.devicetrust.v1.GetCurrentEnrollPairingResponse
|
||||
(*Device)(nil), // 45: teleport.devicetrust.v1.Device
|
||||
(*timestamppb.Timestamp)(nil), // 46: google.protobuf.Timestamp
|
||||
(*fieldmaskpb.FieldMask)(nil), // 47: google.protobuf.FieldMask
|
||||
(*status.Status)(nil), // 48: google.rpc.Status
|
||||
(*DeviceCollectedData)(nil), // 49: teleport.devicetrust.v1.DeviceCollectedData
|
||||
(*TPMPlatformParameters)(nil), // 50: teleport.devicetrust.v1.TPMPlatformParameters
|
||||
(*AuthenticateDeviceChallengeResponse)(nil), // 51: teleport.devicetrust.v1.AuthenticateDeviceChallengeResponse
|
||||
(*TPMAuthenticateDeviceChallengeResponse)(nil), // 52: teleport.devicetrust.v1.TPMAuthenticateDeviceChallengeResponse
|
||||
(*AuthenticateDeviceChallenge)(nil), // 53: teleport.devicetrust.v1.AuthenticateDeviceChallenge
|
||||
(*UserCertificates)(nil), // 54: teleport.devicetrust.v1.UserCertificates
|
||||
(*TPMAuthenticateDeviceChallenge)(nil), // 55: teleport.devicetrust.v1.TPMAuthenticateDeviceChallenge
|
||||
(*DeviceConfirmationToken)(nil), // 56: teleport.devicetrust.v1.DeviceConfirmationToken
|
||||
(*DeviceWebToken)(nil), // 57: teleport.devicetrust.v1.DeviceWebToken
|
||||
(*DeviceSource)(nil), // 58: teleport.devicetrust.v1.DeviceSource
|
||||
(OSType)(0), // 59: teleport.devicetrust.v1.OSType
|
||||
(*EnrollPairing)(nil), // 60: teleport.devicetrust.v1.EnrollPairing
|
||||
(*emptypb.Empty)(nil), // 61: google.protobuf.Empty
|
||||
(*DeviceEnrollToken)(nil), // 62: teleport.devicetrust.v1.DeviceEnrollToken
|
||||
}
|
||||
var file_teleport_devicetrust_v1_devicetrust_service_proto_depIdxs = []int32{
|
||||
41, // 0: teleport.devicetrust.v1.CreateDeviceRequest.device:type_name -> teleport.devicetrust.v1.Device
|
||||
42, // 1: teleport.devicetrust.v1.CreateDeviceRequest.enroll_token_expire_time:type_name -> google.protobuf.Timestamp
|
||||
41, // 2: teleport.devicetrust.v1.UpdateDeviceRequest.device:type_name -> teleport.devicetrust.v1.Device
|
||||
43, // 3: teleport.devicetrust.v1.UpdateDeviceRequest.update_mask:type_name -> google.protobuf.FieldMask
|
||||
41, // 4: teleport.devicetrust.v1.UpsertDeviceRequest.device:type_name -> teleport.devicetrust.v1.Device
|
||||
41, // 5: teleport.devicetrust.v1.FindDevicesResponse.devices:type_name -> teleport.devicetrust.v1.Device
|
||||
45, // 0: teleport.devicetrust.v1.CreateDeviceRequest.device:type_name -> teleport.devicetrust.v1.Device
|
||||
46, // 1: teleport.devicetrust.v1.CreateDeviceRequest.enroll_token_expire_time:type_name -> google.protobuf.Timestamp
|
||||
45, // 2: teleport.devicetrust.v1.UpdateDeviceRequest.device:type_name -> teleport.devicetrust.v1.Device
|
||||
47, // 3: teleport.devicetrust.v1.UpdateDeviceRequest.update_mask:type_name -> google.protobuf.FieldMask
|
||||
45, // 4: teleport.devicetrust.v1.UpsertDeviceRequest.device:type_name -> teleport.devicetrust.v1.Device
|
||||
45, // 5: teleport.devicetrust.v1.FindDevicesResponse.devices:type_name -> teleport.devicetrust.v1.Device
|
||||
0, // 6: teleport.devicetrust.v1.ListDevicesRequest.view:type_name -> teleport.devicetrust.v1.DeviceView
|
||||
41, // 7: teleport.devicetrust.v1.ListDevicesResponse.devices:type_name -> teleport.devicetrust.v1.Device
|
||||
41, // 8: teleport.devicetrust.v1.ListDevicesByUserResponse.devices:type_name -> teleport.devicetrust.v1.Device
|
||||
41, // 9: teleport.devicetrust.v1.BulkCreateDevicesRequest.devices:type_name -> teleport.devicetrust.v1.Device
|
||||
45, // 7: teleport.devicetrust.v1.ListDevicesResponse.devices:type_name -> teleport.devicetrust.v1.Device
|
||||
45, // 8: teleport.devicetrust.v1.ListDevicesByUserResponse.devices:type_name -> teleport.devicetrust.v1.Device
|
||||
45, // 9: teleport.devicetrust.v1.BulkCreateDevicesRequest.devices:type_name -> teleport.devicetrust.v1.Device
|
||||
14, // 10: teleport.devicetrust.v1.BulkCreateDevicesResponse.devices:type_name -> teleport.devicetrust.v1.DeviceOrStatus
|
||||
44, // 11: teleport.devicetrust.v1.DeviceOrStatus.status:type_name -> google.rpc.Status
|
||||
45, // 12: teleport.devicetrust.v1.CreateDeviceEnrollTokenRequest.device_data:type_name -> teleport.devicetrust.v1.DeviceCollectedData
|
||||
42, // 13: teleport.devicetrust.v1.CreateDeviceEnrollTokenRequest.expire_time:type_name -> google.protobuf.Timestamp
|
||||
48, // 11: teleport.devicetrust.v1.DeviceOrStatus.status:type_name -> google.rpc.Status
|
||||
49, // 12: teleport.devicetrust.v1.CreateDeviceEnrollTokenRequest.device_data:type_name -> teleport.devicetrust.v1.DeviceCollectedData
|
||||
46, // 13: teleport.devicetrust.v1.CreateDeviceEnrollTokenRequest.expire_time:type_name -> google.protobuf.Timestamp
|
||||
18, // 14: teleport.devicetrust.v1.EnrollDeviceRequest.init:type_name -> teleport.devicetrust.v1.EnrollDeviceInit
|
||||
22, // 15: teleport.devicetrust.v1.EnrollDeviceRequest.macos_challenge_response:type_name -> teleport.devicetrust.v1.MacOSEnrollChallengeResponse
|
||||
27, // 16: teleport.devicetrust.v1.EnrollDeviceRequest.tpm_challenge_response:type_name -> teleport.devicetrust.v1.TPMEnrollChallengeResponse
|
||||
19, // 17: teleport.devicetrust.v1.EnrollDeviceResponse.success:type_name -> teleport.devicetrust.v1.EnrollDeviceSuccess
|
||||
21, // 18: teleport.devicetrust.v1.EnrollDeviceResponse.macos_challenge:type_name -> teleport.devicetrust.v1.MacOSEnrollChallenge
|
||||
25, // 19: teleport.devicetrust.v1.EnrollDeviceResponse.tpm_challenge:type_name -> teleport.devicetrust.v1.TPMEnrollChallenge
|
||||
45, // 20: teleport.devicetrust.v1.EnrollDeviceInit.device_data:type_name -> teleport.devicetrust.v1.DeviceCollectedData
|
||||
49, // 20: teleport.devicetrust.v1.EnrollDeviceInit.device_data:type_name -> teleport.devicetrust.v1.DeviceCollectedData
|
||||
20, // 21: teleport.devicetrust.v1.EnrollDeviceInit.macos:type_name -> teleport.devicetrust.v1.MacOSEnrollPayload
|
||||
23, // 22: teleport.devicetrust.v1.EnrollDeviceInit.tpm:type_name -> teleport.devicetrust.v1.TPMEnrollPayload
|
||||
41, // 23: teleport.devicetrust.v1.EnrollDeviceSuccess.device:type_name -> teleport.devicetrust.v1.Device
|
||||
45, // 23: teleport.devicetrust.v1.EnrollDeviceSuccess.device:type_name -> teleport.devicetrust.v1.Device
|
||||
24, // 24: teleport.devicetrust.v1.TPMEnrollPayload.attestation_parameters:type_name -> teleport.devicetrust.v1.TPMAttestationParameters
|
||||
26, // 25: teleport.devicetrust.v1.TPMEnrollChallenge.encrypted_credential:type_name -> teleport.devicetrust.v1.TPMEncryptedCredential
|
||||
46, // 26: teleport.devicetrust.v1.TPMEnrollChallengeResponse.platform_parameters:type_name -> teleport.devicetrust.v1.TPMPlatformParameters
|
||||
50, // 26: teleport.devicetrust.v1.TPMEnrollChallengeResponse.platform_parameters:type_name -> teleport.devicetrust.v1.TPMPlatformParameters
|
||||
30, // 27: teleport.devicetrust.v1.AuthenticateDeviceRequest.init:type_name -> teleport.devicetrust.v1.AuthenticateDeviceInit
|
||||
47, // 28: teleport.devicetrust.v1.AuthenticateDeviceRequest.challenge_response:type_name -> teleport.devicetrust.v1.AuthenticateDeviceChallengeResponse
|
||||
48, // 29: teleport.devicetrust.v1.AuthenticateDeviceRequest.tpm_challenge_response:type_name -> teleport.devicetrust.v1.TPMAuthenticateDeviceChallengeResponse
|
||||
49, // 30: teleport.devicetrust.v1.AuthenticateDeviceResponse.challenge:type_name -> teleport.devicetrust.v1.AuthenticateDeviceChallenge
|
||||
50, // 31: teleport.devicetrust.v1.AuthenticateDeviceResponse.user_certificates:type_name -> teleport.devicetrust.v1.UserCertificates
|
||||
51, // 32: teleport.devicetrust.v1.AuthenticateDeviceResponse.tpm_challenge:type_name -> teleport.devicetrust.v1.TPMAuthenticateDeviceChallenge
|
||||
52, // 33: teleport.devicetrust.v1.AuthenticateDeviceResponse.confirmation_token:type_name -> teleport.devicetrust.v1.DeviceConfirmationToken
|
||||
50, // 34: teleport.devicetrust.v1.AuthenticateDeviceInit.user_certificates:type_name -> teleport.devicetrust.v1.UserCertificates
|
||||
45, // 35: teleport.devicetrust.v1.AuthenticateDeviceInit.device_data:type_name -> teleport.devicetrust.v1.DeviceCollectedData
|
||||
53, // 36: teleport.devicetrust.v1.AuthenticateDeviceInit.device_web_token:type_name -> teleport.devicetrust.v1.DeviceWebToken
|
||||
52, // 37: teleport.devicetrust.v1.ConfirmDeviceWebAuthenticationRequest.confirmation_token:type_name -> teleport.devicetrust.v1.DeviceConfirmationToken
|
||||
51, // 28: teleport.devicetrust.v1.AuthenticateDeviceRequest.challenge_response:type_name -> teleport.devicetrust.v1.AuthenticateDeviceChallengeResponse
|
||||
52, // 29: teleport.devicetrust.v1.AuthenticateDeviceRequest.tpm_challenge_response:type_name -> teleport.devicetrust.v1.TPMAuthenticateDeviceChallengeResponse
|
||||
53, // 30: teleport.devicetrust.v1.AuthenticateDeviceResponse.challenge:type_name -> teleport.devicetrust.v1.AuthenticateDeviceChallenge
|
||||
54, // 31: teleport.devicetrust.v1.AuthenticateDeviceResponse.user_certificates:type_name -> teleport.devicetrust.v1.UserCertificates
|
||||
55, // 32: teleport.devicetrust.v1.AuthenticateDeviceResponse.tpm_challenge:type_name -> teleport.devicetrust.v1.TPMAuthenticateDeviceChallenge
|
||||
56, // 33: teleport.devicetrust.v1.AuthenticateDeviceResponse.confirmation_token:type_name -> teleport.devicetrust.v1.DeviceConfirmationToken
|
||||
54, // 34: teleport.devicetrust.v1.AuthenticateDeviceInit.user_certificates:type_name -> teleport.devicetrust.v1.UserCertificates
|
||||
49, // 35: teleport.devicetrust.v1.AuthenticateDeviceInit.device_data:type_name -> teleport.devicetrust.v1.DeviceCollectedData
|
||||
57, // 36: teleport.devicetrust.v1.AuthenticateDeviceInit.device_web_token:type_name -> teleport.devicetrust.v1.DeviceWebToken
|
||||
56, // 37: teleport.devicetrust.v1.ConfirmDeviceWebAuthenticationRequest.confirmation_token:type_name -> teleport.devicetrust.v1.DeviceConfirmationToken
|
||||
35, // 38: teleport.devicetrust.v1.SyncInventoryRequest.start:type_name -> teleport.devicetrust.v1.SyncInventoryStart
|
||||
36, // 39: teleport.devicetrust.v1.SyncInventoryRequest.end:type_name -> teleport.devicetrust.v1.SyncInventoryEnd
|
||||
37, // 40: teleport.devicetrust.v1.SyncInventoryRequest.devices_to_upsert:type_name -> teleport.devicetrust.v1.SyncInventoryDevices
|
||||
@@ -4932,44 +5173,50 @@ var file_teleport_devicetrust_v1_devicetrust_service_proto_depIdxs = []int32{
|
||||
38, // 42: teleport.devicetrust.v1.SyncInventoryResponse.ack:type_name -> teleport.devicetrust.v1.SyncInventoryAck
|
||||
39, // 43: teleport.devicetrust.v1.SyncInventoryResponse.result:type_name -> teleport.devicetrust.v1.SyncInventoryResult
|
||||
40, // 44: teleport.devicetrust.v1.SyncInventoryResponse.missing_devices:type_name -> teleport.devicetrust.v1.SyncInventoryMissingDevices
|
||||
54, // 45: teleport.devicetrust.v1.SyncInventoryStart.source:type_name -> teleport.devicetrust.v1.DeviceSource
|
||||
55, // 46: teleport.devicetrust.v1.SyncInventoryStart.os_types:type_name -> teleport.devicetrust.v1.OSType
|
||||
41, // 47: teleport.devicetrust.v1.SyncInventoryDevices.devices:type_name -> teleport.devicetrust.v1.Device
|
||||
58, // 45: teleport.devicetrust.v1.SyncInventoryStart.source:type_name -> teleport.devicetrust.v1.DeviceSource
|
||||
59, // 46: teleport.devicetrust.v1.SyncInventoryStart.os_types:type_name -> teleport.devicetrust.v1.OSType
|
||||
45, // 47: teleport.devicetrust.v1.SyncInventoryDevices.devices:type_name -> teleport.devicetrust.v1.Device
|
||||
14, // 48: teleport.devicetrust.v1.SyncInventoryResult.devices:type_name -> teleport.devicetrust.v1.DeviceOrStatus
|
||||
41, // 49: teleport.devicetrust.v1.SyncInventoryMissingDevices.devices:type_name -> teleport.devicetrust.v1.Device
|
||||
1, // 50: teleport.devicetrust.v1.DeviceTrustService.CreateDevice:input_type -> teleport.devicetrust.v1.CreateDeviceRequest
|
||||
2, // 51: teleport.devicetrust.v1.DeviceTrustService.UpdateDevice:input_type -> teleport.devicetrust.v1.UpdateDeviceRequest
|
||||
3, // 52: teleport.devicetrust.v1.DeviceTrustService.UpsertDevice:input_type -> teleport.devicetrust.v1.UpsertDeviceRequest
|
||||
4, // 53: teleport.devicetrust.v1.DeviceTrustService.DeleteDevice:input_type -> teleport.devicetrust.v1.DeleteDeviceRequest
|
||||
5, // 54: teleport.devicetrust.v1.DeviceTrustService.FindDevices:input_type -> teleport.devicetrust.v1.FindDevicesRequest
|
||||
7, // 55: teleport.devicetrust.v1.DeviceTrustService.GetDevice:input_type -> teleport.devicetrust.v1.GetDeviceRequest
|
||||
8, // 56: teleport.devicetrust.v1.DeviceTrustService.ListDevices:input_type -> teleport.devicetrust.v1.ListDevicesRequest
|
||||
10, // 57: teleport.devicetrust.v1.DeviceTrustService.ListDevicesByUser:input_type -> teleport.devicetrust.v1.ListDevicesByUserRequest
|
||||
12, // 58: teleport.devicetrust.v1.DeviceTrustService.BulkCreateDevices:input_type -> teleport.devicetrust.v1.BulkCreateDevicesRequest
|
||||
15, // 59: teleport.devicetrust.v1.DeviceTrustService.CreateDeviceEnrollToken:input_type -> teleport.devicetrust.v1.CreateDeviceEnrollTokenRequest
|
||||
16, // 60: teleport.devicetrust.v1.DeviceTrustService.EnrollDevice:input_type -> teleport.devicetrust.v1.EnrollDeviceRequest
|
||||
28, // 61: teleport.devicetrust.v1.DeviceTrustService.AuthenticateDevice:input_type -> teleport.devicetrust.v1.AuthenticateDeviceRequest
|
||||
31, // 62: teleport.devicetrust.v1.DeviceTrustService.ConfirmDeviceWebAuthentication:input_type -> teleport.devicetrust.v1.ConfirmDeviceWebAuthenticationRequest
|
||||
33, // 63: teleport.devicetrust.v1.DeviceTrustService.SyncInventory:input_type -> teleport.devicetrust.v1.SyncInventoryRequest
|
||||
41, // 64: teleport.devicetrust.v1.DeviceTrustService.CreateDevice:output_type -> teleport.devicetrust.v1.Device
|
||||
41, // 65: teleport.devicetrust.v1.DeviceTrustService.UpdateDevice:output_type -> teleport.devicetrust.v1.Device
|
||||
41, // 66: teleport.devicetrust.v1.DeviceTrustService.UpsertDevice:output_type -> teleport.devicetrust.v1.Device
|
||||
56, // 67: teleport.devicetrust.v1.DeviceTrustService.DeleteDevice:output_type -> google.protobuf.Empty
|
||||
6, // 68: teleport.devicetrust.v1.DeviceTrustService.FindDevices:output_type -> teleport.devicetrust.v1.FindDevicesResponse
|
||||
41, // 69: teleport.devicetrust.v1.DeviceTrustService.GetDevice:output_type -> teleport.devicetrust.v1.Device
|
||||
9, // 70: teleport.devicetrust.v1.DeviceTrustService.ListDevices:output_type -> teleport.devicetrust.v1.ListDevicesResponse
|
||||
11, // 71: teleport.devicetrust.v1.DeviceTrustService.ListDevicesByUser:output_type -> teleport.devicetrust.v1.ListDevicesByUserResponse
|
||||
13, // 72: teleport.devicetrust.v1.DeviceTrustService.BulkCreateDevices:output_type -> teleport.devicetrust.v1.BulkCreateDevicesResponse
|
||||
57, // 73: teleport.devicetrust.v1.DeviceTrustService.CreateDeviceEnrollToken:output_type -> teleport.devicetrust.v1.DeviceEnrollToken
|
||||
17, // 74: teleport.devicetrust.v1.DeviceTrustService.EnrollDevice:output_type -> teleport.devicetrust.v1.EnrollDeviceResponse
|
||||
29, // 75: teleport.devicetrust.v1.DeviceTrustService.AuthenticateDevice:output_type -> teleport.devicetrust.v1.AuthenticateDeviceResponse
|
||||
32, // 76: teleport.devicetrust.v1.DeviceTrustService.ConfirmDeviceWebAuthentication:output_type -> teleport.devicetrust.v1.ConfirmDeviceWebAuthenticationResponse
|
||||
34, // 77: teleport.devicetrust.v1.DeviceTrustService.SyncInventory:output_type -> teleport.devicetrust.v1.SyncInventoryResponse
|
||||
64, // [64:78] is the sub-list for method output_type
|
||||
50, // [50:64] is the sub-list for method input_type
|
||||
50, // [50:50] is the sub-list for extension type_name
|
||||
50, // [50:50] is the sub-list for extension extendee
|
||||
0, // [0:50] is the sub-list for field type_name
|
||||
45, // 49: teleport.devicetrust.v1.SyncInventoryMissingDevices.devices:type_name -> teleport.devicetrust.v1.Device
|
||||
60, // 50: teleport.devicetrust.v1.CreateEnrollPairingResponse.enroll_pairing:type_name -> teleport.devicetrust.v1.EnrollPairing
|
||||
60, // 51: teleport.devicetrust.v1.GetCurrentEnrollPairingResponse.enroll_pairing:type_name -> teleport.devicetrust.v1.EnrollPairing
|
||||
1, // 52: teleport.devicetrust.v1.DeviceTrustService.CreateDevice:input_type -> teleport.devicetrust.v1.CreateDeviceRequest
|
||||
2, // 53: teleport.devicetrust.v1.DeviceTrustService.UpdateDevice:input_type -> teleport.devicetrust.v1.UpdateDeviceRequest
|
||||
3, // 54: teleport.devicetrust.v1.DeviceTrustService.UpsertDevice:input_type -> teleport.devicetrust.v1.UpsertDeviceRequest
|
||||
4, // 55: teleport.devicetrust.v1.DeviceTrustService.DeleteDevice:input_type -> teleport.devicetrust.v1.DeleteDeviceRequest
|
||||
5, // 56: teleport.devicetrust.v1.DeviceTrustService.FindDevices:input_type -> teleport.devicetrust.v1.FindDevicesRequest
|
||||
7, // 57: teleport.devicetrust.v1.DeviceTrustService.GetDevice:input_type -> teleport.devicetrust.v1.GetDeviceRequest
|
||||
8, // 58: teleport.devicetrust.v1.DeviceTrustService.ListDevices:input_type -> teleport.devicetrust.v1.ListDevicesRequest
|
||||
10, // 59: teleport.devicetrust.v1.DeviceTrustService.ListDevicesByUser:input_type -> teleport.devicetrust.v1.ListDevicesByUserRequest
|
||||
12, // 60: teleport.devicetrust.v1.DeviceTrustService.BulkCreateDevices:input_type -> teleport.devicetrust.v1.BulkCreateDevicesRequest
|
||||
15, // 61: teleport.devicetrust.v1.DeviceTrustService.CreateDeviceEnrollToken:input_type -> teleport.devicetrust.v1.CreateDeviceEnrollTokenRequest
|
||||
16, // 62: teleport.devicetrust.v1.DeviceTrustService.EnrollDevice:input_type -> teleport.devicetrust.v1.EnrollDeviceRequest
|
||||
28, // 63: teleport.devicetrust.v1.DeviceTrustService.AuthenticateDevice:input_type -> teleport.devicetrust.v1.AuthenticateDeviceRequest
|
||||
31, // 64: teleport.devicetrust.v1.DeviceTrustService.ConfirmDeviceWebAuthentication:input_type -> teleport.devicetrust.v1.ConfirmDeviceWebAuthenticationRequest
|
||||
33, // 65: teleport.devicetrust.v1.DeviceTrustService.SyncInventory:input_type -> teleport.devicetrust.v1.SyncInventoryRequest
|
||||
41, // 66: teleport.devicetrust.v1.DeviceTrustService.CreateEnrollPairing:input_type -> teleport.devicetrust.v1.CreateEnrollPairingRequest
|
||||
43, // 67: teleport.devicetrust.v1.DeviceTrustService.GetCurrentEnrollPairing:input_type -> teleport.devicetrust.v1.GetCurrentEnrollPairingRequest
|
||||
45, // 68: teleport.devicetrust.v1.DeviceTrustService.CreateDevice:output_type -> teleport.devicetrust.v1.Device
|
||||
45, // 69: teleport.devicetrust.v1.DeviceTrustService.UpdateDevice:output_type -> teleport.devicetrust.v1.Device
|
||||
45, // 70: teleport.devicetrust.v1.DeviceTrustService.UpsertDevice:output_type -> teleport.devicetrust.v1.Device
|
||||
61, // 71: teleport.devicetrust.v1.DeviceTrustService.DeleteDevice:output_type -> google.protobuf.Empty
|
||||
6, // 72: teleport.devicetrust.v1.DeviceTrustService.FindDevices:output_type -> teleport.devicetrust.v1.FindDevicesResponse
|
||||
45, // 73: teleport.devicetrust.v1.DeviceTrustService.GetDevice:output_type -> teleport.devicetrust.v1.Device
|
||||
9, // 74: teleport.devicetrust.v1.DeviceTrustService.ListDevices:output_type -> teleport.devicetrust.v1.ListDevicesResponse
|
||||
11, // 75: teleport.devicetrust.v1.DeviceTrustService.ListDevicesByUser:output_type -> teleport.devicetrust.v1.ListDevicesByUserResponse
|
||||
13, // 76: teleport.devicetrust.v1.DeviceTrustService.BulkCreateDevices:output_type -> teleport.devicetrust.v1.BulkCreateDevicesResponse
|
||||
62, // 77: teleport.devicetrust.v1.DeviceTrustService.CreateDeviceEnrollToken:output_type -> teleport.devicetrust.v1.DeviceEnrollToken
|
||||
17, // 78: teleport.devicetrust.v1.DeviceTrustService.EnrollDevice:output_type -> teleport.devicetrust.v1.EnrollDeviceResponse
|
||||
29, // 79: teleport.devicetrust.v1.DeviceTrustService.AuthenticateDevice:output_type -> teleport.devicetrust.v1.AuthenticateDeviceResponse
|
||||
32, // 80: teleport.devicetrust.v1.DeviceTrustService.ConfirmDeviceWebAuthentication:output_type -> teleport.devicetrust.v1.ConfirmDeviceWebAuthenticationResponse
|
||||
34, // 81: teleport.devicetrust.v1.DeviceTrustService.SyncInventory:output_type -> teleport.devicetrust.v1.SyncInventoryResponse
|
||||
42, // 82: teleport.devicetrust.v1.DeviceTrustService.CreateEnrollPairing:output_type -> teleport.devicetrust.v1.CreateEnrollPairingResponse
|
||||
44, // 83: teleport.devicetrust.v1.DeviceTrustService.GetCurrentEnrollPairing:output_type -> teleport.devicetrust.v1.GetCurrentEnrollPairingResponse
|
||||
68, // [68:84] is the sub-list for method output_type
|
||||
52, // [52:68] is the sub-list for method input_type
|
||||
52, // [52:52] is the sub-list for extension type_name
|
||||
52, // [52:52] is the sub-list for extension extendee
|
||||
0, // [0:52] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_teleport_devicetrust_v1_devicetrust_service_proto_init() }
|
||||
@@ -4984,6 +5231,7 @@ func file_teleport_devicetrust_v1_devicetrust_service_proto_init() {
|
||||
file_teleport_devicetrust_v1_device_enroll_token_proto_init()
|
||||
file_teleport_devicetrust_v1_device_source_proto_init()
|
||||
file_teleport_devicetrust_v1_device_web_token_proto_init()
|
||||
file_teleport_devicetrust_v1_enroll_pairing_proto_init()
|
||||
file_teleport_devicetrust_v1_os_type_proto_init()
|
||||
file_teleport_devicetrust_v1_tpm_proto_init()
|
||||
file_teleport_devicetrust_v1_user_certificates_proto_init()
|
||||
@@ -5029,7 +5277,7 @@ func file_teleport_devicetrust_v1_devicetrust_service_proto_init() {
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_teleport_devicetrust_v1_devicetrust_service_proto_rawDesc), len(file_teleport_devicetrust_v1_devicetrust_service_proto_rawDesc)),
|
||||
NumEnums: 1,
|
||||
NumMessages: 40,
|
||||
NumMessages: 44,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
|
||||
@@ -48,6 +48,8 @@ const (
|
||||
DeviceTrustService_AuthenticateDevice_FullMethodName = "/teleport.devicetrust.v1.DeviceTrustService/AuthenticateDevice"
|
||||
DeviceTrustService_ConfirmDeviceWebAuthentication_FullMethodName = "/teleport.devicetrust.v1.DeviceTrustService/ConfirmDeviceWebAuthentication"
|
||||
DeviceTrustService_SyncInventory_FullMethodName = "/teleport.devicetrust.v1.DeviceTrustService/SyncInventory"
|
||||
DeviceTrustService_CreateEnrollPairing_FullMethodName = "/teleport.devicetrust.v1.DeviceTrustService/CreateEnrollPairing"
|
||||
DeviceTrustService_GetCurrentEnrollPairing_FullMethodName = "/teleport.devicetrust.v1.DeviceTrustService/GetCurrentEnrollPairing"
|
||||
)
|
||||
|
||||
// DeviceTrustServiceClient is the client API for DeviceTrustService service.
|
||||
@@ -174,6 +176,21 @@ type DeviceTrustServiceClient interface {
|
||||
// Authorized either by a valid MDM service certificate or the appropriate
|
||||
// "device" permissions (create/update/delete).
|
||||
SyncInventory(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[SyncInventoryRequest, SyncInventoryResponse], error)
|
||||
// CreateEnrollPairing creates an enroll pairing for the calling user. The
|
||||
// returned EnrollPairing carries the pairing token that the Web UI encodes
|
||||
// into a QR code.
|
||||
//
|
||||
// Each user can have only one EnrollPairing at a time. The server overwrites
|
||||
// metadata.name with the caller's username.
|
||||
//
|
||||
// Returns AlreadyExists if an EnrollPairing already exists for the caller.
|
||||
//
|
||||
// Requires the "mobile_device.create_enroll_token" permission.
|
||||
CreateEnrollPairing(ctx context.Context, in *CreateEnrollPairingRequest, opts ...grpc.CallOption) (*CreateEnrollPairingResponse, error)
|
||||
// GetCurrentEnrollPairing returns the EnrollPairing for the calling user.
|
||||
//
|
||||
// Returns NotFound if the caller has no EnrollPairing.
|
||||
GetCurrentEnrollPairing(ctx context.Context, in *GetCurrentEnrollPairingRequest, opts ...grpc.CallOption) (*GetCurrentEnrollPairingResponse, error)
|
||||
}
|
||||
|
||||
type deviceTrustServiceClient struct {
|
||||
@@ -333,6 +350,26 @@ func (c *deviceTrustServiceClient) SyncInventory(ctx context.Context, opts ...gr
|
||||
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
||||
type DeviceTrustService_SyncInventoryClient = grpc.BidiStreamingClient[SyncInventoryRequest, SyncInventoryResponse]
|
||||
|
||||
func (c *deviceTrustServiceClient) CreateEnrollPairing(ctx context.Context, in *CreateEnrollPairingRequest, opts ...grpc.CallOption) (*CreateEnrollPairingResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(CreateEnrollPairingResponse)
|
||||
err := c.cc.Invoke(ctx, DeviceTrustService_CreateEnrollPairing_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *deviceTrustServiceClient) GetCurrentEnrollPairing(ctx context.Context, in *GetCurrentEnrollPairingRequest, opts ...grpc.CallOption) (*GetCurrentEnrollPairingResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(GetCurrentEnrollPairingResponse)
|
||||
err := c.cc.Invoke(ctx, DeviceTrustService_GetCurrentEnrollPairing_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// DeviceTrustServiceServer is the server API for DeviceTrustService service.
|
||||
// All implementations must embed UnimplementedDeviceTrustServiceServer
|
||||
// for forward compatibility.
|
||||
@@ -457,6 +494,21 @@ type DeviceTrustServiceServer interface {
|
||||
// Authorized either by a valid MDM service certificate or the appropriate
|
||||
// "device" permissions (create/update/delete).
|
||||
SyncInventory(grpc.BidiStreamingServer[SyncInventoryRequest, SyncInventoryResponse]) error
|
||||
// CreateEnrollPairing creates an enroll pairing for the calling user. The
|
||||
// returned EnrollPairing carries the pairing token that the Web UI encodes
|
||||
// into a QR code.
|
||||
//
|
||||
// Each user can have only one EnrollPairing at a time. The server overwrites
|
||||
// metadata.name with the caller's username.
|
||||
//
|
||||
// Returns AlreadyExists if an EnrollPairing already exists for the caller.
|
||||
//
|
||||
// Requires the "mobile_device.create_enroll_token" permission.
|
||||
CreateEnrollPairing(context.Context, *CreateEnrollPairingRequest) (*CreateEnrollPairingResponse, error)
|
||||
// GetCurrentEnrollPairing returns the EnrollPairing for the calling user.
|
||||
//
|
||||
// Returns NotFound if the caller has no EnrollPairing.
|
||||
GetCurrentEnrollPairing(context.Context, *GetCurrentEnrollPairingRequest) (*GetCurrentEnrollPairingResponse, error)
|
||||
mustEmbedUnimplementedDeviceTrustServiceServer()
|
||||
}
|
||||
|
||||
@@ -509,6 +561,12 @@ func (UnimplementedDeviceTrustServiceServer) ConfirmDeviceWebAuthentication(cont
|
||||
func (UnimplementedDeviceTrustServiceServer) SyncInventory(grpc.BidiStreamingServer[SyncInventoryRequest, SyncInventoryResponse]) error {
|
||||
return status.Errorf(codes.Unimplemented, "method SyncInventory not implemented")
|
||||
}
|
||||
func (UnimplementedDeviceTrustServiceServer) CreateEnrollPairing(context.Context, *CreateEnrollPairingRequest) (*CreateEnrollPairingResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreateEnrollPairing not implemented")
|
||||
}
|
||||
func (UnimplementedDeviceTrustServiceServer) GetCurrentEnrollPairing(context.Context, *GetCurrentEnrollPairingRequest) (*GetCurrentEnrollPairingResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetCurrentEnrollPairing not implemented")
|
||||
}
|
||||
func (UnimplementedDeviceTrustServiceServer) mustEmbedUnimplementedDeviceTrustServiceServer() {}
|
||||
func (UnimplementedDeviceTrustServiceServer) testEmbeddedByValue() {}
|
||||
|
||||
@@ -749,6 +807,42 @@ func _DeviceTrustService_SyncInventory_Handler(srv interface{}, stream grpc.Serv
|
||||
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
||||
type DeviceTrustService_SyncInventoryServer = grpc.BidiStreamingServer[SyncInventoryRequest, SyncInventoryResponse]
|
||||
|
||||
func _DeviceTrustService_CreateEnrollPairing_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CreateEnrollPairingRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DeviceTrustServiceServer).CreateEnrollPairing(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: DeviceTrustService_CreateEnrollPairing_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DeviceTrustServiceServer).CreateEnrollPairing(ctx, req.(*CreateEnrollPairingRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _DeviceTrustService_GetCurrentEnrollPairing_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetCurrentEnrollPairingRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DeviceTrustServiceServer).GetCurrentEnrollPairing(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: DeviceTrustService_GetCurrentEnrollPairing_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DeviceTrustServiceServer).GetCurrentEnrollPairing(ctx, req.(*GetCurrentEnrollPairingRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// DeviceTrustService_ServiceDesc is the grpc.ServiceDesc for DeviceTrustService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
@@ -800,6 +894,14 @@ var DeviceTrustService_ServiceDesc = grpc.ServiceDesc{
|
||||
MethodName: "ConfirmDeviceWebAuthentication",
|
||||
Handler: _DeviceTrustService_ConfirmDeviceWebAuthentication_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "CreateEnrollPairing",
|
||||
Handler: _DeviceTrustService_CreateEnrollPairing_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetCurrentEnrollPairing",
|
||||
Handler: _DeviceTrustService_GetCurrentEnrollPairing_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{
|
||||
{
|
||||
|
||||
@@ -4452,11 +4452,238 @@ func (b0 SyncInventoryMissingDevices_builder) Build() *SyncInventoryMissingDevic
|
||||
return m0
|
||||
}
|
||||
|
||||
// Request for CreateEnrollPairing.
|
||||
type CreateEnrollPairingRequest struct {
|
||||
state protoimpl.MessageState `protogen:"opaque.v1"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *CreateEnrollPairingRequest) Reset() {
|
||||
*x = CreateEnrollPairingRequest{}
|
||||
mi := &file_teleport_devicetrust_v1_devicetrust_service_proto_msgTypes[40]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *CreateEnrollPairingRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*CreateEnrollPairingRequest) ProtoMessage() {}
|
||||
|
||||
func (x *CreateEnrollPairingRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_teleport_devicetrust_v1_devicetrust_service_proto_msgTypes[40]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
type CreateEnrollPairingRequest_builder struct {
|
||||
_ [0]func() // Prevents comparability and use of unkeyed literals for the builder.
|
||||
|
||||
}
|
||||
|
||||
func (b0 CreateEnrollPairingRequest_builder) Build() *CreateEnrollPairingRequest {
|
||||
m0 := &CreateEnrollPairingRequest{}
|
||||
b, x := &b0, m0
|
||||
_, _ = b, x
|
||||
return m0
|
||||
}
|
||||
|
||||
// Response for CreateEnrollPairing.
|
||||
type CreateEnrollPairingResponse struct {
|
||||
state protoimpl.MessageState `protogen:"opaque.v1"`
|
||||
xxx_hidden_EnrollPairing *EnrollPairing `protobuf:"bytes,1,opt,name=enroll_pairing,json=enrollPairing,proto3"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *CreateEnrollPairingResponse) Reset() {
|
||||
*x = CreateEnrollPairingResponse{}
|
||||
mi := &file_teleport_devicetrust_v1_devicetrust_service_proto_msgTypes[41]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *CreateEnrollPairingResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*CreateEnrollPairingResponse) ProtoMessage() {}
|
||||
|
||||
func (x *CreateEnrollPairingResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_teleport_devicetrust_v1_devicetrust_service_proto_msgTypes[41]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
func (x *CreateEnrollPairingResponse) GetEnrollPairing() *EnrollPairing {
|
||||
if x != nil {
|
||||
return x.xxx_hidden_EnrollPairing
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *CreateEnrollPairingResponse) SetEnrollPairing(v *EnrollPairing) {
|
||||
x.xxx_hidden_EnrollPairing = v
|
||||
}
|
||||
|
||||
func (x *CreateEnrollPairingResponse) HasEnrollPairing() bool {
|
||||
if x == nil {
|
||||
return false
|
||||
}
|
||||
return x.xxx_hidden_EnrollPairing != nil
|
||||
}
|
||||
|
||||
func (x *CreateEnrollPairingResponse) ClearEnrollPairing() {
|
||||
x.xxx_hidden_EnrollPairing = nil
|
||||
}
|
||||
|
||||
type CreateEnrollPairingResponse_builder struct {
|
||||
_ [0]func() // Prevents comparability and use of unkeyed literals for the builder.
|
||||
|
||||
EnrollPairing *EnrollPairing
|
||||
}
|
||||
|
||||
func (b0 CreateEnrollPairingResponse_builder) Build() *CreateEnrollPairingResponse {
|
||||
m0 := &CreateEnrollPairingResponse{}
|
||||
b, x := &b0, m0
|
||||
_, _ = b, x
|
||||
x.xxx_hidden_EnrollPairing = b.EnrollPairing
|
||||
return m0
|
||||
}
|
||||
|
||||
// Request for GetCurrentEnrollPairing.
|
||||
type GetCurrentEnrollPairingRequest struct {
|
||||
state protoimpl.MessageState `protogen:"opaque.v1"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *GetCurrentEnrollPairingRequest) Reset() {
|
||||
*x = GetCurrentEnrollPairingRequest{}
|
||||
mi := &file_teleport_devicetrust_v1_devicetrust_service_proto_msgTypes[42]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GetCurrentEnrollPairingRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetCurrentEnrollPairingRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetCurrentEnrollPairingRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_teleport_devicetrust_v1_devicetrust_service_proto_msgTypes[42]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
type GetCurrentEnrollPairingRequest_builder struct {
|
||||
_ [0]func() // Prevents comparability and use of unkeyed literals for the builder.
|
||||
|
||||
}
|
||||
|
||||
func (b0 GetCurrentEnrollPairingRequest_builder) Build() *GetCurrentEnrollPairingRequest {
|
||||
m0 := &GetCurrentEnrollPairingRequest{}
|
||||
b, x := &b0, m0
|
||||
_, _ = b, x
|
||||
return m0
|
||||
}
|
||||
|
||||
// Response for GetCurrentEnrollPairing.
|
||||
type GetCurrentEnrollPairingResponse struct {
|
||||
state protoimpl.MessageState `protogen:"opaque.v1"`
|
||||
xxx_hidden_EnrollPairing *EnrollPairing `protobuf:"bytes,1,opt,name=enroll_pairing,json=enrollPairing,proto3"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *GetCurrentEnrollPairingResponse) Reset() {
|
||||
*x = GetCurrentEnrollPairingResponse{}
|
||||
mi := &file_teleport_devicetrust_v1_devicetrust_service_proto_msgTypes[43]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GetCurrentEnrollPairingResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetCurrentEnrollPairingResponse) ProtoMessage() {}
|
||||
|
||||
func (x *GetCurrentEnrollPairingResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_teleport_devicetrust_v1_devicetrust_service_proto_msgTypes[43]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
func (x *GetCurrentEnrollPairingResponse) GetEnrollPairing() *EnrollPairing {
|
||||
if x != nil {
|
||||
return x.xxx_hidden_EnrollPairing
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *GetCurrentEnrollPairingResponse) SetEnrollPairing(v *EnrollPairing) {
|
||||
x.xxx_hidden_EnrollPairing = v
|
||||
}
|
||||
|
||||
func (x *GetCurrentEnrollPairingResponse) HasEnrollPairing() bool {
|
||||
if x == nil {
|
||||
return false
|
||||
}
|
||||
return x.xxx_hidden_EnrollPairing != nil
|
||||
}
|
||||
|
||||
func (x *GetCurrentEnrollPairingResponse) ClearEnrollPairing() {
|
||||
x.xxx_hidden_EnrollPairing = nil
|
||||
}
|
||||
|
||||
type GetCurrentEnrollPairingResponse_builder struct {
|
||||
_ [0]func() // Prevents comparability and use of unkeyed literals for the builder.
|
||||
|
||||
// Current EnrollPairing for the calling user.
|
||||
EnrollPairing *EnrollPairing
|
||||
}
|
||||
|
||||
func (b0 GetCurrentEnrollPairingResponse_builder) Build() *GetCurrentEnrollPairingResponse {
|
||||
m0 := &GetCurrentEnrollPairingResponse{}
|
||||
b, x := &b0, m0
|
||||
_, _ = b, x
|
||||
x.xxx_hidden_EnrollPairing = b.EnrollPairing
|
||||
return m0
|
||||
}
|
||||
|
||||
var File_teleport_devicetrust_v1_devicetrust_service_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_teleport_devicetrust_v1_devicetrust_service_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"1teleport/devicetrust/v1/devicetrust_service.proto\x12\x17teleport.devicetrust.v1\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\x1a4teleport/devicetrust/v1/authenticate_challenge.proto\x1a$teleport/devicetrust/v1/device.proto\x1a3teleport/devicetrust/v1/device_collected_data.proto\x1a7teleport/devicetrust/v1/device_confirmation_token.proto\x1a1teleport/devicetrust/v1/device_enroll_token.proto\x1a+teleport/devicetrust/v1/device_source.proto\x1a.teleport/devicetrust/v1/device_web_token.proto\x1a%teleport/devicetrust/v1/os_type.proto\x1a!teleport/devicetrust/v1/tpm.proto\x1a/teleport/devicetrust/v1/user_certificates.proto\"\x81\x02\n" +
|
||||
"1teleport/devicetrust/v1/devicetrust_service.proto\x12\x17teleport.devicetrust.v1\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\x1a4teleport/devicetrust/v1/authenticate_challenge.proto\x1a$teleport/devicetrust/v1/device.proto\x1a3teleport/devicetrust/v1/device_collected_data.proto\x1a7teleport/devicetrust/v1/device_confirmation_token.proto\x1a1teleport/devicetrust/v1/device_enroll_token.proto\x1a+teleport/devicetrust/v1/device_source.proto\x1a.teleport/devicetrust/v1/device_web_token.proto\x1a,teleport/devicetrust/v1/enroll_pairing.proto\x1a%teleport/devicetrust/v1/os_type.proto\x1a!teleport/devicetrust/v1/tpm.proto\x1a/teleport/devicetrust/v1/user_certificates.proto\"\x81\x02\n" +
|
||||
"\x13CreateDeviceRequest\x127\n" +
|
||||
"\x06device\x18\x01 \x01(\v2\x1f.teleport.devicetrust.v1.DeviceR\x06device\x12.\n" +
|
||||
"\x13create_enroll_token\x18\x02 \x01(\bR\x11createEnrollToken\x12,\n" +
|
||||
@@ -4595,12 +4822,18 @@ const file_teleport_devicetrust_v1_devicetrust_service_proto_rawDesc = "" +
|
||||
"\x13SyncInventoryResult\x12A\n" +
|
||||
"\adevices\x18\x01 \x03(\v2'.teleport.devicetrust.v1.DeviceOrStatusR\adevices\"X\n" +
|
||||
"\x1bSyncInventoryMissingDevices\x129\n" +
|
||||
"\adevices\x18\x01 \x03(\v2\x1f.teleport.devicetrust.v1.DeviceR\adevices*Y\n" +
|
||||
"\adevices\x18\x01 \x03(\v2\x1f.teleport.devicetrust.v1.DeviceR\adevices\"\x1c\n" +
|
||||
"\x1aCreateEnrollPairingRequest\"l\n" +
|
||||
"\x1bCreateEnrollPairingResponse\x12M\n" +
|
||||
"\x0eenroll_pairing\x18\x01 \x01(\v2&.teleport.devicetrust.v1.EnrollPairingR\renrollPairing\" \n" +
|
||||
"\x1eGetCurrentEnrollPairingRequest\"p\n" +
|
||||
"\x1fGetCurrentEnrollPairingResponse\x12M\n" +
|
||||
"\x0eenroll_pairing\x18\x01 \x01(\v2&.teleport.devicetrust.v1.EnrollPairingR\renrollPairing*Y\n" +
|
||||
"\n" +
|
||||
"DeviceView\x12\x1b\n" +
|
||||
"\x17DEVICE_VIEW_UNSPECIFIED\x10\x00\x12\x14\n" +
|
||||
"\x10DEVICE_VIEW_LIST\x10\x01\x12\x18\n" +
|
||||
"\x14DEVICE_VIEW_RESOURCE\x10\x022\xb9\f\n" +
|
||||
"\x14DEVICE_VIEW_RESOURCE\x10\x022\xcb\x0e\n" +
|
||||
"\x12DeviceTrustService\x12]\n" +
|
||||
"\fCreateDevice\x12,.teleport.devicetrust.v1.CreateDeviceRequest\x1a\x1f.teleport.devicetrust.v1.Device\x12]\n" +
|
||||
"\fUpdateDevice\x12,.teleport.devicetrust.v1.UpdateDeviceRequest\x1a\x1f.teleport.devicetrust.v1.Device\x12]\n" +
|
||||
@@ -4615,10 +4848,12 @@ const file_teleport_devicetrust_v1_devicetrust_service_proto_rawDesc = "" +
|
||||
"\fEnrollDevice\x12,.teleport.devicetrust.v1.EnrollDeviceRequest\x1a-.teleport.devicetrust.v1.EnrollDeviceResponse(\x010\x01\x12\x81\x01\n" +
|
||||
"\x12AuthenticateDevice\x122.teleport.devicetrust.v1.AuthenticateDeviceRequest\x1a3.teleport.devicetrust.v1.AuthenticateDeviceResponse(\x010\x01\x12\xa1\x01\n" +
|
||||
"\x1eConfirmDeviceWebAuthentication\x12>.teleport.devicetrust.v1.ConfirmDeviceWebAuthenticationRequest\x1a?.teleport.devicetrust.v1.ConfirmDeviceWebAuthenticationResponse\x12r\n" +
|
||||
"\rSyncInventory\x12-.teleport.devicetrust.v1.SyncInventoryRequest\x1a..teleport.devicetrust.v1.SyncInventoryResponse(\x010\x01BZZXgithub.com/gravitational/teleport/api/gen/proto/go/teleport/devicetrust/v1;devicetrustv1b\x06proto3"
|
||||
"\rSyncInventory\x12-.teleport.devicetrust.v1.SyncInventoryRequest\x1a..teleport.devicetrust.v1.SyncInventoryResponse(\x010\x01\x12\x80\x01\n" +
|
||||
"\x13CreateEnrollPairing\x123.teleport.devicetrust.v1.CreateEnrollPairingRequest\x1a4.teleport.devicetrust.v1.CreateEnrollPairingResponse\x12\x8c\x01\n" +
|
||||
"\x17GetCurrentEnrollPairing\x127.teleport.devicetrust.v1.GetCurrentEnrollPairingRequest\x1a8.teleport.devicetrust.v1.GetCurrentEnrollPairingResponseBZZXgithub.com/gravitational/teleport/api/gen/proto/go/teleport/devicetrust/v1;devicetrustv1b\x06proto3"
|
||||
|
||||
var file_teleport_devicetrust_v1_devicetrust_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
||||
var file_teleport_devicetrust_v1_devicetrust_service_proto_msgTypes = make([]protoimpl.MessageInfo, 40)
|
||||
var file_teleport_devicetrust_v1_devicetrust_service_proto_msgTypes = make([]protoimpl.MessageInfo, 44)
|
||||
var file_teleport_devicetrust_v1_devicetrust_service_proto_goTypes = []any{
|
||||
(DeviceView)(0), // 0: teleport.devicetrust.v1.DeviceView
|
||||
(*CreateDeviceRequest)(nil), // 1: teleport.devicetrust.v1.CreateDeviceRequest
|
||||
@@ -4661,63 +4896,68 @@ var file_teleport_devicetrust_v1_devicetrust_service_proto_goTypes = []any{
|
||||
(*SyncInventoryAck)(nil), // 38: teleport.devicetrust.v1.SyncInventoryAck
|
||||
(*SyncInventoryResult)(nil), // 39: teleport.devicetrust.v1.SyncInventoryResult
|
||||
(*SyncInventoryMissingDevices)(nil), // 40: teleport.devicetrust.v1.SyncInventoryMissingDevices
|
||||
(*Device)(nil), // 41: teleport.devicetrust.v1.Device
|
||||
(*timestamppb.Timestamp)(nil), // 42: google.protobuf.Timestamp
|
||||
(*fieldmaskpb.FieldMask)(nil), // 43: google.protobuf.FieldMask
|
||||
(*status.Status)(nil), // 44: google.rpc.Status
|
||||
(*DeviceCollectedData)(nil), // 45: teleport.devicetrust.v1.DeviceCollectedData
|
||||
(*TPMPlatformParameters)(nil), // 46: teleport.devicetrust.v1.TPMPlatformParameters
|
||||
(*AuthenticateDeviceChallengeResponse)(nil), // 47: teleport.devicetrust.v1.AuthenticateDeviceChallengeResponse
|
||||
(*TPMAuthenticateDeviceChallengeResponse)(nil), // 48: teleport.devicetrust.v1.TPMAuthenticateDeviceChallengeResponse
|
||||
(*AuthenticateDeviceChallenge)(nil), // 49: teleport.devicetrust.v1.AuthenticateDeviceChallenge
|
||||
(*UserCertificates)(nil), // 50: teleport.devicetrust.v1.UserCertificates
|
||||
(*TPMAuthenticateDeviceChallenge)(nil), // 51: teleport.devicetrust.v1.TPMAuthenticateDeviceChallenge
|
||||
(*DeviceConfirmationToken)(nil), // 52: teleport.devicetrust.v1.DeviceConfirmationToken
|
||||
(*DeviceWebToken)(nil), // 53: teleport.devicetrust.v1.DeviceWebToken
|
||||
(*DeviceSource)(nil), // 54: teleport.devicetrust.v1.DeviceSource
|
||||
(OSType)(0), // 55: teleport.devicetrust.v1.OSType
|
||||
(*emptypb.Empty)(nil), // 56: google.protobuf.Empty
|
||||
(*DeviceEnrollToken)(nil), // 57: teleport.devicetrust.v1.DeviceEnrollToken
|
||||
(*CreateEnrollPairingRequest)(nil), // 41: teleport.devicetrust.v1.CreateEnrollPairingRequest
|
||||
(*CreateEnrollPairingResponse)(nil), // 42: teleport.devicetrust.v1.CreateEnrollPairingResponse
|
||||
(*GetCurrentEnrollPairingRequest)(nil), // 43: teleport.devicetrust.v1.GetCurrentEnrollPairingRequest
|
||||
(*GetCurrentEnrollPairingResponse)(nil), // 44: teleport.devicetrust.v1.GetCurrentEnrollPairingResponse
|
||||
(*Device)(nil), // 45: teleport.devicetrust.v1.Device
|
||||
(*timestamppb.Timestamp)(nil), // 46: google.protobuf.Timestamp
|
||||
(*fieldmaskpb.FieldMask)(nil), // 47: google.protobuf.FieldMask
|
||||
(*status.Status)(nil), // 48: google.rpc.Status
|
||||
(*DeviceCollectedData)(nil), // 49: teleport.devicetrust.v1.DeviceCollectedData
|
||||
(*TPMPlatformParameters)(nil), // 50: teleport.devicetrust.v1.TPMPlatformParameters
|
||||
(*AuthenticateDeviceChallengeResponse)(nil), // 51: teleport.devicetrust.v1.AuthenticateDeviceChallengeResponse
|
||||
(*TPMAuthenticateDeviceChallengeResponse)(nil), // 52: teleport.devicetrust.v1.TPMAuthenticateDeviceChallengeResponse
|
||||
(*AuthenticateDeviceChallenge)(nil), // 53: teleport.devicetrust.v1.AuthenticateDeviceChallenge
|
||||
(*UserCertificates)(nil), // 54: teleport.devicetrust.v1.UserCertificates
|
||||
(*TPMAuthenticateDeviceChallenge)(nil), // 55: teleport.devicetrust.v1.TPMAuthenticateDeviceChallenge
|
||||
(*DeviceConfirmationToken)(nil), // 56: teleport.devicetrust.v1.DeviceConfirmationToken
|
||||
(*DeviceWebToken)(nil), // 57: teleport.devicetrust.v1.DeviceWebToken
|
||||
(*DeviceSource)(nil), // 58: teleport.devicetrust.v1.DeviceSource
|
||||
(OSType)(0), // 59: teleport.devicetrust.v1.OSType
|
||||
(*EnrollPairing)(nil), // 60: teleport.devicetrust.v1.EnrollPairing
|
||||
(*emptypb.Empty)(nil), // 61: google.protobuf.Empty
|
||||
(*DeviceEnrollToken)(nil), // 62: teleport.devicetrust.v1.DeviceEnrollToken
|
||||
}
|
||||
var file_teleport_devicetrust_v1_devicetrust_service_proto_depIdxs = []int32{
|
||||
41, // 0: teleport.devicetrust.v1.CreateDeviceRequest.device:type_name -> teleport.devicetrust.v1.Device
|
||||
42, // 1: teleport.devicetrust.v1.CreateDeviceRequest.enroll_token_expire_time:type_name -> google.protobuf.Timestamp
|
||||
41, // 2: teleport.devicetrust.v1.UpdateDeviceRequest.device:type_name -> teleport.devicetrust.v1.Device
|
||||
43, // 3: teleport.devicetrust.v1.UpdateDeviceRequest.update_mask:type_name -> google.protobuf.FieldMask
|
||||
41, // 4: teleport.devicetrust.v1.UpsertDeviceRequest.device:type_name -> teleport.devicetrust.v1.Device
|
||||
41, // 5: teleport.devicetrust.v1.FindDevicesResponse.devices:type_name -> teleport.devicetrust.v1.Device
|
||||
45, // 0: teleport.devicetrust.v1.CreateDeviceRequest.device:type_name -> teleport.devicetrust.v1.Device
|
||||
46, // 1: teleport.devicetrust.v1.CreateDeviceRequest.enroll_token_expire_time:type_name -> google.protobuf.Timestamp
|
||||
45, // 2: teleport.devicetrust.v1.UpdateDeviceRequest.device:type_name -> teleport.devicetrust.v1.Device
|
||||
47, // 3: teleport.devicetrust.v1.UpdateDeviceRequest.update_mask:type_name -> google.protobuf.FieldMask
|
||||
45, // 4: teleport.devicetrust.v1.UpsertDeviceRequest.device:type_name -> teleport.devicetrust.v1.Device
|
||||
45, // 5: teleport.devicetrust.v1.FindDevicesResponse.devices:type_name -> teleport.devicetrust.v1.Device
|
||||
0, // 6: teleport.devicetrust.v1.ListDevicesRequest.view:type_name -> teleport.devicetrust.v1.DeviceView
|
||||
41, // 7: teleport.devicetrust.v1.ListDevicesResponse.devices:type_name -> teleport.devicetrust.v1.Device
|
||||
41, // 8: teleport.devicetrust.v1.ListDevicesByUserResponse.devices:type_name -> teleport.devicetrust.v1.Device
|
||||
41, // 9: teleport.devicetrust.v1.BulkCreateDevicesRequest.devices:type_name -> teleport.devicetrust.v1.Device
|
||||
45, // 7: teleport.devicetrust.v1.ListDevicesResponse.devices:type_name -> teleport.devicetrust.v1.Device
|
||||
45, // 8: teleport.devicetrust.v1.ListDevicesByUserResponse.devices:type_name -> teleport.devicetrust.v1.Device
|
||||
45, // 9: teleport.devicetrust.v1.BulkCreateDevicesRequest.devices:type_name -> teleport.devicetrust.v1.Device
|
||||
14, // 10: teleport.devicetrust.v1.BulkCreateDevicesResponse.devices:type_name -> teleport.devicetrust.v1.DeviceOrStatus
|
||||
44, // 11: teleport.devicetrust.v1.DeviceOrStatus.status:type_name -> google.rpc.Status
|
||||
45, // 12: teleport.devicetrust.v1.CreateDeviceEnrollTokenRequest.device_data:type_name -> teleport.devicetrust.v1.DeviceCollectedData
|
||||
42, // 13: teleport.devicetrust.v1.CreateDeviceEnrollTokenRequest.expire_time:type_name -> google.protobuf.Timestamp
|
||||
48, // 11: teleport.devicetrust.v1.DeviceOrStatus.status:type_name -> google.rpc.Status
|
||||
49, // 12: teleport.devicetrust.v1.CreateDeviceEnrollTokenRequest.device_data:type_name -> teleport.devicetrust.v1.DeviceCollectedData
|
||||
46, // 13: teleport.devicetrust.v1.CreateDeviceEnrollTokenRequest.expire_time:type_name -> google.protobuf.Timestamp
|
||||
18, // 14: teleport.devicetrust.v1.EnrollDeviceRequest.init:type_name -> teleport.devicetrust.v1.EnrollDeviceInit
|
||||
22, // 15: teleport.devicetrust.v1.EnrollDeviceRequest.macos_challenge_response:type_name -> teleport.devicetrust.v1.MacOSEnrollChallengeResponse
|
||||
27, // 16: teleport.devicetrust.v1.EnrollDeviceRequest.tpm_challenge_response:type_name -> teleport.devicetrust.v1.TPMEnrollChallengeResponse
|
||||
19, // 17: teleport.devicetrust.v1.EnrollDeviceResponse.success:type_name -> teleport.devicetrust.v1.EnrollDeviceSuccess
|
||||
21, // 18: teleport.devicetrust.v1.EnrollDeviceResponse.macos_challenge:type_name -> teleport.devicetrust.v1.MacOSEnrollChallenge
|
||||
25, // 19: teleport.devicetrust.v1.EnrollDeviceResponse.tpm_challenge:type_name -> teleport.devicetrust.v1.TPMEnrollChallenge
|
||||
45, // 20: teleport.devicetrust.v1.EnrollDeviceInit.device_data:type_name -> teleport.devicetrust.v1.DeviceCollectedData
|
||||
49, // 20: teleport.devicetrust.v1.EnrollDeviceInit.device_data:type_name -> teleport.devicetrust.v1.DeviceCollectedData
|
||||
20, // 21: teleport.devicetrust.v1.EnrollDeviceInit.macos:type_name -> teleport.devicetrust.v1.MacOSEnrollPayload
|
||||
23, // 22: teleport.devicetrust.v1.EnrollDeviceInit.tpm:type_name -> teleport.devicetrust.v1.TPMEnrollPayload
|
||||
41, // 23: teleport.devicetrust.v1.EnrollDeviceSuccess.device:type_name -> teleport.devicetrust.v1.Device
|
||||
45, // 23: teleport.devicetrust.v1.EnrollDeviceSuccess.device:type_name -> teleport.devicetrust.v1.Device
|
||||
24, // 24: teleport.devicetrust.v1.TPMEnrollPayload.attestation_parameters:type_name -> teleport.devicetrust.v1.TPMAttestationParameters
|
||||
26, // 25: teleport.devicetrust.v1.TPMEnrollChallenge.encrypted_credential:type_name -> teleport.devicetrust.v1.TPMEncryptedCredential
|
||||
46, // 26: teleport.devicetrust.v1.TPMEnrollChallengeResponse.platform_parameters:type_name -> teleport.devicetrust.v1.TPMPlatformParameters
|
||||
50, // 26: teleport.devicetrust.v1.TPMEnrollChallengeResponse.platform_parameters:type_name -> teleport.devicetrust.v1.TPMPlatformParameters
|
||||
30, // 27: teleport.devicetrust.v1.AuthenticateDeviceRequest.init:type_name -> teleport.devicetrust.v1.AuthenticateDeviceInit
|
||||
47, // 28: teleport.devicetrust.v1.AuthenticateDeviceRequest.challenge_response:type_name -> teleport.devicetrust.v1.AuthenticateDeviceChallengeResponse
|
||||
48, // 29: teleport.devicetrust.v1.AuthenticateDeviceRequest.tpm_challenge_response:type_name -> teleport.devicetrust.v1.TPMAuthenticateDeviceChallengeResponse
|
||||
49, // 30: teleport.devicetrust.v1.AuthenticateDeviceResponse.challenge:type_name -> teleport.devicetrust.v1.AuthenticateDeviceChallenge
|
||||
50, // 31: teleport.devicetrust.v1.AuthenticateDeviceResponse.user_certificates:type_name -> teleport.devicetrust.v1.UserCertificates
|
||||
51, // 32: teleport.devicetrust.v1.AuthenticateDeviceResponse.tpm_challenge:type_name -> teleport.devicetrust.v1.TPMAuthenticateDeviceChallenge
|
||||
52, // 33: teleport.devicetrust.v1.AuthenticateDeviceResponse.confirmation_token:type_name -> teleport.devicetrust.v1.DeviceConfirmationToken
|
||||
50, // 34: teleport.devicetrust.v1.AuthenticateDeviceInit.user_certificates:type_name -> teleport.devicetrust.v1.UserCertificates
|
||||
45, // 35: teleport.devicetrust.v1.AuthenticateDeviceInit.device_data:type_name -> teleport.devicetrust.v1.DeviceCollectedData
|
||||
53, // 36: teleport.devicetrust.v1.AuthenticateDeviceInit.device_web_token:type_name -> teleport.devicetrust.v1.DeviceWebToken
|
||||
52, // 37: teleport.devicetrust.v1.ConfirmDeviceWebAuthenticationRequest.confirmation_token:type_name -> teleport.devicetrust.v1.DeviceConfirmationToken
|
||||
51, // 28: teleport.devicetrust.v1.AuthenticateDeviceRequest.challenge_response:type_name -> teleport.devicetrust.v1.AuthenticateDeviceChallengeResponse
|
||||
52, // 29: teleport.devicetrust.v1.AuthenticateDeviceRequest.tpm_challenge_response:type_name -> teleport.devicetrust.v1.TPMAuthenticateDeviceChallengeResponse
|
||||
53, // 30: teleport.devicetrust.v1.AuthenticateDeviceResponse.challenge:type_name -> teleport.devicetrust.v1.AuthenticateDeviceChallenge
|
||||
54, // 31: teleport.devicetrust.v1.AuthenticateDeviceResponse.user_certificates:type_name -> teleport.devicetrust.v1.UserCertificates
|
||||
55, // 32: teleport.devicetrust.v1.AuthenticateDeviceResponse.tpm_challenge:type_name -> teleport.devicetrust.v1.TPMAuthenticateDeviceChallenge
|
||||
56, // 33: teleport.devicetrust.v1.AuthenticateDeviceResponse.confirmation_token:type_name -> teleport.devicetrust.v1.DeviceConfirmationToken
|
||||
54, // 34: teleport.devicetrust.v1.AuthenticateDeviceInit.user_certificates:type_name -> teleport.devicetrust.v1.UserCertificates
|
||||
49, // 35: teleport.devicetrust.v1.AuthenticateDeviceInit.device_data:type_name -> teleport.devicetrust.v1.DeviceCollectedData
|
||||
57, // 36: teleport.devicetrust.v1.AuthenticateDeviceInit.device_web_token:type_name -> teleport.devicetrust.v1.DeviceWebToken
|
||||
56, // 37: teleport.devicetrust.v1.ConfirmDeviceWebAuthenticationRequest.confirmation_token:type_name -> teleport.devicetrust.v1.DeviceConfirmationToken
|
||||
35, // 38: teleport.devicetrust.v1.SyncInventoryRequest.start:type_name -> teleport.devicetrust.v1.SyncInventoryStart
|
||||
36, // 39: teleport.devicetrust.v1.SyncInventoryRequest.end:type_name -> teleport.devicetrust.v1.SyncInventoryEnd
|
||||
37, // 40: teleport.devicetrust.v1.SyncInventoryRequest.devices_to_upsert:type_name -> teleport.devicetrust.v1.SyncInventoryDevices
|
||||
@@ -4725,44 +4965,50 @@ var file_teleport_devicetrust_v1_devicetrust_service_proto_depIdxs = []int32{
|
||||
38, // 42: teleport.devicetrust.v1.SyncInventoryResponse.ack:type_name -> teleport.devicetrust.v1.SyncInventoryAck
|
||||
39, // 43: teleport.devicetrust.v1.SyncInventoryResponse.result:type_name -> teleport.devicetrust.v1.SyncInventoryResult
|
||||
40, // 44: teleport.devicetrust.v1.SyncInventoryResponse.missing_devices:type_name -> teleport.devicetrust.v1.SyncInventoryMissingDevices
|
||||
54, // 45: teleport.devicetrust.v1.SyncInventoryStart.source:type_name -> teleport.devicetrust.v1.DeviceSource
|
||||
55, // 46: teleport.devicetrust.v1.SyncInventoryStart.os_types:type_name -> teleport.devicetrust.v1.OSType
|
||||
41, // 47: teleport.devicetrust.v1.SyncInventoryDevices.devices:type_name -> teleport.devicetrust.v1.Device
|
||||
58, // 45: teleport.devicetrust.v1.SyncInventoryStart.source:type_name -> teleport.devicetrust.v1.DeviceSource
|
||||
59, // 46: teleport.devicetrust.v1.SyncInventoryStart.os_types:type_name -> teleport.devicetrust.v1.OSType
|
||||
45, // 47: teleport.devicetrust.v1.SyncInventoryDevices.devices:type_name -> teleport.devicetrust.v1.Device
|
||||
14, // 48: teleport.devicetrust.v1.SyncInventoryResult.devices:type_name -> teleport.devicetrust.v1.DeviceOrStatus
|
||||
41, // 49: teleport.devicetrust.v1.SyncInventoryMissingDevices.devices:type_name -> teleport.devicetrust.v1.Device
|
||||
1, // 50: teleport.devicetrust.v1.DeviceTrustService.CreateDevice:input_type -> teleport.devicetrust.v1.CreateDeviceRequest
|
||||
2, // 51: teleport.devicetrust.v1.DeviceTrustService.UpdateDevice:input_type -> teleport.devicetrust.v1.UpdateDeviceRequest
|
||||
3, // 52: teleport.devicetrust.v1.DeviceTrustService.UpsertDevice:input_type -> teleport.devicetrust.v1.UpsertDeviceRequest
|
||||
4, // 53: teleport.devicetrust.v1.DeviceTrustService.DeleteDevice:input_type -> teleport.devicetrust.v1.DeleteDeviceRequest
|
||||
5, // 54: teleport.devicetrust.v1.DeviceTrustService.FindDevices:input_type -> teleport.devicetrust.v1.FindDevicesRequest
|
||||
7, // 55: teleport.devicetrust.v1.DeviceTrustService.GetDevice:input_type -> teleport.devicetrust.v1.GetDeviceRequest
|
||||
8, // 56: teleport.devicetrust.v1.DeviceTrustService.ListDevices:input_type -> teleport.devicetrust.v1.ListDevicesRequest
|
||||
10, // 57: teleport.devicetrust.v1.DeviceTrustService.ListDevicesByUser:input_type -> teleport.devicetrust.v1.ListDevicesByUserRequest
|
||||
12, // 58: teleport.devicetrust.v1.DeviceTrustService.BulkCreateDevices:input_type -> teleport.devicetrust.v1.BulkCreateDevicesRequest
|
||||
15, // 59: teleport.devicetrust.v1.DeviceTrustService.CreateDeviceEnrollToken:input_type -> teleport.devicetrust.v1.CreateDeviceEnrollTokenRequest
|
||||
16, // 60: teleport.devicetrust.v1.DeviceTrustService.EnrollDevice:input_type -> teleport.devicetrust.v1.EnrollDeviceRequest
|
||||
28, // 61: teleport.devicetrust.v1.DeviceTrustService.AuthenticateDevice:input_type -> teleport.devicetrust.v1.AuthenticateDeviceRequest
|
||||
31, // 62: teleport.devicetrust.v1.DeviceTrustService.ConfirmDeviceWebAuthentication:input_type -> teleport.devicetrust.v1.ConfirmDeviceWebAuthenticationRequest
|
||||
33, // 63: teleport.devicetrust.v1.DeviceTrustService.SyncInventory:input_type -> teleport.devicetrust.v1.SyncInventoryRequest
|
||||
41, // 64: teleport.devicetrust.v1.DeviceTrustService.CreateDevice:output_type -> teleport.devicetrust.v1.Device
|
||||
41, // 65: teleport.devicetrust.v1.DeviceTrustService.UpdateDevice:output_type -> teleport.devicetrust.v1.Device
|
||||
41, // 66: teleport.devicetrust.v1.DeviceTrustService.UpsertDevice:output_type -> teleport.devicetrust.v1.Device
|
||||
56, // 67: teleport.devicetrust.v1.DeviceTrustService.DeleteDevice:output_type -> google.protobuf.Empty
|
||||
6, // 68: teleport.devicetrust.v1.DeviceTrustService.FindDevices:output_type -> teleport.devicetrust.v1.FindDevicesResponse
|
||||
41, // 69: teleport.devicetrust.v1.DeviceTrustService.GetDevice:output_type -> teleport.devicetrust.v1.Device
|
||||
9, // 70: teleport.devicetrust.v1.DeviceTrustService.ListDevices:output_type -> teleport.devicetrust.v1.ListDevicesResponse
|
||||
11, // 71: teleport.devicetrust.v1.DeviceTrustService.ListDevicesByUser:output_type -> teleport.devicetrust.v1.ListDevicesByUserResponse
|
||||
13, // 72: teleport.devicetrust.v1.DeviceTrustService.BulkCreateDevices:output_type -> teleport.devicetrust.v1.BulkCreateDevicesResponse
|
||||
57, // 73: teleport.devicetrust.v1.DeviceTrustService.CreateDeviceEnrollToken:output_type -> teleport.devicetrust.v1.DeviceEnrollToken
|
||||
17, // 74: teleport.devicetrust.v1.DeviceTrustService.EnrollDevice:output_type -> teleport.devicetrust.v1.EnrollDeviceResponse
|
||||
29, // 75: teleport.devicetrust.v1.DeviceTrustService.AuthenticateDevice:output_type -> teleport.devicetrust.v1.AuthenticateDeviceResponse
|
||||
32, // 76: teleport.devicetrust.v1.DeviceTrustService.ConfirmDeviceWebAuthentication:output_type -> teleport.devicetrust.v1.ConfirmDeviceWebAuthenticationResponse
|
||||
34, // 77: teleport.devicetrust.v1.DeviceTrustService.SyncInventory:output_type -> teleport.devicetrust.v1.SyncInventoryResponse
|
||||
64, // [64:78] is the sub-list for method output_type
|
||||
50, // [50:64] is the sub-list for method input_type
|
||||
50, // [50:50] is the sub-list for extension type_name
|
||||
50, // [50:50] is the sub-list for extension extendee
|
||||
0, // [0:50] is the sub-list for field type_name
|
||||
45, // 49: teleport.devicetrust.v1.SyncInventoryMissingDevices.devices:type_name -> teleport.devicetrust.v1.Device
|
||||
60, // 50: teleport.devicetrust.v1.CreateEnrollPairingResponse.enroll_pairing:type_name -> teleport.devicetrust.v1.EnrollPairing
|
||||
60, // 51: teleport.devicetrust.v1.GetCurrentEnrollPairingResponse.enroll_pairing:type_name -> teleport.devicetrust.v1.EnrollPairing
|
||||
1, // 52: teleport.devicetrust.v1.DeviceTrustService.CreateDevice:input_type -> teleport.devicetrust.v1.CreateDeviceRequest
|
||||
2, // 53: teleport.devicetrust.v1.DeviceTrustService.UpdateDevice:input_type -> teleport.devicetrust.v1.UpdateDeviceRequest
|
||||
3, // 54: teleport.devicetrust.v1.DeviceTrustService.UpsertDevice:input_type -> teleport.devicetrust.v1.UpsertDeviceRequest
|
||||
4, // 55: teleport.devicetrust.v1.DeviceTrustService.DeleteDevice:input_type -> teleport.devicetrust.v1.DeleteDeviceRequest
|
||||
5, // 56: teleport.devicetrust.v1.DeviceTrustService.FindDevices:input_type -> teleport.devicetrust.v1.FindDevicesRequest
|
||||
7, // 57: teleport.devicetrust.v1.DeviceTrustService.GetDevice:input_type -> teleport.devicetrust.v1.GetDeviceRequest
|
||||
8, // 58: teleport.devicetrust.v1.DeviceTrustService.ListDevices:input_type -> teleport.devicetrust.v1.ListDevicesRequest
|
||||
10, // 59: teleport.devicetrust.v1.DeviceTrustService.ListDevicesByUser:input_type -> teleport.devicetrust.v1.ListDevicesByUserRequest
|
||||
12, // 60: teleport.devicetrust.v1.DeviceTrustService.BulkCreateDevices:input_type -> teleport.devicetrust.v1.BulkCreateDevicesRequest
|
||||
15, // 61: teleport.devicetrust.v1.DeviceTrustService.CreateDeviceEnrollToken:input_type -> teleport.devicetrust.v1.CreateDeviceEnrollTokenRequest
|
||||
16, // 62: teleport.devicetrust.v1.DeviceTrustService.EnrollDevice:input_type -> teleport.devicetrust.v1.EnrollDeviceRequest
|
||||
28, // 63: teleport.devicetrust.v1.DeviceTrustService.AuthenticateDevice:input_type -> teleport.devicetrust.v1.AuthenticateDeviceRequest
|
||||
31, // 64: teleport.devicetrust.v1.DeviceTrustService.ConfirmDeviceWebAuthentication:input_type -> teleport.devicetrust.v1.ConfirmDeviceWebAuthenticationRequest
|
||||
33, // 65: teleport.devicetrust.v1.DeviceTrustService.SyncInventory:input_type -> teleport.devicetrust.v1.SyncInventoryRequest
|
||||
41, // 66: teleport.devicetrust.v1.DeviceTrustService.CreateEnrollPairing:input_type -> teleport.devicetrust.v1.CreateEnrollPairingRequest
|
||||
43, // 67: teleport.devicetrust.v1.DeviceTrustService.GetCurrentEnrollPairing:input_type -> teleport.devicetrust.v1.GetCurrentEnrollPairingRequest
|
||||
45, // 68: teleport.devicetrust.v1.DeviceTrustService.CreateDevice:output_type -> teleport.devicetrust.v1.Device
|
||||
45, // 69: teleport.devicetrust.v1.DeviceTrustService.UpdateDevice:output_type -> teleport.devicetrust.v1.Device
|
||||
45, // 70: teleport.devicetrust.v1.DeviceTrustService.UpsertDevice:output_type -> teleport.devicetrust.v1.Device
|
||||
61, // 71: teleport.devicetrust.v1.DeviceTrustService.DeleteDevice:output_type -> google.protobuf.Empty
|
||||
6, // 72: teleport.devicetrust.v1.DeviceTrustService.FindDevices:output_type -> teleport.devicetrust.v1.FindDevicesResponse
|
||||
45, // 73: teleport.devicetrust.v1.DeviceTrustService.GetDevice:output_type -> teleport.devicetrust.v1.Device
|
||||
9, // 74: teleport.devicetrust.v1.DeviceTrustService.ListDevices:output_type -> teleport.devicetrust.v1.ListDevicesResponse
|
||||
11, // 75: teleport.devicetrust.v1.DeviceTrustService.ListDevicesByUser:output_type -> teleport.devicetrust.v1.ListDevicesByUserResponse
|
||||
13, // 76: teleport.devicetrust.v1.DeviceTrustService.BulkCreateDevices:output_type -> teleport.devicetrust.v1.BulkCreateDevicesResponse
|
||||
62, // 77: teleport.devicetrust.v1.DeviceTrustService.CreateDeviceEnrollToken:output_type -> teleport.devicetrust.v1.DeviceEnrollToken
|
||||
17, // 78: teleport.devicetrust.v1.DeviceTrustService.EnrollDevice:output_type -> teleport.devicetrust.v1.EnrollDeviceResponse
|
||||
29, // 79: teleport.devicetrust.v1.DeviceTrustService.AuthenticateDevice:output_type -> teleport.devicetrust.v1.AuthenticateDeviceResponse
|
||||
32, // 80: teleport.devicetrust.v1.DeviceTrustService.ConfirmDeviceWebAuthentication:output_type -> teleport.devicetrust.v1.ConfirmDeviceWebAuthenticationResponse
|
||||
34, // 81: teleport.devicetrust.v1.DeviceTrustService.SyncInventory:output_type -> teleport.devicetrust.v1.SyncInventoryResponse
|
||||
42, // 82: teleport.devicetrust.v1.DeviceTrustService.CreateEnrollPairing:output_type -> teleport.devicetrust.v1.CreateEnrollPairingResponse
|
||||
44, // 83: teleport.devicetrust.v1.DeviceTrustService.GetCurrentEnrollPairing:output_type -> teleport.devicetrust.v1.GetCurrentEnrollPairingResponse
|
||||
68, // [68:84] is the sub-list for method output_type
|
||||
52, // [52:68] is the sub-list for method input_type
|
||||
52, // [52:52] is the sub-list for extension type_name
|
||||
52, // [52:52] is the sub-list for extension extendee
|
||||
0, // [0:52] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_teleport_devicetrust_v1_devicetrust_service_proto_init() }
|
||||
@@ -4777,6 +5023,7 @@ func file_teleport_devicetrust_v1_devicetrust_service_proto_init() {
|
||||
file_teleport_devicetrust_v1_device_enroll_token_proto_init()
|
||||
file_teleport_devicetrust_v1_device_source_proto_init()
|
||||
file_teleport_devicetrust_v1_device_web_token_proto_init()
|
||||
file_teleport_devicetrust_v1_enroll_pairing_proto_init()
|
||||
file_teleport_devicetrust_v1_os_type_proto_init()
|
||||
file_teleport_devicetrust_v1_tpm_proto_init()
|
||||
file_teleport_devicetrust_v1_user_certificates_proto_init()
|
||||
@@ -4822,7 +5069,7 @@ func file_teleport_devicetrust_v1_devicetrust_service_proto_init() {
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_teleport_devicetrust_v1_devicetrust_service_proto_rawDesc), len(file_teleport_devicetrust_v1_devicetrust_service_proto_rawDesc)),
|
||||
NumEnums: 1,
|
||||
NumMessages: 40,
|
||||
NumMessages: 44,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
|
||||
@@ -0,0 +1,458 @@
|
||||
// Copyright 2026 Gravitational, Inc.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.11
|
||||
// protoc (unknown)
|
||||
// source: teleport/devicetrust/v1/enroll_pairing.proto
|
||||
|
||||
package devicetrustv1
|
||||
|
||||
import (
|
||||
v1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/header/v1"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// EnrollPairingState is the state of an EnrollPairing.
|
||||
//
|
||||
// The full state machine is:
|
||||
//
|
||||
// ENROLL_PAIRING_STATE_AWAITING_DEVICE ->
|
||||
// ENROLL_PAIRING_STATE_AWAITING_APPROVAL ->
|
||||
// ENROLL_PAIRING_STATE_APPROVED
|
||||
//
|
||||
// ENROLL_PAIRING_STATE_AWAITING_DEVICE is set by CreateEnrollPairing.
|
||||
// Transitions to ENROLL_PAIRING_STATE_AWAITING_APPROVAL and
|
||||
// ENROLL_PAIRING_STATE_APPROVED are driven by the mobile app and by user
|
||||
// approval respectively.
|
||||
type EnrollPairingState int32
|
||||
|
||||
const (
|
||||
EnrollPairingState_ENROLL_PAIRING_STATE_UNSPECIFIED EnrollPairingState = 0
|
||||
// Set when the Web UI creates the pairing. The pairing is waiting for the
|
||||
// mobile app to read the token and call the public Device Trust service.
|
||||
EnrollPairingState_ENROLL_PAIRING_STATE_AWAITING_DEVICE EnrollPairingState = 1
|
||||
// Set when the mobile app has presented the token to the public Device
|
||||
// Trust service. The pairing is waiting for the Web UI user to approve the
|
||||
// request with MFA.
|
||||
EnrollPairingState_ENROLL_PAIRING_STATE_AWAITING_APPROVAL EnrollPairingState = 2
|
||||
// Set after the Web UI user has approved the request with MFA. The mobile
|
||||
// app may now retrieve the enrollment token.
|
||||
EnrollPairingState_ENROLL_PAIRING_STATE_APPROVED EnrollPairingState = 3
|
||||
)
|
||||
|
||||
// Enum value maps for EnrollPairingState.
|
||||
var (
|
||||
EnrollPairingState_name = map[int32]string{
|
||||
0: "ENROLL_PAIRING_STATE_UNSPECIFIED",
|
||||
1: "ENROLL_PAIRING_STATE_AWAITING_DEVICE",
|
||||
2: "ENROLL_PAIRING_STATE_AWAITING_APPROVAL",
|
||||
3: "ENROLL_PAIRING_STATE_APPROVED",
|
||||
}
|
||||
EnrollPairingState_value = map[string]int32{
|
||||
"ENROLL_PAIRING_STATE_UNSPECIFIED": 0,
|
||||
"ENROLL_PAIRING_STATE_AWAITING_DEVICE": 1,
|
||||
"ENROLL_PAIRING_STATE_AWAITING_APPROVAL": 2,
|
||||
"ENROLL_PAIRING_STATE_APPROVED": 3,
|
||||
}
|
||||
)
|
||||
|
||||
func (x EnrollPairingState) Enum() *EnrollPairingState {
|
||||
p := new(EnrollPairingState)
|
||||
*p = x
|
||||
return p
|
||||
}
|
||||
|
||||
func (x EnrollPairingState) String() string {
|
||||
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
||||
}
|
||||
|
||||
func (EnrollPairingState) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_teleport_devicetrust_v1_enroll_pairing_proto_enumTypes[0].Descriptor()
|
||||
}
|
||||
|
||||
func (EnrollPairingState) Type() protoreflect.EnumType {
|
||||
return &file_teleport_devicetrust_v1_enroll_pairing_proto_enumTypes[0]
|
||||
}
|
||||
|
||||
func (x EnrollPairingState) Number() protoreflect.EnumNumber {
|
||||
return protoreflect.EnumNumber(x)
|
||||
}
|
||||
|
||||
// EnrollPairing is a short-lived, single-use ceremony that pairs a Web UI
|
||||
// session with a Teleport Verify mobile app, mediated by a token encoded in a
|
||||
// QR code.
|
||||
//
|
||||
// One pairing is active per user at a time, with a 5-minute TTL. Pairings are
|
||||
// deleted on TTL expiration or successful enrollment. The pairing's
|
||||
// metadata.name is the owning user's name.
|
||||
//
|
||||
// See the "Managing EnrollPairing" section of RFD 32e for more details.
|
||||
type EnrollPairing struct {
|
||||
state protoimpl.MessageState `protogen:"opaque.v1"`
|
||||
xxx_hidden_Kind string `protobuf:"bytes,1,opt,name=kind,proto3"`
|
||||
xxx_hidden_SubKind string `protobuf:"bytes,2,opt,name=sub_kind,json=subKind,proto3"`
|
||||
xxx_hidden_Version string `protobuf:"bytes,3,opt,name=version,proto3"`
|
||||
xxx_hidden_Metadata *v1.Metadata `protobuf:"bytes,4,opt,name=metadata,proto3"`
|
||||
xxx_hidden_Spec *EnrollPairingSpec `protobuf:"bytes,5,opt,name=spec,proto3"`
|
||||
xxx_hidden_Status *EnrollPairingStatus `protobuf:"bytes,6,opt,name=status,proto3"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *EnrollPairing) Reset() {
|
||||
*x = EnrollPairing{}
|
||||
mi := &file_teleport_devicetrust_v1_enroll_pairing_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *EnrollPairing) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*EnrollPairing) ProtoMessage() {}
|
||||
|
||||
func (x *EnrollPairing) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_teleport_devicetrust_v1_enroll_pairing_proto_msgTypes[0]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
func (x *EnrollPairing) GetKind() string {
|
||||
if x != nil {
|
||||
return x.xxx_hidden_Kind
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *EnrollPairing) GetSubKind() string {
|
||||
if x != nil {
|
||||
return x.xxx_hidden_SubKind
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *EnrollPairing) GetVersion() string {
|
||||
if x != nil {
|
||||
return x.xxx_hidden_Version
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *EnrollPairing) GetMetadata() *v1.Metadata {
|
||||
if x != nil {
|
||||
return x.xxx_hidden_Metadata
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *EnrollPairing) GetSpec() *EnrollPairingSpec {
|
||||
if x != nil {
|
||||
return x.xxx_hidden_Spec
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *EnrollPairing) GetStatus() *EnrollPairingStatus {
|
||||
if x != nil {
|
||||
return x.xxx_hidden_Status
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *EnrollPairing) SetKind(v string) {
|
||||
x.xxx_hidden_Kind = v
|
||||
}
|
||||
|
||||
func (x *EnrollPairing) SetSubKind(v string) {
|
||||
x.xxx_hidden_SubKind = v
|
||||
}
|
||||
|
||||
func (x *EnrollPairing) SetVersion(v string) {
|
||||
x.xxx_hidden_Version = v
|
||||
}
|
||||
|
||||
func (x *EnrollPairing) SetMetadata(v *v1.Metadata) {
|
||||
x.xxx_hidden_Metadata = v
|
||||
}
|
||||
|
||||
func (x *EnrollPairing) SetSpec(v *EnrollPairingSpec) {
|
||||
x.xxx_hidden_Spec = v
|
||||
}
|
||||
|
||||
func (x *EnrollPairing) SetStatus(v *EnrollPairingStatus) {
|
||||
x.xxx_hidden_Status = v
|
||||
}
|
||||
|
||||
func (x *EnrollPairing) HasMetadata() bool {
|
||||
if x == nil {
|
||||
return false
|
||||
}
|
||||
return x.xxx_hidden_Metadata != nil
|
||||
}
|
||||
|
||||
func (x *EnrollPairing) HasSpec() bool {
|
||||
if x == nil {
|
||||
return false
|
||||
}
|
||||
return x.xxx_hidden_Spec != nil
|
||||
}
|
||||
|
||||
func (x *EnrollPairing) HasStatus() bool {
|
||||
if x == nil {
|
||||
return false
|
||||
}
|
||||
return x.xxx_hidden_Status != nil
|
||||
}
|
||||
|
||||
func (x *EnrollPairing) ClearMetadata() {
|
||||
x.xxx_hidden_Metadata = nil
|
||||
}
|
||||
|
||||
func (x *EnrollPairing) ClearSpec() {
|
||||
x.xxx_hidden_Spec = nil
|
||||
}
|
||||
|
||||
func (x *EnrollPairing) ClearStatus() {
|
||||
x.xxx_hidden_Status = nil
|
||||
}
|
||||
|
||||
type EnrollPairing_builder struct {
|
||||
_ [0]func() // Prevents comparability and use of unkeyed literals for the builder.
|
||||
|
||||
Kind string
|
||||
SubKind string
|
||||
Version string
|
||||
Metadata *v1.Metadata
|
||||
Spec *EnrollPairingSpec
|
||||
Status *EnrollPairingStatus
|
||||
}
|
||||
|
||||
func (b0 EnrollPairing_builder) Build() *EnrollPairing {
|
||||
m0 := &EnrollPairing{}
|
||||
b, x := &b0, m0
|
||||
_, _ = b, x
|
||||
x.xxx_hidden_Kind = b.Kind
|
||||
x.xxx_hidden_SubKind = b.SubKind
|
||||
x.xxx_hidden_Version = b.Version
|
||||
x.xxx_hidden_Metadata = b.Metadata
|
||||
x.xxx_hidden_Spec = b.Spec
|
||||
x.xxx_hidden_Status = b.Status
|
||||
return m0
|
||||
}
|
||||
|
||||
// EnrollPairingSpec is the owner-defined section of an EnrollPairing. It is
|
||||
// currently empty - every property of an EnrollPairing is server-driven.
|
||||
type EnrollPairingSpec struct {
|
||||
state protoimpl.MessageState `protogen:"opaque.v1"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *EnrollPairingSpec) Reset() {
|
||||
*x = EnrollPairingSpec{}
|
||||
mi := &file_teleport_devicetrust_v1_enroll_pairing_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *EnrollPairingSpec) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*EnrollPairingSpec) ProtoMessage() {}
|
||||
|
||||
func (x *EnrollPairingSpec) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_teleport_devicetrust_v1_enroll_pairing_proto_msgTypes[1]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
type EnrollPairingSpec_builder struct {
|
||||
_ [0]func() // Prevents comparability and use of unkeyed literals for the builder.
|
||||
|
||||
}
|
||||
|
||||
func (b0 EnrollPairingSpec_builder) Build() *EnrollPairingSpec {
|
||||
m0 := &EnrollPairingSpec{}
|
||||
b, x := &b0, m0
|
||||
_, _ = b, x
|
||||
return m0
|
||||
}
|
||||
|
||||
// EnrollPairingStatus holds the runtime state of an EnrollPairing.
|
||||
type EnrollPairingStatus struct {
|
||||
state protoimpl.MessageState `protogen:"opaque.v1"`
|
||||
xxx_hidden_State EnrollPairingState `protobuf:"varint,1,opt,name=state,proto3,enum=teleport.devicetrust.v1.EnrollPairingState"`
|
||||
xxx_hidden_Token string `protobuf:"bytes,2,opt,name=token,proto3"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *EnrollPairingStatus) Reset() {
|
||||
*x = EnrollPairingStatus{}
|
||||
mi := &file_teleport_devicetrust_v1_enroll_pairing_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *EnrollPairingStatus) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*EnrollPairingStatus) ProtoMessage() {}
|
||||
|
||||
func (x *EnrollPairingStatus) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_teleport_devicetrust_v1_enroll_pairing_proto_msgTypes[2]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
func (x *EnrollPairingStatus) GetState() EnrollPairingState {
|
||||
if x != nil {
|
||||
return x.xxx_hidden_State
|
||||
}
|
||||
return EnrollPairingState_ENROLL_PAIRING_STATE_UNSPECIFIED
|
||||
}
|
||||
|
||||
func (x *EnrollPairingStatus) GetToken() string {
|
||||
if x != nil {
|
||||
return x.xxx_hidden_Token
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *EnrollPairingStatus) SetState(v EnrollPairingState) {
|
||||
x.xxx_hidden_State = v
|
||||
}
|
||||
|
||||
func (x *EnrollPairingStatus) SetToken(v string) {
|
||||
x.xxx_hidden_Token = v
|
||||
}
|
||||
|
||||
type EnrollPairingStatus_builder struct {
|
||||
_ [0]func() // Prevents comparability and use of unkeyed literals for the builder.
|
||||
|
||||
// Current state of the pairing.
|
||||
State EnrollPairingState
|
||||
// Pairing token to be encoded into a QR code by the Web UI.
|
||||
Token string
|
||||
}
|
||||
|
||||
func (b0 EnrollPairingStatus_builder) Build() *EnrollPairingStatus {
|
||||
m0 := &EnrollPairingStatus{}
|
||||
b, x := &b0, m0
|
||||
_, _ = b, x
|
||||
x.xxx_hidden_State = b.State
|
||||
x.xxx_hidden_Token = b.Token
|
||||
return m0
|
||||
}
|
||||
|
||||
var File_teleport_devicetrust_v1_enroll_pairing_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_teleport_devicetrust_v1_enroll_pairing_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
",teleport/devicetrust/v1/enroll_pairing.proto\x12\x17teleport.devicetrust.v1\x1a!teleport/header/v1/metadata.proto\"\x98\x02\n" +
|
||||
"\rEnrollPairing\x12\x12\n" +
|
||||
"\x04kind\x18\x01 \x01(\tR\x04kind\x12\x19\n" +
|
||||
"\bsub_kind\x18\x02 \x01(\tR\asubKind\x12\x18\n" +
|
||||
"\aversion\x18\x03 \x01(\tR\aversion\x128\n" +
|
||||
"\bmetadata\x18\x04 \x01(\v2\x1c.teleport.header.v1.MetadataR\bmetadata\x12>\n" +
|
||||
"\x04spec\x18\x05 \x01(\v2*.teleport.devicetrust.v1.EnrollPairingSpecR\x04spec\x12D\n" +
|
||||
"\x06status\x18\x06 \x01(\v2,.teleport.devicetrust.v1.EnrollPairingStatusR\x06status\"\x13\n" +
|
||||
"\x11EnrollPairingSpec\"n\n" +
|
||||
"\x13EnrollPairingStatus\x12A\n" +
|
||||
"\x05state\x18\x01 \x01(\x0e2+.teleport.devicetrust.v1.EnrollPairingStateR\x05state\x12\x14\n" +
|
||||
"\x05token\x18\x02 \x01(\tR\x05token*\xb3\x01\n" +
|
||||
"\x12EnrollPairingState\x12$\n" +
|
||||
" ENROLL_PAIRING_STATE_UNSPECIFIED\x10\x00\x12(\n" +
|
||||
"$ENROLL_PAIRING_STATE_AWAITING_DEVICE\x10\x01\x12*\n" +
|
||||
"&ENROLL_PAIRING_STATE_AWAITING_APPROVAL\x10\x02\x12!\n" +
|
||||
"\x1dENROLL_PAIRING_STATE_APPROVED\x10\x03BZZXgithub.com/gravitational/teleport/api/gen/proto/go/teleport/devicetrust/v1;devicetrustv1b\x06proto3"
|
||||
|
||||
var file_teleport_devicetrust_v1_enroll_pairing_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
||||
var file_teleport_devicetrust_v1_enroll_pairing_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
|
||||
var file_teleport_devicetrust_v1_enroll_pairing_proto_goTypes = []any{
|
||||
(EnrollPairingState)(0), // 0: teleport.devicetrust.v1.EnrollPairingState
|
||||
(*EnrollPairing)(nil), // 1: teleport.devicetrust.v1.EnrollPairing
|
||||
(*EnrollPairingSpec)(nil), // 2: teleport.devicetrust.v1.EnrollPairingSpec
|
||||
(*EnrollPairingStatus)(nil), // 3: teleport.devicetrust.v1.EnrollPairingStatus
|
||||
(*v1.Metadata)(nil), // 4: teleport.header.v1.Metadata
|
||||
}
|
||||
var file_teleport_devicetrust_v1_enroll_pairing_proto_depIdxs = []int32{
|
||||
4, // 0: teleport.devicetrust.v1.EnrollPairing.metadata:type_name -> teleport.header.v1.Metadata
|
||||
2, // 1: teleport.devicetrust.v1.EnrollPairing.spec:type_name -> teleport.devicetrust.v1.EnrollPairingSpec
|
||||
3, // 2: teleport.devicetrust.v1.EnrollPairing.status:type_name -> teleport.devicetrust.v1.EnrollPairingStatus
|
||||
0, // 3: teleport.devicetrust.v1.EnrollPairingStatus.state:type_name -> teleport.devicetrust.v1.EnrollPairingState
|
||||
4, // [4:4] is the sub-list for method output_type
|
||||
4, // [4:4] is the sub-list for method input_type
|
||||
4, // [4:4] is the sub-list for extension type_name
|
||||
4, // [4:4] is the sub-list for extension extendee
|
||||
0, // [0:4] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_teleport_devicetrust_v1_enroll_pairing_proto_init() }
|
||||
func file_teleport_devicetrust_v1_enroll_pairing_proto_init() {
|
||||
if File_teleport_devicetrust_v1_enroll_pairing_proto != nil {
|
||||
return
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_teleport_devicetrust_v1_enroll_pairing_proto_rawDesc), len(file_teleport_devicetrust_v1_enroll_pairing_proto_rawDesc)),
|
||||
NumEnums: 1,
|
||||
NumMessages: 3,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_teleport_devicetrust_v1_enroll_pairing_proto_goTypes,
|
||||
DependencyIndexes: file_teleport_devicetrust_v1_enroll_pairing_proto_depIdxs,
|
||||
EnumInfos: file_teleport_devicetrust_v1_enroll_pairing_proto_enumTypes,
|
||||
MessageInfos: file_teleport_devicetrust_v1_enroll_pairing_proto_msgTypes,
|
||||
}.Build()
|
||||
File_teleport_devicetrust_v1_enroll_pairing_proto = out.File
|
||||
file_teleport_devicetrust_v1_enroll_pairing_proto_goTypes = nil
|
||||
file_teleport_devicetrust_v1_enroll_pairing_proto_depIdxs = nil
|
||||
}
|
||||
@@ -27,6 +27,7 @@ import "teleport/devicetrust/v1/device_confirmation_token.proto";
|
||||
import "teleport/devicetrust/v1/device_enroll_token.proto";
|
||||
import "teleport/devicetrust/v1/device_source.proto";
|
||||
import "teleport/devicetrust/v1/device_web_token.proto";
|
||||
import "teleport/devicetrust/v1/enroll_pairing.proto";
|
||||
import "teleport/devicetrust/v1/os_type.proto";
|
||||
import "teleport/devicetrust/v1/tpm.proto";
|
||||
import "teleport/devicetrust/v1/user_certificates.proto";
|
||||
@@ -166,6 +167,23 @@ service DeviceTrustService {
|
||||
// Authorized either by a valid MDM service certificate or the appropriate
|
||||
// "device" permissions (create/update/delete).
|
||||
rpc SyncInventory(stream SyncInventoryRequest) returns (stream SyncInventoryResponse);
|
||||
|
||||
// CreateEnrollPairing creates an enroll pairing for the calling user. The
|
||||
// returned EnrollPairing carries the pairing token that the Web UI encodes
|
||||
// into a QR code.
|
||||
//
|
||||
// Each user can have only one EnrollPairing at a time. The server overwrites
|
||||
// metadata.name with the caller's username.
|
||||
//
|
||||
// Returns AlreadyExists if an EnrollPairing already exists for the caller.
|
||||
//
|
||||
// Requires the "mobile_device.create_enroll_token" permission.
|
||||
rpc CreateEnrollPairing(CreateEnrollPairingRequest) returns (CreateEnrollPairingResponse);
|
||||
|
||||
// GetCurrentEnrollPairing returns the EnrollPairing for the calling user.
|
||||
//
|
||||
// Returns NotFound if the caller has no EnrollPairing.
|
||||
rpc GetCurrentEnrollPairing(GetCurrentEnrollPairingRequest) returns (GetCurrentEnrollPairingResponse);
|
||||
}
|
||||
|
||||
// Request for CreateDevice.
|
||||
@@ -683,3 +701,20 @@ message SyncInventoryMissingDevices {
|
||||
// profile.external_id.
|
||||
repeated Device devices = 1;
|
||||
}
|
||||
|
||||
// Request for CreateEnrollPairing.
|
||||
message CreateEnrollPairingRequest {}
|
||||
|
||||
// Response for CreateEnrollPairing.
|
||||
message CreateEnrollPairingResponse {
|
||||
EnrollPairing enroll_pairing = 1;
|
||||
}
|
||||
|
||||
// Request for GetCurrentEnrollPairing.
|
||||
message GetCurrentEnrollPairingRequest {}
|
||||
|
||||
// Response for GetCurrentEnrollPairing.
|
||||
message GetCurrentEnrollPairingResponse {
|
||||
// Current EnrollPairing for the calling user.
|
||||
EnrollPairing enroll_pairing = 1;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
// Copyright 2026 Gravitational, Inc.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
package teleport.devicetrust.v1;
|
||||
|
||||
import "teleport/header/v1/metadata.proto";
|
||||
|
||||
option go_package = "github.com/gravitational/teleport/api/gen/proto/go/teleport/devicetrust/v1;devicetrustv1";
|
||||
|
||||
// EnrollPairing is a short-lived, single-use ceremony that pairs a Web UI
|
||||
// session with a Teleport Verify mobile app, mediated by a token encoded in a
|
||||
// QR code.
|
||||
//
|
||||
// One pairing is active per user at a time, with a 5-minute TTL. Pairings are
|
||||
// deleted on TTL expiration or successful enrollment. The pairing's
|
||||
// metadata.name is the owning user's name.
|
||||
//
|
||||
// See the "Managing EnrollPairing" section of RFD 32e for more details.
|
||||
message EnrollPairing {
|
||||
string kind = 1;
|
||||
string sub_kind = 2;
|
||||
string version = 3;
|
||||
teleport.header.v1.Metadata metadata = 4;
|
||||
EnrollPairingSpec spec = 5;
|
||||
EnrollPairingStatus status = 6;
|
||||
}
|
||||
|
||||
// EnrollPairingSpec is the owner-defined section of an EnrollPairing. It is
|
||||
// currently empty - every property of an EnrollPairing is server-driven.
|
||||
message EnrollPairingSpec {}
|
||||
|
||||
// EnrollPairingStatus holds the runtime state of an EnrollPairing.
|
||||
message EnrollPairingStatus {
|
||||
// Current state of the pairing.
|
||||
EnrollPairingState state = 1;
|
||||
|
||||
// Pairing token to be encoded into a QR code by the Web UI.
|
||||
string token = 2;
|
||||
}
|
||||
|
||||
// EnrollPairingState is the state of an EnrollPairing.
|
||||
//
|
||||
// The full state machine is:
|
||||
//
|
||||
// ENROLL_PAIRING_STATE_AWAITING_DEVICE ->
|
||||
// ENROLL_PAIRING_STATE_AWAITING_APPROVAL ->
|
||||
// ENROLL_PAIRING_STATE_APPROVED
|
||||
//
|
||||
// ENROLL_PAIRING_STATE_AWAITING_DEVICE is set by CreateEnrollPairing.
|
||||
// Transitions to ENROLL_PAIRING_STATE_AWAITING_APPROVAL and
|
||||
// ENROLL_PAIRING_STATE_APPROVED are driven by the mobile app and by user
|
||||
// approval respectively.
|
||||
enum EnrollPairingState {
|
||||
ENROLL_PAIRING_STATE_UNSPECIFIED = 0;
|
||||
|
||||
// Set when the Web UI creates the pairing. The pairing is waiting for the
|
||||
// mobile app to read the token and call the public Device Trust service.
|
||||
ENROLL_PAIRING_STATE_AWAITING_DEVICE = 1;
|
||||
|
||||
// Set when the mobile app has presented the token to the public Device
|
||||
// Trust service. The pairing is waiting for the Web UI user to approve the
|
||||
// request with MFA.
|
||||
ENROLL_PAIRING_STATE_AWAITING_APPROVAL = 2;
|
||||
|
||||
// Set after the Web UI user has approved the request with MFA. The mobile
|
||||
// app may now retrieve the enrollment token.
|
||||
ENROLL_PAIRING_STATE_APPROVED = 3;
|
||||
}
|
||||
@@ -507,6 +507,11 @@ const (
|
||||
// KindDevice represents a registered or trusted device.
|
||||
KindDevice = "device"
|
||||
|
||||
// KindEnrollPairing is the resource kind for a mobile device enrollment
|
||||
// pairing: a short-lived ceremony that pairs a Web UI session with the
|
||||
// Teleport Verify mobile app via a QR-code-encoded token.
|
||||
KindEnrollPairing = "enroll_pairing"
|
||||
|
||||
// KindDownload represents Teleport binaries downloads.
|
||||
KindDownload = "download"
|
||||
|
||||
|
||||
@@ -673,6 +673,13 @@ func NewServer(cfg *InitConfig, opts ...ServerOption) (as *Server, err error) {
|
||||
}
|
||||
}
|
||||
|
||||
if cfg.EnrollPairing == nil {
|
||||
cfg.EnrollPairing, err = local.NewEnrollPairingService(cfg.Backend)
|
||||
if err != nil {
|
||||
return nil, trace.Wrap(err, "creating EnrollPairingService")
|
||||
}
|
||||
}
|
||||
|
||||
services := &Services{
|
||||
TrustInternal: cfg.Trust,
|
||||
PresenceInternal: cfg.Presence,
|
||||
@@ -738,6 +745,7 @@ func NewServer(cfg *InitConfig, opts ...ServerOption) (as *Server, err error) {
|
||||
MFAService: cfg.MFAService,
|
||||
Beams: cfg.Beams,
|
||||
SubCAService: cfg.SubCAService,
|
||||
EnrollPairing: cfg.EnrollPairing,
|
||||
}
|
||||
|
||||
if cfg.FakePasswordHash == nil {
|
||||
|
||||
@@ -476,6 +476,9 @@ type InitConfig struct {
|
||||
|
||||
// ScopesFeatures dictate which scoped components are enabled.
|
||||
ScopesFeatures scopes.Features
|
||||
|
||||
// EnrollPairing manages mobile device enrollment pairings.
|
||||
EnrollPairing services.EnrollPairing
|
||||
}
|
||||
|
||||
// Init instantiates and configures an instance of AuthServer
|
||||
|
||||
@@ -100,6 +100,7 @@ type Services struct {
|
||||
MFAService
|
||||
services.Beams
|
||||
services.SubCAService
|
||||
services.EnrollPairing
|
||||
}
|
||||
|
||||
// MFAService defines the interface for managing MFA resources in the backend.
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
// Teleport
|
||||
// Copyright (C) 2026 Gravitational, Inc.
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package services
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
devicepb "github.com/gravitational/teleport/api/gen/proto/go/teleport/devicetrust/v1"
|
||||
)
|
||||
|
||||
// EnrollPairing manages mobile device enrollment pairings.
|
||||
type EnrollPairing interface {
|
||||
// CreateEnrollPairing creates a new EnrollPairing for user in the
|
||||
// AWAITING_DEVICE state with a short TTL.
|
||||
// Returns AlreadyExists if a pairing already exists for user.
|
||||
CreateEnrollPairing(ctx context.Context, user string) (*devicepb.EnrollPairing, error)
|
||||
|
||||
// GetCurrentEnrollPairing returns the EnrollPairing for user.
|
||||
// Returns NotFound if no pairing exists.
|
||||
GetCurrentEnrollPairing(ctx context.Context, user string) (*devicepb.EnrollPairing, error)
|
||||
}
|
||||
|
||||
// MarshalEnrollPairing marshals an EnrollPairing resource to JSON.
|
||||
func MarshalEnrollPairing(pairing *devicepb.EnrollPairing, opts ...MarshalOption) ([]byte, error) {
|
||||
return MarshalProtoResource(pairing, opts...)
|
||||
}
|
||||
|
||||
// UnmarshalEnrollPairing unmarshals an EnrollPairing resource from JSON.
|
||||
func UnmarshalEnrollPairing(data []byte, opts ...MarshalOption) (*devicepb.EnrollPairing, error) {
|
||||
return UnmarshalProtoResource[*devicepb.EnrollPairing](data, opts...)
|
||||
}
|
||||
@@ -0,0 +1,150 @@
|
||||
// Teleport
|
||||
// Copyright (C) 2026 Gravitational, Inc.
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package local
|
||||
|
||||
import (
|
||||
"context"
|
||||
"crypto/rand"
|
||||
"encoding/base64"
|
||||
"log/slog"
|
||||
"time"
|
||||
|
||||
"github.com/gravitational/trace"
|
||||
"github.com/jonboulle/clockwork"
|
||||
"google.golang.org/protobuf/types/known/timestamppb"
|
||||
|
||||
"github.com/gravitational/teleport"
|
||||
devicepb "github.com/gravitational/teleport/api/gen/proto/go/teleport/devicetrust/v1"
|
||||
headerv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/header/v1"
|
||||
"github.com/gravitational/teleport/api/types"
|
||||
"github.com/gravitational/teleport/lib/backend"
|
||||
"github.com/gravitational/teleport/lib/services"
|
||||
"github.com/gravitational/teleport/lib/services/local/generic"
|
||||
)
|
||||
|
||||
// EnrollPairingExpireDuration is the TTL of an EnrollPairing.
|
||||
const EnrollPairingExpireDuration = 5 * time.Minute
|
||||
|
||||
// EnrollPairingService implements [services.EnrollPairing] on a [backend.Backend].
|
||||
type EnrollPairingService struct {
|
||||
service *generic.ServiceWrapper[*devicepb.EnrollPairing]
|
||||
clock clockwork.Clock
|
||||
log *slog.Logger
|
||||
}
|
||||
|
||||
// NewEnrollPairingService returns a new [EnrollPairingService] backed by b.
|
||||
func NewEnrollPairingService(b backend.Backend) (*EnrollPairingService, error) {
|
||||
service, err := generic.NewServiceWrapper(generic.ServiceConfig[*devicepb.EnrollPairing]{
|
||||
Backend: b,
|
||||
ResourceKind: types.KindEnrollPairing,
|
||||
BackendPrefix: backend.NewKey("devices", "enroll_pairing"),
|
||||
MarshalFunc: services.MarshalEnrollPairing,
|
||||
UnmarshalFunc: services.UnmarshalEnrollPairing,
|
||||
ValidateFunc: validateEnrollPairing,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, trace.Wrap(err)
|
||||
}
|
||||
return &EnrollPairingService{
|
||||
clock: b.Clock(),
|
||||
service: service,
|
||||
log: slog.With(teleport.ComponentKey, teleport.Component("enrollpairing")),
|
||||
}, nil
|
||||
}
|
||||
|
||||
// CreateEnrollPairing creates an EnrollPairing for user in the AWAITING_DEVICE
|
||||
// state with a 5-minute TTL. Returns AlreadyExists if a pairing already exists
|
||||
// for user.
|
||||
func (s *EnrollPairingService) CreateEnrollPairing(ctx context.Context, user string) (*devicepb.EnrollPairing, error) {
|
||||
if user == "" {
|
||||
return nil, trace.BadParameter("user required")
|
||||
}
|
||||
|
||||
const tokenLen = 32
|
||||
tokenRaw := make([]byte, tokenLen)
|
||||
if _, err := rand.Read(tokenRaw); err != nil {
|
||||
return nil, trace.Wrap(err, "generating enroll pairing token")
|
||||
}
|
||||
token := base64.RawURLEncoding.EncodeToString(tokenRaw)
|
||||
|
||||
expires := s.clock.Now().UTC().Add(EnrollPairingExpireDuration)
|
||||
pairing := devicepb.EnrollPairing_builder{
|
||||
Kind: types.KindEnrollPairing,
|
||||
Version: types.V1,
|
||||
Metadata: headerv1.Metadata_builder{
|
||||
Name: user,
|
||||
Expires: timestamppb.New(expires),
|
||||
}.Build(),
|
||||
Spec: &devicepb.EnrollPairingSpec{},
|
||||
Status: devicepb.EnrollPairingStatus_builder{
|
||||
State: devicepb.EnrollPairingState_ENROLL_PAIRING_STATE_AWAITING_DEVICE,
|
||||
Token: token,
|
||||
}.Build(),
|
||||
}.Build()
|
||||
|
||||
// HACK(ravicious): Attempt to clear an existing resource before creating a
|
||||
// new one.
|
||||
//
|
||||
// On some backends like DynamoDB and Firestore, expired items are not removed
|
||||
// immediately from the backend. In the case of DynamoDB, expired items are
|
||||
// removed within a few days [1].
|
||||
//
|
||||
// Our backends are not consistent when it comes to dealing with expired items
|
||||
// on Create. For DynamoDB, that was just addressed in #68038. [2]
|
||||
//
|
||||
// As a workaround, before creating a resource we first get the resource by
|
||||
// name to trigger removal of an expired item if it exists.
|
||||
//
|
||||
// Once #68038 lands and the issue is addressed in Firestore backend too, we
|
||||
// can remove this workaround.
|
||||
//
|
||||
// [1]: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/TTL.html
|
||||
// [2]: https://github.com/gravitational/teleport/pull/68038
|
||||
if _, err := s.service.GetResource(ctx, user); err != nil && !trace.IsNotFound(err) {
|
||||
s.log.WarnContext(ctx, "Failed to clear expired pairing if any", "error", err)
|
||||
}
|
||||
|
||||
pairing, err := s.service.CreateResource(ctx, pairing)
|
||||
return pairing, trace.Wrap(err)
|
||||
}
|
||||
|
||||
// GetCurrentEnrollPairing returns the EnrollPairing for user, or NotFound if no
|
||||
// pairing exists.
|
||||
func (s *EnrollPairingService) GetCurrentEnrollPairing(ctx context.Context, user string) (*devicepb.EnrollPairing, error) {
|
||||
if user == "" {
|
||||
return nil, trace.BadParameter("user required")
|
||||
}
|
||||
|
||||
pairing, err := s.service.GetResource(ctx, user)
|
||||
return pairing, trace.Wrap(err)
|
||||
}
|
||||
|
||||
func validateEnrollPairing(pairing *devicepb.EnrollPairing) error {
|
||||
if pairing.GetMetadata().GetName() == "" {
|
||||
return trace.BadParameter("enroll pairing metadata.name is missing")
|
||||
}
|
||||
if !pairing.HasStatus() {
|
||||
return trace.BadParameter("enroll pairing status is missing")
|
||||
}
|
||||
if pairing.GetStatus().GetToken() == "" {
|
||||
return trace.BadParameter("enroll pairing status.token is missing")
|
||||
}
|
||||
if pairing.GetStatus().GetState() == devicepb.EnrollPairingState_ENROLL_PAIRING_STATE_UNSPECIFIED {
|
||||
return trace.BadParameter("enroll pairing status.state is missing")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@@ -0,0 +1,144 @@
|
||||
// Teleport
|
||||
// Copyright (C) 2026 Gravitational, Inc.
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package local_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
"testing/synctest"
|
||||
"time"
|
||||
|
||||
"github.com/google/go-cmp/cmp"
|
||||
"github.com/gravitational/trace"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"google.golang.org/protobuf/testing/protocmp"
|
||||
|
||||
devicepb "github.com/gravitational/teleport/api/gen/proto/go/teleport/devicetrust/v1"
|
||||
headerv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/header/v1"
|
||||
"github.com/gravitational/teleport/api/types"
|
||||
"github.com/gravitational/teleport/lib/backend/memory"
|
||||
"github.com/gravitational/teleport/lib/services/local"
|
||||
)
|
||||
|
||||
func newEnrollPairingService(t *testing.T) *local.EnrollPairingService {
|
||||
t.Helper()
|
||||
bk, err := memory.New(memory.Config{
|
||||
Context: t.Context(),
|
||||
})
|
||||
require.NoError(t, err)
|
||||
t.Cleanup(func() { _ = bk.Close() })
|
||||
|
||||
service, err := local.NewEnrollPairingService(bk)
|
||||
require.NoError(t, err)
|
||||
return service
|
||||
}
|
||||
|
||||
func TestEnrollPairingService_CreateEnrollPairing(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
s := newEnrollPairingService(t)
|
||||
|
||||
t.Run("ok", func(t *testing.T) {
|
||||
pairing, err := s.CreateEnrollPairing(t.Context(), "create-ok")
|
||||
require.NoError(t, err)
|
||||
|
||||
want := devicepb.EnrollPairing_builder{
|
||||
Kind: types.KindEnrollPairing,
|
||||
Version: types.V1,
|
||||
Metadata: headerv1.Metadata_builder{
|
||||
Name: "create-ok",
|
||||
Revision: pairing.GetMetadata().GetRevision(),
|
||||
Expires: pairing.GetMetadata().GetExpires(),
|
||||
}.Build(),
|
||||
Spec: devicepb.EnrollPairingSpec_builder{}.Build(),
|
||||
Status: devicepb.EnrollPairingStatus_builder{
|
||||
State: devicepb.EnrollPairingState_ENROLL_PAIRING_STATE_AWAITING_DEVICE,
|
||||
Token: pairing.GetStatus().GetToken(),
|
||||
}.Build(),
|
||||
}.Build()
|
||||
assert.Empty(t, cmp.Diff(want, pairing, protocmp.Transform()))
|
||||
assert.NotEmpty(t, pairing.GetMetadata().GetRevision())
|
||||
assert.NotEmpty(t, pairing.GetStatus().GetToken())
|
||||
assert.WithinDuration(t,
|
||||
time.Now().Add(local.EnrollPairingExpireDuration),
|
||||
pairing.GetMetadata().GetExpires().AsTime(),
|
||||
time.Second)
|
||||
})
|
||||
|
||||
t.Run("distinct users get distinct pairings", func(t *testing.T) {
|
||||
ctx := t.Context()
|
||||
alice, err := s.CreateEnrollPairing(ctx, "create-alice")
|
||||
require.NoError(t, err)
|
||||
|
||||
bob, err := s.CreateEnrollPairing(ctx, "create-bob")
|
||||
require.NoError(t, err)
|
||||
assert.NotEqual(t, alice.GetStatus().GetToken(), bob.GetStatus().GetToken())
|
||||
})
|
||||
|
||||
t.Run("creates a fresh pairing after the existing one expires", func(t *testing.T) {
|
||||
synctest.Test(t, func(t *testing.T) {
|
||||
s := newEnrollPairingService(t)
|
||||
|
||||
ctx := t.Context()
|
||||
want, err := s.CreateEnrollPairing(ctx, "create-after-ttl")
|
||||
require.NoError(t, err)
|
||||
|
||||
time.Sleep(local.EnrollPairingExpireDuration + time.Second)
|
||||
|
||||
got, err := s.CreateEnrollPairing(ctx, "create-after-ttl")
|
||||
require.NoError(t, err)
|
||||
// Verify the pairings are equal except the token and certain metadata.
|
||||
assert.NotEqual(t, want.GetStatus().GetToken(), got.GetStatus().GetToken())
|
||||
assert.Empty(t, cmp.Diff(want, got,
|
||||
protocmp.IgnoreFields(&headerv1.Metadata{}, "revision", "expires"),
|
||||
protocmp.IgnoreFields(&devicepb.EnrollPairingStatus{}, "token"),
|
||||
protocmp.Transform(),
|
||||
))
|
||||
})
|
||||
})
|
||||
|
||||
t.Run("rejects empty user", func(t *testing.T) {
|
||||
_, err := s.CreateEnrollPairing(t.Context(), "")
|
||||
assert.ErrorAs(t, err, new(*trace.BadParameterError))
|
||||
})
|
||||
}
|
||||
|
||||
func TestEnrollPairingService_GetCurrentEnrollPairing(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
s := newEnrollPairingService(t)
|
||||
|
||||
t.Run("returns the existing pairing", func(t *testing.T) {
|
||||
ctx := t.Context()
|
||||
want, err := s.CreateEnrollPairing(ctx, "get-existing")
|
||||
require.NoError(t, err)
|
||||
|
||||
got, err := s.GetCurrentEnrollPairing(ctx, "get-existing")
|
||||
require.NoError(t, err)
|
||||
assert.Empty(t, cmp.Diff(want, got, protocmp.Transform()))
|
||||
})
|
||||
|
||||
t.Run("returns NotFound when no pairing exists", func(t *testing.T) {
|
||||
_, err := s.GetCurrentEnrollPairing(t.Context(), "get-missing")
|
||||
assert.ErrorAs(t, err, new(*trace.NotFoundError))
|
||||
})
|
||||
|
||||
t.Run("rejects empty user", func(t *testing.T) {
|
||||
_, err := s.GetCurrentEnrollPairing(t.Context(), "")
|
||||
assert.ErrorAs(t, err, new(*trace.BadParameterError))
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user