From 88f231ac7cb71cbf23459a6a48ab47df2f84665d Mon Sep 17 00:00:00 2001 From: Trent Clarke Date: Fri, 6 Dec 2024 16:00:35 +1100 Subject: [PATCH] Test fixups and review feedback --- api/client/proto/authservice.pb.go | 14 ++++++++++---- .../teleport/legacy/client/proto/authservice.proto | 10 ++++++++++ lib/services/unified_resource_test.go | 14 ++++++++------ 3 files changed, 28 insertions(+), 10 deletions(-) diff --git a/api/client/proto/authservice.pb.go b/api/client/proto/authservice.pb.go index d8cf3324d4b04..dd1161bbfcac2 100644 --- a/api/client/proto/authservice.pb.go +++ b/api/client/proto/authservice.pb.go @@ -10631,9 +10631,13 @@ func (m *CreateRegisterChallengeRequest) GetDeviceUsage() DeviceUsage { // IdentityCenterAccount holds information about an Identity Center account // within an IdentityCenterAccountAssignment type IdentityCenterAccount struct { - ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` - ARN string `protobuf:"bytes,2,opt,name=ARN,proto3" json:"ARN,omitempty"` - AccountName string `protobuf:"bytes,3,opt,name=AccountName,proto3" json:"AccountName,omitempty"` + // ID is the AWS-assigned account ID + ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` + // ARN is the full Amazon Resource Name for the AWS account + ARN string `protobuf:"bytes,2,opt,name=ARN,proto3" json:"ARN,omitempty"` + // AccountName is the human-readable name of the account + AccountName string `protobuf:"bytes,3,opt,name=AccountName,proto3" json:"AccountName,omitempty"` + // Description is a free text description of the account Description string `protobuf:"bytes,4,opt,name=Description,proto3" json:"Description,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -10704,7 +10708,9 @@ func (m *IdentityCenterAccount) GetDescription() string { // IdentityCenterPermissionSet holds information about an Identity Center // permission set within an IdentityCenterAccountAssignment type IdentityCenterPermissionSet struct { - ARN string `protobuf:"bytes,1,opt,name=ARN,proto3" json:"ARN,omitempty"` + // ARN is the full Amazon Resource Name for the Permission Set + ARN string `protobuf:"bytes,1,opt,name=ARN,proto3" json:"ARN,omitempty"` + // Name is the human readable name for the Permission Set Name string `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` diff --git a/api/proto/teleport/legacy/client/proto/authservice.proto b/api/proto/teleport/legacy/client/proto/authservice.proto index 8153919218229..79eb5fc2b56d7 100644 --- a/api/proto/teleport/legacy/client/proto/authservice.proto +++ b/api/proto/teleport/legacy/client/proto/authservice.proto @@ -1943,16 +1943,26 @@ message CreateRegisterChallengeRequest { // IdentityCenterAccount holds information about an Identity Center account // within an IdentityCenterAccountAssignment message IdentityCenterAccount { + // ID is the AWS-assigned account ID string ID = 1; + + // ARN is the full Amazon Resource Name for the AWS account string ARN = 2; + + // AccountName is the human-readable name of the account string AccountName = 3; + + // Description is a free text description of the account string Description = 4; } // IdentityCenterPermissionSet holds information about an Identity Center // permission set within an IdentityCenterAccountAssignment message IdentityCenterPermissionSet { + // ARN is the full Amazon Resource Name for the Permission Set string ARN = 1; + + // Name is the human readable name for the Permission Set string Name = 2; } diff --git a/lib/services/unified_resource_test.go b/lib/services/unified_resource_test.go index 344a134e13911..0415bce6614a8 100644 --- a/lib/services/unified_resource_test.go +++ b/lib/services/unified_resource_test.go @@ -52,6 +52,7 @@ type client struct { services.SAMLIdPServiceProviders services.GitServers services.IdentityCenterAccounts + services.IdentityCenterAccountAssignmentGetter types.Events } @@ -71,12 +72,13 @@ func newClient(t *testing.T) *client { require.NoError(t, err) return &client{ - Presence: local.NewPresenceService(bk), - WindowsDesktops: local.NewWindowsDesktopService(bk), - SAMLIdPServiceProviders: samlService, - Events: local.NewEventsService(bk), - GitServers: gitService, - IdentityCenterAccounts: icService, + Presence: local.NewPresenceService(bk), + WindowsDesktops: local.NewWindowsDesktopService(bk), + SAMLIdPServiceProviders: samlService, + Events: local.NewEventsService(bk), + GitServers: gitService, + IdentityCenterAccounts: icService, + IdentityCenterAccountAssignmentGetter: icService, } }