-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
events.proto
5500 lines (4956 loc) · 179 KB
/
events.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Copyright 2021 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 events;
import "gogoproto/gogo.proto";
import "google/protobuf/struct.proto";
import "google/protobuf/timestamp.proto";
import "google/protobuf/wrappers.proto";
import "teleport/legacy/types/types.proto";
import "teleport/legacy/types/wrappers/wrappers.proto";
option go_package = "github.com/gravitational/teleport/api/types/events";
option (gogoproto.goproto_getters_all) = false;
option (gogoproto.marshaler_all) = true;
option (gogoproto.unmarshaler_all) = true;
// Metadata is a common event metadata
message Metadata {
// Index is a monotonically incremented index in the event sequence
int64 Index = 1 [(gogoproto.jsontag) = "ei"];
// Type is the event type
string Type = 2 [(gogoproto.jsontag) = "event"];
// ID is a unique event identifier
string ID = 3 [(gogoproto.jsontag) = "uid,omitempty"];
// Code is a unique event code
string Code = 4 [(gogoproto.jsontag) = "code,omitempty"];
// Time is event time
google.protobuf.Timestamp Time = 5 [
(gogoproto.stdtime) = true,
(gogoproto.nullable) = false,
(gogoproto.jsontag) = "time"
];
// ClusterName identifies the originating teleport cluster
string ClusterName = 6 [(gogoproto.jsontag) = "cluster_name,omitempty"];
}
// SessionMetadata is a common session event metadata
message SessionMetadata {
// SessionID is a unique UUID of the session.
string SessionID = 1 [(gogoproto.jsontag) = "sid"];
// WithMFA is a UUID of an MFA device used to start this session.
string WithMFA = 2 [(gogoproto.jsontag) = "with_mfa,omitempty"];
// PrivateKeyPolicy is the private key policy of the private key used to start this session.
string PrivateKeyPolicy = 3 [(gogoproto.jsontag) = "private_key_policy,omitempty"];
}
// The kind of user a given username refers to. Usernames should always refer to
// a valid cluster user (even if temporary, e.g. SSO), but may be Machine ID
// bot users.
enum UserKind {
// Indicates a legacy cluster emitting events without a defined user kind.
USER_KIND_UNSPECIFIED = 0;
// Indicates the user associated with this event is human, either created
// locally or via SSO.
USER_KIND_HUMAN = 1;
// Indicates the user associated with this event is a Machine ID bot user.
USER_KIND_BOT = 2;
}
// UserMetadata is a common user event metadata
message UserMetadata {
// User is teleport user name
string User = 1 [(gogoproto.jsontag) = "user,omitempty"];
// Login is OS login
string Login = 2 [(gogoproto.jsontag) = "login,omitempty"];
// Impersonator is a user acting on behalf of another user
string Impersonator = 3 [(gogoproto.jsontag) = "impersonator,omitempty"];
// AWSRoleARN is AWS IAM role user assumes when accessing AWS console.
string AWSRoleARN = 4 [(gogoproto.jsontag) = "aws_role_arn,omitempty"];
// AccessRequests are the IDs of access requests created by the user
repeated string AccessRequests = 5 [(gogoproto.jsontag) = "access_requests,omitempty"];
// AzureIdentity is the Azure identity user assumes when accessing Azure API.
string AzureIdentity = 6 [(gogoproto.jsontag) = "azure_identity,omitempty"];
// GCPServiceAccount is the GCP service account user assumes when accessing GCP API.
string GCPServiceAccount = 7 [(gogoproto.jsontag) = "gcp_service_account,omitempty"];
// TrustedDevice contains information about the users' trusted device.
// Requires a registered and enrolled device to be used during authentication.
DeviceMetadata TrustedDevice = 8 [(gogoproto.jsontag) = "trusted_device,omitempty"];
// RequiredPrivateKeyPolicy is the private key policy enforced for this login.
string RequiredPrivateKeyPolicy = 9 [(gogoproto.jsontag) = "required_private_key_policy,omitempty"];
// UserKind indicates what type of user this is, e.g. a human or Machine ID
// bot user.
UserKind UserKind = 10 [(gogoproto.jsontag) = "user_kind,omitempty"];
}
// Server is a server metadata
message ServerMetadata {
// ServerNamespace is a namespace of the server event
string ServerNamespace = 1 [(gogoproto.jsontag) = "namespace,omitempty"];
// ServerID is the UUID of the server the session occurred on.
string ServerID = 2 [(gogoproto.jsontag) = "server_id"];
// ServerHostname is the hostname of the server the session occurred on.
string ServerHostname = 3 [(gogoproto.jsontag) = "server_hostname,omitempty"];
// ServerAddr is the address of the server the session occurred on.
string ServerAddr = 4 [(gogoproto.jsontag) = "server_addr,omitempty"];
// ServerLabels are the labels (static and dynamic) of the server the
// session occurred on.
map<string, string> ServerLabels = 5 [
(gogoproto.nullable) = false,
(gogoproto.jsontag) = "server_labels,omitempty"
];
// ForwardedBy tells us if the metadata was sent by the node itself or by another node in it's
// place. We can't verify emit permissions fully for these events so care should be taken with
// them.
string ForwardedBy = 6 [(gogoproto.jsontag) = "forwarded_by,omitempty"];
// ServerSubKind is the sub kind of the server the session occurred on.
string ServerSubKind = 7 [(gogoproto.jsontag) = "server_sub_kind,omitempty"];
}
// Connection contains connection info
message ConnectionMetadata {
// LocalAddr is a target address on the host
string LocalAddr = 1 [(gogoproto.jsontag) = "addr.local,omitempty"];
// RemoteAddr is a client (user's) address
string RemoteAddr = 2 [(gogoproto.jsontag) = "addr.remote,omitempty"];
// Protocol specifies protocol that was captured
string Protocol = 3 [(gogoproto.jsontag) = "proto,omitempty"];
}
// ClientMetadata identifies the originating client for an event.
message ClientMetadata {
// UserAgent identifies the type of client that attempted the event.
string UserAgent = 1 [(gogoproto.jsontag) = "user_agent,omitempty"];
}
// KubernetesClusterMetadata contains common metadata for kubernetes-related
// events.
message KubernetesClusterMetadata {
// KubernetesCluster is a kubernetes cluster name.
string KubernetesCluster = 1 [(gogoproto.jsontag) = "kubernetes_cluster,omitempty"];
// KubernetesUsers is a list of kubernetes usernames for the user.
repeated string KubernetesUsers = 2 [(gogoproto.jsontag) = "kubernetes_users,omitempty"];
// KubernetesGroups is a list of kubernetes groups for the user.
repeated string KubernetesGroups = 3 [(gogoproto.jsontag) = "kubernetes_groups,omitempty"];
// KubernetesLabels are the labels (static and dynamic) of the kubernetes cluster the
// session occurred on.
map<string, string> KubernetesLabels = 4 [(gogoproto.jsontag) = "kubernetes_labels,omitempty"];
}
// KubernetesPodMetadata contains common metadata for kubernetes pod-related
// events.
message KubernetesPodMetadata {
// KubernetesPodName is the name of the pod.
string KubernetesPodName = 1 [(gogoproto.jsontag) = "kubernetes_pod_name,omitempty"];
// KubernetesPodNamespace is the namespace of the pod.
string KubernetesPodNamespace = 2 [(gogoproto.jsontag) = "kubernetes_pod_namespace,omitempty"];
// KubernetesContainerName is the name of the container within the pod.
string KubernetesContainerName = 3 [(gogoproto.jsontag) = "kubernetes_container_name,omitempty"];
// KubernetesContainerImage is the image of the container within the pod.
string KubernetesContainerImage = 4 [(gogoproto.jsontag) = "kubernetes_container_image,omitempty"];
// KubernetesNodeName is the node that runs the pod.
string KubernetesNodeName = 5 [(gogoproto.jsontag) = "kubernetes_node_name,omitempty"];
}
// SAMLIdPServiceProviderMetadata contains common metadata for SAML IdP service provider
// events.
message SAMLIdPServiceProviderMetadata {
// ServiceProviderEntityID is the entity ID of the service provider.
string ServiceProviderEntityID = 1 [(gogoproto.jsontag) = "service_provider_entity_id,omitempty"];
// ServiceProviderShortcut is the shortcut name of a service provider.
string ServiceProviderShortcut = 2 [(gogoproto.jsontag) = "service_provider_shortcut,omitempty"];
// AttributeMapping is a map of attribute name and value which will be asserted in SAML response.
map<string, string> AttributeMapping = 3 [(gogoproto.jsontag) = "attribute_mapping,omitempty"];
}
// OktaResourcesUpdatedMetadata contains common metadata for Okta resources updated events.
message OktaResourcesUpdatedMetadata {
// Added is the number of resources added.
int32 Added = 1 [(gogoproto.jsontag) = "added"];
// Updated is the number of resources updated.
int32 Updated = 2 [(gogoproto.jsontag) = "updated"];
// Deleted is the number of resources deleted.
int32 Deleted = 3 [(gogoproto.jsontag) = "deleted"];
// AddedResources is a list of the actual resources that were added.
repeated OktaResource AddedResources = 4 [(gogoproto.jsontag) = "added_resources"];
// UpdatedResources is a list of the actual resources that were updated.
repeated OktaResource UpdatedResources = 5 [(gogoproto.jsontag) = "updated_resources"];
// DeletedResources is a list of the actual resources that were deleted.
repeated OktaResource DeletedResources = 6 [(gogoproto.jsontag) = "deleted_resources"];
}
// OktaResource is a descriptor of an Okta resource.
message OktaResource {
// ID is the identifier of the Okta resource.
string ID = 1 [(gogoproto.jsontag) = "id"];
// Description is the description of the Okta resource.
string Description = 2 [(gogoproto.jsontag) = "description"];
}
// OktaAssignmentMetadata contains common metadata for Okta assignment events.
message OktaAssignmentMetadata {
// Source is the source of the Okta assignment.
string Source = 1 [(gogoproto.jsontag) = "source,omitempty"];
// User is the user the Okta assignment is for.
string User = 2 [(gogoproto.jsontag) = "user,omitempty"];
// StartingStatus is the starting status of the assignment.
string StartingStatus = 3 [(gogoproto.jsontag) = "starting_status,omitempty"];
// EndingStatus is the ending status of the assignment.
string EndingStatus = 4 [(gogoproto.jsontag) = "ending_status,omitempty"];
}
// AccessListMemberMetadata contains common metadata for access list member resource events.
message AccessListMemberMetadata {
// AccessListName is the name of the access list the members are being added to or removed from.
string AccessListName = 1 [(gogoproto.jsontag) = "access_list_name,omitempty"];
// Members are all members affected by the access list membership change.
repeated AccessListMember Members = 2 [(gogoproto.jsontag) = "members,omitempty"];
}
// AccessListMember is metadata surrounding an individual access list member.
message AccessListMember {
// JoinedOn is the date that the member joined.
google.protobuf.Timestamp JoinedOn = 1 [
(gogoproto.stdtime) = true,
(gogoproto.nullable) = false,
(gogoproto.jsontag) = "joined_on,omitempty"
];
// RemovedOn is the date that the access list member was removed. Will only be populated for deletion.
google.protobuf.Timestamp RemovedOn = 2 [
(gogoproto.stdtime) = true,
(gogoproto.nullable) = false,
(gogoproto.jsontag) = "removed_on,omitempty"
];
// Reason is the reason that the member was added, modified, or removed.
string Reason = 3 [(gogoproto.jsontag) = "reason,omitempty"];
// MemberName is the name of the member.
string MemberName = 4 [(gogoproto.jsontag) = "member_name,omitempty"];
}
// AccessListReviewMembershipRequirementsChanged contains information for when membership requirements change as part of a review.
message AccessListReviewMembershipRequirementsChanged {
// Roles are the roles that changed as part of a review.
repeated string Roles = 1 [(gogoproto.jsontag) = "roles,omitempty"];
// Traits are the traits that changed as part of a review.
map<string, string> Traits = 2 [(gogoproto.jsontag) = "traits,omitempty"];
}
// AccessListReviewMetadata contains metadata for access list review events.
message AccessListReviewMetadata {
// Message is the message that was supplied during the review.
string Message = 1 [(gogoproto.jsontag) = "message,omitempty"];
// ReviewID is the ID of the review.
string ReviewID = 2 [(gogoproto.jsontag) = "review_id,omitempty"];
// MembershipRequirementsChanged is populated if the memrship requirements have changed..
AccessListReviewMembershipRequirementsChanged MembershipRequirementsChanged = 3 [(gogoproto.jsontag) = "membership_requirements_changed,omitempty"];
// ReviewFrequencyChanged is populated if the review frequency has changed.
string ReviewFrequencyChanged = 4 [(gogoproto.jsontag) = "review_frequency_changed,omitempty"];
// ReviewDayOfMonthChanged is populated if the review day of month has changed.
string ReviewDayOfMonthChanged = 5 [(gogoproto.jsontag) = "review_day_of_month_changed,omitempty"];
// RemovedMembers are the members that were removed as part of the review.
repeated string RemovedMembers = 6 [(gogoproto.jsontag) = "removed_members,omitempty"];
}
// SessionStart is a session start event
message SessionStart {
// Metadata is a common event metadata
Metadata Metadata = 1 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// User is a common user event metadata
UserMetadata User = 2 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// SessionMetadata is a common event session metadata
SessionMetadata Session = 3 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// ServerMetadata is a common server metadata
ServerMetadata Server = 4 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// ConnectionMetadata holds information about the connection
ConnectionMetadata Connection = 5 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// TerminalSize is expressed as 'W:H'
string TerminalSize = 6 [(gogoproto.jsontag) = "size,omitempty"];
// KubernetesCluster has information about a kubernetes cluster, if
// applicable.
KubernetesClusterMetadata KubernetesCluster = 7 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// KubernetesPod has information about a kubernetes pod, if applicable.
KubernetesPodMetadata KubernetesPod = 8 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// InitialCommand is the command used to start this session.
repeated string InitialCommand = 9 [(gogoproto.jsontag) = "initial_command,omitempty"];
// SessionRecording is the type of session recording.
string SessionRecording = 10 [(gogoproto.jsontag) = "session_recording,omitempty"];
// AccessRequests used to be here, it is now part of UserMetadata
reserved "AccessRequests";
reserved 11;
// reserved jsontag "access_requests"
}
// SessionJoin emitted when another user joins a session
message SessionJoin {
// Metadata is a common event metadata
Metadata Metadata = 1 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// User is a common user event metadata
UserMetadata User = 2 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// SessionMetadata is a common event session metadata
SessionMetadata Session = 3 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// ServerMetadata is a common server metadata
ServerMetadata Server = 4 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// ConnectionMetadata holds information about the connection
ConnectionMetadata Connection = 5 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// KubernetesCluster has information about a kubernetes cluster, if
// applicable.
KubernetesClusterMetadata KubernetesCluster = 6 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
}
// SessionPrint event happens every time a write occurs to
// terminal I/O during a session
message SessionPrint {
// Metadata is a common event metadata
Metadata Metadata = 1 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// ChunkIndex is a monotonically incremented index for ordering print events
int64 ChunkIndex = 2 [(gogoproto.jsontag) = "ci"];
// Data is data transferred, it is not marshaled to JSON format
bytes Data = 3 [
(gogoproto.nullable) = true,
(gogoproto.jsontag) = "-"
];
// Bytes says how many bytes have been written into the session
// during "print" event
int64 Bytes = 4 [(gogoproto.jsontag) = "bytes"];
// DelayMilliseconds is the delay in milliseconds from the start of the session
int64 DelayMilliseconds = 5 [(gogoproto.jsontag) = "ms"];
// Offset is the offset in bytes in the session file
int64 Offset = 6 [(gogoproto.jsontag) = "offset"];
}
// DesktopRecording happens when a Teleport Desktop Protocol message
// is captured during a Desktop Access Session.
message DesktopRecording {
// Metadata is a common event metadata
Metadata Metadata = 1 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// Message is the encoded TDP message.
bytes Message = 2 [
(gogoproto.nullable) = true,
(gogoproto.jsontag) = "message"
];
// DelayMilliseconds is the delay in milliseconds from the start of the session
int64 DelayMilliseconds = 3 [(gogoproto.jsontag) = "ms"]; // JSON tag intentionally matches SessionPrintEvent
}
// DesktopClipboardReceive is emitted when Teleport receives
// clipboard data from a remote desktop.
message DesktopClipboardReceive {
// Metadata is common event metadata.
Metadata Metadata = 1 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// User is common user event metadata.
UserMetadata User = 2 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// Session is common event session metadata.
SessionMetadata Session = 3 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// Connection holds information about the connection.
ConnectionMetadata Connection = 4 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// DesktopAddr is the address of the desktop being accessed.
string DesktopAddr = 5 [(gogoproto.jsontag) = "desktop_addr"];
// Length is the number of bytes of data received from the remote clipboard.
int32 Length = 6 [(gogoproto.jsontag) = "length"];
}
// DesktopClipboardSend is emitted when clipboard data is
// sent from a user's workstation to Teleport.
message DesktopClipboardSend {
// Metadata is common event metadata.
Metadata Metadata = 1 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// User is common user event metadata.
UserMetadata User = 2 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// Session is common event session metadata.
SessionMetadata Session = 3 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// Connection holds information about the connection.
ConnectionMetadata Connection = 4 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// DesktopAddr is the address of the desktop being accessed.
string DesktopAddr = 5 [(gogoproto.jsontag) = "desktop_addr"];
// Length is the number of bytes of data sent.
int32 Length = 6 [(gogoproto.jsontag) = "length"];
}
// DesktopSharedDirectoryStart is emitted when Teleport
// successfully begins sharing a new directory to a remote desktop.
message DesktopSharedDirectoryStart {
// Metadata is common event metadata.
Metadata Metadata = 1 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// User is common user event metadata.
UserMetadata User = 2 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// Session is common event session metadata.
SessionMetadata Session = 3 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// Connection holds information about the connection.
ConnectionMetadata Connection = 4 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// Status indicates whether the directory sharing initialization was successful.
Status Status = 5 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// DesktopAddr is the address of the desktop being accessed.
string DesktopAddr = 6 [(gogoproto.jsontag) = "desktop_addr"];
// DirectoryName is the name of the directory being shared.
string DirectoryName = 7 [(gogoproto.jsontag) = "directory_name"];
// DirectoryID is the ID of the directory being shared (unique to the Windows Desktop Session).
uint32 DirectoryID = 8 [(gogoproto.jsontag) = "directory_id"];
}
// DesktopSharedDirectoryRead is emitted when Teleport
// attempts to read from a file in a shared directory at
// the behest of the remote desktop.
message DesktopSharedDirectoryRead {
// Metadata is common event metadata.
Metadata Metadata = 1 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// User is common user event metadata.
UserMetadata User = 2 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// Session is common event session metadata.
SessionMetadata Session = 3 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// Connection holds information about the connection.
ConnectionMetadata Connection = 4 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// Status indicates whether the read was successful.
Status Status = 5 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// DesktopAddr is the address of the desktop being accessed.
string DesktopAddr = 6 [(gogoproto.jsontag) = "desktop_addr"];
// DirectoryName is the name of the directory being shared.
string DirectoryName = 7 [(gogoproto.jsontag) = "directory_name"];
// DirectoryID is the ID of the directory being shared (unique to the Windows Desktop Session).
uint32 DirectoryID = 8 [(gogoproto.jsontag) = "directory_id"];
// Path is the path within the shared directory where the file is located.
string Path = 9 [(gogoproto.jsontag) = "file_path"];
// Length is the number of bytes read.
uint32 Length = 10 [(gogoproto.jsontag) = "length"];
// Offset is the offset the bytes were read from.
uint64 Offset = 11 [(gogoproto.jsontag) = "offset"];
}
// DesktopSharedDirectoryWrite is emitted when Teleport
// attempts to write to a file in a shared directory at
// the behest of the remote desktop.
message DesktopSharedDirectoryWrite {
// Metadata is common event metadata.
Metadata Metadata = 1 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// User is common user event metadata.
UserMetadata User = 2 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// Session is common event session metadata.
SessionMetadata Session = 3 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// Connection holds information about the connection.
ConnectionMetadata Connection = 4 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// Status indicates whether the write was successful.
Status Status = 5 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// DesktopAddr is the address of the desktop being accessed.
string DesktopAddr = 6 [(gogoproto.jsontag) = "desktop_addr"];
// DirectoryName is the name of the directory being shared.
string DirectoryName = 7 [(gogoproto.jsontag) = "directory_name"];
// DirectoryID is the ID of the directory being shared (unique to the Windows Desktop Session).
uint32 DirectoryID = 8 [(gogoproto.jsontag) = "directory_id"];
// Path is the path within the shared directory where the file is located.
string Path = 9 [(gogoproto.jsontag) = "file_path"];
// Length is the number of bytes written.
uint32 Length = 10 [(gogoproto.jsontag) = "length"];
// Offset is the offset the bytes were written to.
uint64 Offset = 11 [(gogoproto.jsontag) = "offset"];
}
// SessionReject event happens when a user hits a session control restriction.
message SessionReject {
// Metadata is a common event metadata
Metadata Metadata = 1 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// User is a common user event metadata
UserMetadata User = 2 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// ServerMetadata is a common server metadata
ServerMetadata Server = 3 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// ConnectionMetadata holds information about the connection
ConnectionMetadata Connection = 4 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// Reason is a field that specifies reason for event, e.g. in disconnect
// event it explains why server disconnected the client
string Reason = 5 [(gogoproto.jsontag) = "reason"];
// Maximum is an event field specifying a maximal value (e.g. the value
// of `max_connections` for a `session.rejected` event).
int64 Maximum = 6 [(gogoproto.jsontag) = "max"];
}
// SessionConnect is emitted when a non-Teleport connection is made over net.Dial.
message SessionConnect {
Metadata Metadata = 1 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
ServerMetadata Server = 2 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
ConnectionMetadata Connection = 3 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
}
// FileTransferRequestEvent happens when a FileTransferRequest is created, updated, approved, or denied.
message FileTransferRequestEvent {
// Metadata is a common event metadata
Metadata Metadata = 1 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// SessionMetadata is a common event session metadata
SessionMetadata Session = 2 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// RequestID is the ID for the FileTransferRequest
string RequestID = 3 [(gogoproto.jsontag) = "requestID"];
// Approvers is a slice containing the Teleport users who have approved the request
repeated string Approvers = 4 [(gogoproto.jsontag) = "approvers"];
// Requester is the Teleport user who requested the file transfer
string Requester = 5 [(gogoproto.jsontag) = "requester"];
// Location is the location of the file to be downloaded, or the directory of the upload
string Location = 6 [(gogoproto.jsontag) = "location"];
// Download is true if the requested file transfer is a download, false if an upload
bool Download = 7 [(gogoproto.jsontag) = "download"];
// Filename is the name of the file to be uploaded to the Location. Only present in uploads.
string Filename = 8 [(gogoproto.jsontag) = "filename"];
}
// Resize means that some user resized PTY on the client
message Resize {
// Metadata is a common event metadata
Metadata Metadata = 1 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// User is a common user event metadata
UserMetadata User = 2 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// SessionMetadata is a common event session metadata
SessionMetadata Session = 3 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// ConnectionMetadata holds information about the connection
ConnectionMetadata Connection = 4 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// ServerMetadata is a common server metadata
ServerMetadata Server = 5 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// TerminalSize is expressed as 'W:H'
string TerminalSize = 6 [(gogoproto.jsontag) = "size,omitempty"];
// KubernetesCluster has information about a kubernetes cluster, if
// applicable.
KubernetesClusterMetadata KubernetesCluster = 7 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// KubernetesPod has information about a kubernetes pod, if applicable.
KubernetesPodMetadata KubernetesPod = 8 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
}
// SessionEnd is a session end event
message SessionEnd {
// Metadata is a common event metadata
Metadata Metadata = 1 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// User is a common user event metadata
UserMetadata User = 2 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// SessionMetadata is a common event session metadata
SessionMetadata Session = 3 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// ConnectionMetadata holds information about the connection
ConnectionMetadata Connection = 4 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// ServerMetadata is a common server metadata
ServerMetadata Server = 5 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// EnhancedRecording is used to indicate if the recording was an
// enhanced recording or not.
bool EnhancedRecording = 6 [(gogoproto.jsontag) = "enhanced_recording"];
// Interactive is used to indicate if the session was interactive
// (has PTY attached) or not (exec session).
bool Interactive = 7 [(gogoproto.jsontag) = "interactive"];
// Participants is a list of participants in the session.
repeated string Participants = 8 [(gogoproto.jsontag) = "participants"];
// StartTime is the timestamp at which the session began.
google.protobuf.Timestamp StartTime = 9 [
(gogoproto.stdtime) = true,
(gogoproto.nullable) = false,
(gogoproto.jsontag) = "session_start,omitempty"
];
// EndTime is the timestamp at which the session ended.
google.protobuf.Timestamp EndTime = 10 [
(gogoproto.stdtime) = true,
(gogoproto.nullable) = false,
(gogoproto.jsontag) = "session_stop,omitempty"
];
// KubernetesCluster has information about a kubernetes cluster, if
// applicable.
KubernetesClusterMetadata KubernetesCluster = 11 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// KubernetesPod has information about a kubernetes pod, if applicable.
KubernetesPodMetadata KubernetesPod = 12 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// InitialCommand is the command used to start this session.
repeated string InitialCommand = 13 [(gogoproto.jsontag) = "initial_command,omitempty"];
// SessionRecording is the type of session recording.
string SessionRecording = 14 [(gogoproto.jsontag) = "session_recording,omitempty"];
}
// BPFMetadata is a common BPF process metadata
message BPFMetadata {
// PID is the ID of the process.
uint64 PID = 1 [(gogoproto.jsontag) = "pid"];
// CgroupID is the internal cgroupv2 ID of the event.
uint64 CgroupID = 2 [(gogoproto.jsontag) = "cgroup_id"];
// Program is name of the executable.
string Program = 3 [(gogoproto.jsontag) = "program"];
}
// Status contains common command or operation status fields
message Status {
// Success indicates the success or failure of the operation
bool Success = 1 [(gogoproto.jsontag) = "success"];
// Error includes system error message for the failed attempt
string Error = 2 [(gogoproto.jsontag) = "error,omitempty"];
// UserMessage is a user-friendly message for successfull or unsuccessfull auth attempt
string UserMessage = 3 [(gogoproto.jsontag) = "message,omitempty"];
}
// SessionCommand is a session command event
message SessionCommand {
// Metadata is a common event metadata
Metadata Metadata = 1 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// User is a common user event metadata
UserMetadata User = 2 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// SessionMetadata is a common event session metadata
SessionMetadata Session = 3 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// ServerMetadata is a common server metadata
ServerMetadata Server = 4 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// BPFMetadata is a common BPF subsystem metadata
BPFMetadata BPF = 5 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// PPID is the PID of the parent process.
uint64 PPID = 6 [(gogoproto.jsontag) = "ppid"];
// Path is the full path to the executable.
string Path = 7 [(gogoproto.jsontag) = "path"];
// Argv is the list of arguments to the program. Note, the first element does
// not contain the name of the process.
repeated string Argv = 8 [(gogoproto.jsontag) = "argv"];
// ReturnCode is the return code of execve.
int32 ReturnCode = 9 [(gogoproto.jsontag) = "return_code"];
}
// SessionDisk is a session disk access event
message SessionDisk {
// Metadata is a common event metadata
Metadata Metadata = 1 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// User is a common user event metadata
UserMetadata User = 2 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// SessionMetadata is a common event session metadata
SessionMetadata Session = 3 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,