-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnetauth.pb.go
939 lines (844 loc) · 32.4 KB
/
netauth.pb.go
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
// This is the master proto for NetAuth. It contains the RPC
// definitions needed to auth a user as well as to change the state of
// a user's account.
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.1
// protoc v3.17.3
// source: netauth.proto
package protocol
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
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)
)
// Capabilities permit the holder to perform special actions within
// NetAuth. This allows the holder to do things related to management
// of the server without needing to use the GLOBAL_ROOT bootstrap
// user.
type Capability int32
const (
Capability_GLOBAL_ROOT Capability = 0
Capability_CREATE_ENTITY Capability = 10
Capability_DESTROY_ENTITY Capability = 11
Capability_MODIFY_ENTITY_META Capability = 12
Capability_MODIFY_ENTITY_KEYS Capability = 13
Capability_CHANGE_ENTITY_SECRET Capability = 14
Capability_LOCK_ENTITY Capability = 15
Capability_UNLOCK_ENTITY Capability = 16
Capability_CREATE_GROUP Capability = 20
Capability_DESTROY_GROUP Capability = 21
Capability_MODIFY_GROUP_META Capability = 22
Capability_MODIFY_GROUP_MEMBERS Capability = 23
)
// Enum value maps for Capability.
var (
Capability_name = map[int32]string{
0: "GLOBAL_ROOT",
10: "CREATE_ENTITY",
11: "DESTROY_ENTITY",
12: "MODIFY_ENTITY_META",
13: "MODIFY_ENTITY_KEYS",
14: "CHANGE_ENTITY_SECRET",
15: "LOCK_ENTITY",
16: "UNLOCK_ENTITY",
20: "CREATE_GROUP",
21: "DESTROY_GROUP",
22: "MODIFY_GROUP_META",
23: "MODIFY_GROUP_MEMBERS",
}
Capability_value = map[string]int32{
"GLOBAL_ROOT": 0,
"CREATE_ENTITY": 10,
"DESTROY_ENTITY": 11,
"MODIFY_ENTITY_META": 12,
"MODIFY_ENTITY_KEYS": 13,
"CHANGE_ENTITY_SECRET": 14,
"LOCK_ENTITY": 15,
"UNLOCK_ENTITY": 16,
"CREATE_GROUP": 20,
"DESTROY_GROUP": 21,
"MODIFY_GROUP_META": 22,
"MODIFY_GROUP_MEMBERS": 23,
}
)
func (x Capability) Enum() *Capability {
p := new(Capability)
*p = x
return p
}
func (x Capability) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (Capability) Descriptor() protoreflect.EnumDescriptor {
return file_netauth_proto_enumTypes[0].Descriptor()
}
func (Capability) Type() protoreflect.EnumType {
return &file_netauth_proto_enumTypes[0]
}
func (x Capability) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Do not use.
func (x *Capability) UnmarshalJSON(b []byte) error {
num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
if err != nil {
return err
}
*x = Capability(num)
return nil
}
// Deprecated: Use Capability.Descriptor instead.
func (Capability) EnumDescriptor() ([]byte, []int) {
return file_netauth_proto_rawDescGZIP(), []int{0}
}
// Group expansions can either be to include children of the named
// group, or to exclude them.
type ExpansionMode int32
const (
ExpansionMode_INCLUDE ExpansionMode = 1
ExpansionMode_EXCLUDE ExpansionMode = 2
ExpansionMode_DROP ExpansionMode = 99
)
// Enum value maps for ExpansionMode.
var (
ExpansionMode_name = map[int32]string{
1: "INCLUDE",
2: "EXCLUDE",
99: "DROP",
}
ExpansionMode_value = map[string]int32{
"INCLUDE": 1,
"EXCLUDE": 2,
"DROP": 99,
}
)
func (x ExpansionMode) Enum() *ExpansionMode {
p := new(ExpansionMode)
*p = x
return p
}
func (x ExpansionMode) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (ExpansionMode) Descriptor() protoreflect.EnumDescriptor {
return file_netauth_proto_enumTypes[1].Descriptor()
}
func (ExpansionMode) Type() protoreflect.EnumType {
return &file_netauth_proto_enumTypes[1]
}
func (x ExpansionMode) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Do not use.
func (x *ExpansionMode) UnmarshalJSON(b []byte) error {
num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
if err != nil {
return err
}
*x = ExpansionMode(num)
return nil
}
// Deprecated: Use ExpansionMode.Descriptor instead.
func (ExpansionMode) EnumDescriptor() ([]byte, []int) {
return file_netauth_proto_rawDescGZIP(), []int{1}
}
// KVData holds the data for a single Key/Value dataset. It is based
// on holding the key which may be multi-valued, and may be an arbitrary
// string.
type KVData struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// A key needs to be representable as a string, though it is not //
// used for anything internally beyond a byte comparision for equality.
Key *string `protobuf:"bytes,1,req,name=Key" json:"Key,omitempty"`
// A key may have one or more values. The values are completely
// opaque to NetAuth, but must be storeable as strings and have an
// implementation defined length. By default they are not to exceed
// 64M.
Values []*KVValue `protobuf:"bytes,2,rep,name=Values" json:"Values,omitempty"`
}
func (x *KVData) Reset() {
*x = KVData{}
if protoimpl.UnsafeEnabled {
mi := &file_netauth_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *KVData) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*KVData) ProtoMessage() {}
func (x *KVData) ProtoReflect() protoreflect.Message {
mi := &file_netauth_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use KVData.ProtoReflect.Descriptor instead.
func (*KVData) Descriptor() ([]byte, []int) {
return file_netauth_proto_rawDescGZIP(), []int{0}
}
func (x *KVData) GetKey() string {
if x != nil && x.Key != nil {
return *x.Key
}
return ""
}
func (x *KVData) GetValues() []*KVValue {
if x != nil {
return x.Values
}
return nil
}
// KVValue contains the actual values in the key/value system. The
// values are arbitrary strings, which carry with them an optional
// ordering index. Ordering indexes are not guaranteed to be unique.
type KVValue struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Value *string `protobuf:"bytes,1,req,name=Value" json:"Value,omitempty"`
Index *int32 `protobuf:"varint,2,opt,name=Index" json:"Index,omitempty"`
}
func (x *KVValue) Reset() {
*x = KVValue{}
if protoimpl.UnsafeEnabled {
mi := &file_netauth_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *KVValue) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*KVValue) ProtoMessage() {}
func (x *KVValue) ProtoReflect() protoreflect.Message {
mi := &file_netauth_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use KVValue.ProtoReflect.Descriptor instead.
func (*KVValue) Descriptor() ([]byte, []int) {
return file_netauth_proto_rawDescGZIP(), []int{1}
}
func (x *KVValue) GetValue() string {
if x != nil && x.Value != nil {
return *x.Value
}
return ""
}
func (x *KVValue) GetIndex() int32 {
if x != nil && x.Index != nil {
return *x.Index
}
return 0
}
// An entity may be a person or a machine actor that wishes to act as
// some identity. To do so they will need to transmit an ID and a
// secret which will be used to verify that they are who they say they
// are.
type Entity struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The entity may be identified by a string. This is most common
// for the initial authentication case where a people-entity has
// typed a name in and now wishes to be authenticated.
ID *string `protobuf:"bytes,1,opt,name=ID" json:"ID,omitempty"`
// An entity might also be identified by a unique ID number. This
// case is most common when some program wishes to get information
// about an entity.
Number *int32 `protobuf:"varint,2,opt,name=Number" json:"Number,omitempty"`
// The entity may have a secret which they will use to authenticate
// themselves.
Secret *string `protobuf:"bytes,3,opt,name=secret" json:"secret,omitempty"`
// For requests that update the meta information this must be
// attatched to the entity itself. This also allows the in-memory
// format to be defined by this proto.
Meta *EntityMeta `protobuf:"bytes,4,opt,name=meta" json:"meta,omitempty"`
}
func (x *Entity) Reset() {
*x = Entity{}
if protoimpl.UnsafeEnabled {
mi := &file_netauth_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Entity) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Entity) ProtoMessage() {}
func (x *Entity) ProtoReflect() protoreflect.Message {
mi := &file_netauth_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Entity.ProtoReflect.Descriptor instead.
func (*Entity) Descriptor() ([]byte, []int) {
return file_netauth_proto_rawDescGZIP(), []int{2}
}
func (x *Entity) GetID() string {
if x != nil && x.ID != nil {
return *x.ID
}
return ""
}
func (x *Entity) GetNumber() int32 {
if x != nil && x.Number != nil {
return *x.Number
}
return 0
}
func (x *Entity) GetSecret() string {
if x != nil && x.Secret != nil {
return *x.Secret
}
return ""
}
func (x *Entity) GetMeta() *EntityMeta {
if x != nil {
return x.Meta
}
return nil
}
// The EntityMeta structure contains additional information about the
// entity in question. This is the "directory" part of NetAuth's
// ecosystem and contains information you might want to know about an
// entity.
type EntityMeta struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The primary group ID for the entity. On most UNIX systems this
// will map to a group with the same string representation as the
// Entity, but it is not uncommon for people-entities in a network
// environment to not have a personal primary group and instead
// belong to an organization wide primary group.
PrimaryGroup *string `protobuf:"bytes,1,opt,name=PrimaryGroup" json:"PrimaryGroup,omitempty"`
// This is an arbitrary field used to store things like the user's
// real name. It is here for consistency, but the name displayed by
// the user should really be stored in displayName, with the actual
// name stored in legalName (this facilitates a user to have an
// arbitrary name displayed if this is permitted by local policy).
GECOS *string `protobuf:"bytes,2,opt,name=GECOS" json:"GECOS,omitempty"`
// This stores the legal name (if used) that owns this security
// entity. This primarily here for places where knowing the single
// owning entity is a requirement for compliance reasons.
LegalName *string `protobuf:"bytes,3,opt,name=LegalName" json:"LegalName,omitempty"`
// This field is for the display value of the legalName. This lets
// the displayed value fluctuate with no connection to the actual
// identity of the owning entity.
DisplayName *string `protobuf:"bytes,4,opt,name=DisplayName" json:"DisplayName,omitempty"`
// Given that the entity identity and auth are provided by the
// network, its not unlikely that the home directory for the entity
// is as well. This string contains the fully qualified path to the
// home directory.
Home *string `protobuf:"bytes,5,opt,name=Home" json:"Home,omitempty"`
// This string is the canonical 'user command interpreter' specified
// in the passwd file. This value provided by this field must be
// safe to use on all target systems as setting this to something
// that doesn't exist on the targets will cause the login program to
// abort when setting up the environment.
Shell *string `protobuf:"bytes,6,opt,name=Shell" json:"Shell,omitempty"`
// This is for the graphical shell, primarily for when the entity is
// a person (though machine entities might also need to have a
// graphical shell set). This provides a handy place to store it,
// but unfortunately a seperate mechanism is needed to get this into
// the systems that actually setup the graphical environment.
GraphicalShell *string `protobuf:"bytes,7,opt,name=GraphicalShell" json:"GraphicalShell,omitempty"`
// Person entities may have a physical badge which gets them access
// to things, and machine entities may have an asset tag which is
// nice to keep track of. This is a string rather than a number
// because the badge "number" might actually be a UUID or something
// that is not otherwise a pure number.
BadgeNumber *string `protobuf:"bytes,8,opt,name=BadgeNumber" json:"BadgeNumber,omitempty"`
// An entity can be locked such that they cannot authenticate at
// all. This instructs the server to refuse authentication attempts
// before considering the secret (if provided).
Locked *bool `protobuf:"varint,9,opt,name=Locked" json:"Locked,omitempty"`
// Entities may be direct members of groups
Groups []string `protobuf:"bytes,250,rep,name=Groups" json:"Groups,omitempty"`
// Entities may have capabilities that provide special actions to
// the holder within NetAuth.
Capabilities []Capability `protobuf:"varint,251,rep,name=Capabilities,enum=Capability" json:"Capabilities,omitempty"`
// Entities may also have one or more Keys associated with them.
// This is deliberately untyped to allow it to be TYPE:KEY rather
// than needing a protocol update every time a new type of key
// should be stored.
Keys []string `protobuf:"bytes,252,rep,name=Keys" json:"Keys,omitempty"`
// While NetAuth isn't a general purpose directory, it will
// undoubtedly be abused in that way. To make this somewhat more
// palatable, a generic K/V field is included.
UntypedMeta []string `protobuf:"bytes,253,rep,name=UntypedMeta" json:"UntypedMeta,omitempty"`
// The earlier UntypedMeta implementation had many problems. It has
// been superceded by the KVData approach which permits quick sorting
// of values without manipulating strings, keys that have no reserved
// characters, and a generally cleaner interface.
KV []*KVData `protobuf:"bytes,254,rep,name=KV" json:"KV,omitempty"`
}
func (x *EntityMeta) Reset() {
*x = EntityMeta{}
if protoimpl.UnsafeEnabled {
mi := &file_netauth_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EntityMeta) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EntityMeta) ProtoMessage() {}
func (x *EntityMeta) ProtoReflect() protoreflect.Message {
mi := &file_netauth_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EntityMeta.ProtoReflect.Descriptor instead.
func (*EntityMeta) Descriptor() ([]byte, []int) {
return file_netauth_proto_rawDescGZIP(), []int{3}
}
func (x *EntityMeta) GetPrimaryGroup() string {
if x != nil && x.PrimaryGroup != nil {
return *x.PrimaryGroup
}
return ""
}
func (x *EntityMeta) GetGECOS() string {
if x != nil && x.GECOS != nil {
return *x.GECOS
}
return ""
}
func (x *EntityMeta) GetLegalName() string {
if x != nil && x.LegalName != nil {
return *x.LegalName
}
return ""
}
func (x *EntityMeta) GetDisplayName() string {
if x != nil && x.DisplayName != nil {
return *x.DisplayName
}
return ""
}
func (x *EntityMeta) GetHome() string {
if x != nil && x.Home != nil {
return *x.Home
}
return ""
}
func (x *EntityMeta) GetShell() string {
if x != nil && x.Shell != nil {
return *x.Shell
}
return ""
}
func (x *EntityMeta) GetGraphicalShell() string {
if x != nil && x.GraphicalShell != nil {
return *x.GraphicalShell
}
return ""
}
func (x *EntityMeta) GetBadgeNumber() string {
if x != nil && x.BadgeNumber != nil {
return *x.BadgeNumber
}
return ""
}
func (x *EntityMeta) GetLocked() bool {
if x != nil && x.Locked != nil {
return *x.Locked
}
return false
}
func (x *EntityMeta) GetGroups() []string {
if x != nil {
return x.Groups
}
return nil
}
func (x *EntityMeta) GetCapabilities() []Capability {
if x != nil {
return x.Capabilities
}
return nil
}
func (x *EntityMeta) GetKeys() []string {
if x != nil {
return x.Keys
}
return nil
}
func (x *EntityMeta) GetUntypedMeta() []string {
if x != nil {
return x.UntypedMeta
}
return nil
}
func (x *EntityMeta) GetKV() []*KVData {
if x != nil {
return x.KV
}
return nil
}
// While machine entities may belong to only one group, people
// entities often belong to many groups at once. This message
// structures the reply for the additional groups.
type Group struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// A group name must satisfy the requirements of the UNIX group
// naming conventions. This should be one word, lower case, with no
// spaces and cannot begin with a number.
Name *string `protobuf:"bytes,1,opt,name=Name" json:"Name,omitempty"`
// Since the name has strict naming requirements, its nice to have a
// displayName for the group which has a more friendly display.
// Instead of trying to reason out what naacct means, its much nicer
// to just know that its "Accounting team - North America"
DisplayName *string `protobuf:"bytes,2,opt,name=DisplayName" json:"DisplayName,omitempty"`
// On *nix systems the group should also have a number. This number
// should be the same across all systems since it may be used for
// internal matching of users.
Number *int32 `protobuf:"varint,3,opt,name=Number" json:"Number,omitempty"`
// Groups can be managed by other groups. For a group to be self
// managed, one would set the managed by group to be the group
// itself.
ManagedBy *string `protobuf:"bytes,5,opt,name=ManagedBy" json:"ManagedBy,omitempty"`
// Groups may have capabilities that are conferred to members of the
// group on a membership basis. This is the preferred way of
// granting capabilities to an entity since it means that when an
// entity is removed from the group they lose the capabilities that
// were granted from it.
Capabilities []Capability `protobuf:"varint,50,rep,name=Capabilities,enum=Capability" json:"Capabilities,omitempty"`
// Groups can also be members of other groups. This allows a group
// to appear to contain a larger membership and build this
// membership based on potentially very intricate include/exclude
// rules. The format of this field is "<mode>:<group>" so if you
// were including the membership of 'foo', then it would have the
// value of "INCLUDE:foo".
Expansions []string `protobuf:"bytes,51,rep,name=Expansions" json:"Expansions,omitempty"`
// While NetAuth isn't a general purpose directory, it will
// undoubtedly be abused in that way. To make this somewhat more
// palatable, a generic K/V field is included.
UntypedMeta []string `protobuf:"bytes,100,rep,name=UntypedMeta" json:"UntypedMeta,omitempty"`
// The earlier UntypedMeta implementation had many problems. It has
// been superceded by the KVData approach which permits quick sorting
// of values without manipulating strings, keys that have no reserved
// characters, and a generally cleaner interface.
KV []*KVData `protobuf:"bytes,254,rep,name=KV" json:"KV,omitempty"`
}
func (x *Group) Reset() {
*x = Group{}
if protoimpl.UnsafeEnabled {
mi := &file_netauth_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Group) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Group) ProtoMessage() {}
func (x *Group) ProtoReflect() protoreflect.Message {
mi := &file_netauth_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Group.ProtoReflect.Descriptor instead.
func (*Group) Descriptor() ([]byte, []int) {
return file_netauth_proto_rawDescGZIP(), []int{4}
}
func (x *Group) GetName() string {
if x != nil && x.Name != nil {
return *x.Name
}
return ""
}
func (x *Group) GetDisplayName() string {
if x != nil && x.DisplayName != nil {
return *x.DisplayName
}
return ""
}
func (x *Group) GetNumber() int32 {
if x != nil && x.Number != nil {
return *x.Number
}
return 0
}
func (x *Group) GetManagedBy() string {
if x != nil && x.ManagedBy != nil {
return *x.ManagedBy
}
return ""
}
func (x *Group) GetCapabilities() []Capability {
if x != nil {
return x.Capabilities
}
return nil
}
func (x *Group) GetExpansions() []string {
if x != nil {
return x.Expansions
}
return nil
}
func (x *Group) GetUntypedMeta() []string {
if x != nil {
return x.UntypedMeta
}
return nil
}
func (x *Group) GetKV() []*KVData {
if x != nil {
return x.KV
}
return nil
}
var File_netauth_proto protoreflect.FileDescriptor
var file_netauth_proto_rawDesc = []byte{
0x0a, 0x0d, 0x6e, 0x65, 0x74, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
0x3c, 0x0a, 0x06, 0x4b, 0x56, 0x44, 0x61, 0x74, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x4b, 0x65, 0x79,
0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x03, 0x4b, 0x65, 0x79, 0x12, 0x20, 0x0a, 0x06, 0x56,
0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x4b, 0x56,
0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x22, 0x35, 0x0a,
0x07, 0x4b, 0x56, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x56, 0x61, 0x6c, 0x75,
0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x14,
0x0a, 0x05, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x49,
0x6e, 0x64, 0x65, 0x78, 0x22, 0x69, 0x0a, 0x06, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x0e,
0x0a, 0x02, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x49, 0x44, 0x12, 0x16,
0x0a, 0x06, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06,
0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74,
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x1f,
0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x45,
0x6e, 0x74, 0x69, 0x74, 0x79, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x22,
0xaf, 0x03, 0x0a, 0x0a, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x22,
0x0a, 0x0c, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x47, 0x72, 0x6f,
0x75, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x47, 0x45, 0x43, 0x4f, 0x53, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x52, 0x05, 0x47, 0x45, 0x43, 0x4f, 0x53, 0x12, 0x1c, 0x0a, 0x09, 0x4c, 0x65, 0x67, 0x61,
0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x4c, 0x65, 0x67,
0x61, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61,
0x79, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x44, 0x69, 0x73,
0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x48, 0x6f, 0x6d, 0x65,
0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x48, 0x6f, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05,
0x53, 0x68, 0x65, 0x6c, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x53, 0x68, 0x65,
0x6c, 0x6c, 0x12, 0x26, 0x0a, 0x0e, 0x47, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x61, 0x6c, 0x53,
0x68, 0x65, 0x6c, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x47, 0x72, 0x61, 0x70,
0x68, 0x69, 0x63, 0x61, 0x6c, 0x53, 0x68, 0x65, 0x6c, 0x6c, 0x12, 0x20, 0x0a, 0x0b, 0x42, 0x61,
0x64, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52,
0x0b, 0x42, 0x61, 0x64, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06,
0x4c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x4c, 0x6f,
0x63, 0x6b, 0x65, 0x64, 0x12, 0x17, 0x0a, 0x06, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0xfa,
0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x12, 0x30, 0x0a,
0x0c, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0xfb, 0x01,
0x20, 0x03, 0x28, 0x0e, 0x32, 0x0b, 0x2e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74,
0x79, 0x52, 0x0c, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12,
0x13, 0x0a, 0x04, 0x4b, 0x65, 0x79, 0x73, 0x18, 0xfc, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04,
0x4b, 0x65, 0x79, 0x73, 0x12, 0x21, 0x0a, 0x0b, 0x55, 0x6e, 0x74, 0x79, 0x70, 0x65, 0x64, 0x4d,
0x65, 0x74, 0x61, 0x18, 0xfd, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x55, 0x6e, 0x74, 0x79,
0x70, 0x65, 0x64, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x18, 0x0a, 0x02, 0x4b, 0x56, 0x18, 0xfe, 0x01,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x4b, 0x56, 0x44, 0x61, 0x74, 0x61, 0x52, 0x02, 0x4b,
0x56, 0x22, 0x80, 0x02, 0x0a, 0x05, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x4e,
0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12,
0x20, 0x0a, 0x0b, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d,
0x65, 0x12, 0x16, 0x0a, 0x06, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28,
0x05, 0x52, 0x06, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x4d, 0x61, 0x6e,
0x61, 0x67, 0x65, 0x64, 0x42, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x4d, 0x61,
0x6e, 0x61, 0x67, 0x65, 0x64, 0x42, 0x79, 0x12, 0x2f, 0x0a, 0x0c, 0x43, 0x61, 0x70, 0x61, 0x62,
0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x32, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x0b, 0x2e,
0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x0c, 0x43, 0x61, 0x70, 0x61,
0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x45, 0x78, 0x70, 0x61,
0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x33, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x45, 0x78,
0x70, 0x61, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x55, 0x6e, 0x74, 0x79,
0x70, 0x65, 0x64, 0x4d, 0x65, 0x74, 0x61, 0x18, 0x64, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x55,
0x6e, 0x74, 0x79, 0x70, 0x65, 0x64, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x18, 0x0a, 0x02, 0x4b, 0x56,
0x18, 0xfe, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x4b, 0x56, 0x44, 0x61, 0x74, 0x61,
0x52, 0x02, 0x4b, 0x56, 0x2a, 0x88, 0x02, 0x0a, 0x0a, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c,
0x69, 0x74, 0x79, 0x12, 0x0f, 0x0a, 0x0b, 0x47, 0x4c, 0x4f, 0x42, 0x41, 0x4c, 0x5f, 0x52, 0x4f,
0x4f, 0x54, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x5f, 0x45,
0x4e, 0x54, 0x49, 0x54, 0x59, 0x10, 0x0a, 0x12, 0x12, 0x0a, 0x0e, 0x44, 0x45, 0x53, 0x54, 0x52,
0x4f, 0x59, 0x5f, 0x45, 0x4e, 0x54, 0x49, 0x54, 0x59, 0x10, 0x0b, 0x12, 0x16, 0x0a, 0x12, 0x4d,
0x4f, 0x44, 0x49, 0x46, 0x59, 0x5f, 0x45, 0x4e, 0x54, 0x49, 0x54, 0x59, 0x5f, 0x4d, 0x45, 0x54,
0x41, 0x10, 0x0c, 0x12, 0x16, 0x0a, 0x12, 0x4d, 0x4f, 0x44, 0x49, 0x46, 0x59, 0x5f, 0x45, 0x4e,
0x54, 0x49, 0x54, 0x59, 0x5f, 0x4b, 0x45, 0x59, 0x53, 0x10, 0x0d, 0x12, 0x18, 0x0a, 0x14, 0x43,
0x48, 0x41, 0x4e, 0x47, 0x45, 0x5f, 0x45, 0x4e, 0x54, 0x49, 0x54, 0x59, 0x5f, 0x53, 0x45, 0x43,
0x52, 0x45, 0x54, 0x10, 0x0e, 0x12, 0x0f, 0x0a, 0x0b, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, 0x45, 0x4e,
0x54, 0x49, 0x54, 0x59, 0x10, 0x0f, 0x12, 0x11, 0x0a, 0x0d, 0x55, 0x4e, 0x4c, 0x4f, 0x43, 0x4b,
0x5f, 0x45, 0x4e, 0x54, 0x49, 0x54, 0x59, 0x10, 0x10, 0x12, 0x10, 0x0a, 0x0c, 0x43, 0x52, 0x45,
0x41, 0x54, 0x45, 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x10, 0x14, 0x12, 0x11, 0x0a, 0x0d, 0x44,
0x45, 0x53, 0x54, 0x52, 0x4f, 0x59, 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x10, 0x15, 0x12, 0x15,
0x0a, 0x11, 0x4d, 0x4f, 0x44, 0x49, 0x46, 0x59, 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x5f, 0x4d,
0x45, 0x54, 0x41, 0x10, 0x16, 0x12, 0x18, 0x0a, 0x14, 0x4d, 0x4f, 0x44, 0x49, 0x46, 0x59, 0x5f,
0x47, 0x52, 0x4f, 0x55, 0x50, 0x5f, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x53, 0x10, 0x17, 0x2a,
0x33, 0x0a, 0x0d, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65,
0x12, 0x0b, 0x0a, 0x07, 0x49, 0x4e, 0x43, 0x4c, 0x55, 0x44, 0x45, 0x10, 0x01, 0x12, 0x0b, 0x0a,
0x07, 0x45, 0x58, 0x43, 0x4c, 0x55, 0x44, 0x45, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x44, 0x52,
0x4f, 0x50, 0x10, 0x63, 0x42, 0x1d, 0x5a, 0x1b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63,
0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x74, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x63, 0x6f, 0x6c,
}
var (
file_netauth_proto_rawDescOnce sync.Once
file_netauth_proto_rawDescData = file_netauth_proto_rawDesc
)
func file_netauth_proto_rawDescGZIP() []byte {
file_netauth_proto_rawDescOnce.Do(func() {
file_netauth_proto_rawDescData = protoimpl.X.CompressGZIP(file_netauth_proto_rawDescData)
})
return file_netauth_proto_rawDescData
}
var file_netauth_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
var file_netauth_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_netauth_proto_goTypes = []interface{}{
(Capability)(0), // 0: Capability
(ExpansionMode)(0), // 1: ExpansionMode
(*KVData)(nil), // 2: KVData
(*KVValue)(nil), // 3: KVValue
(*Entity)(nil), // 4: Entity
(*EntityMeta)(nil), // 5: EntityMeta
(*Group)(nil), // 6: Group
}
var file_netauth_proto_depIdxs = []int32{
3, // 0: KVData.Values:type_name -> KVValue
5, // 1: Entity.meta:type_name -> EntityMeta
0, // 2: EntityMeta.Capabilities:type_name -> Capability
2, // 3: EntityMeta.KV:type_name -> KVData
0, // 4: Group.Capabilities:type_name -> Capability
2, // 5: Group.KV:type_name -> KVData
6, // [6:6] is the sub-list for method output_type
6, // [6:6] is the sub-list for method input_type
6, // [6:6] is the sub-list for extension type_name
6, // [6:6] is the sub-list for extension extendee
0, // [0:6] is the sub-list for field type_name
}
func init() { file_netauth_proto_init() }
func file_netauth_proto_init() {
if File_netauth_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_netauth_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*KVData); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_netauth_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*KVValue); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_netauth_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Entity); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_netauth_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EntityMeta); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_netauth_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Group); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_netauth_proto_rawDesc,
NumEnums: 2,
NumMessages: 5,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_netauth_proto_goTypes,
DependencyIndexes: file_netauth_proto_depIdxs,
EnumInfos: file_netauth_proto_enumTypes,
MessageInfos: file_netauth_proto_msgTypes,
}.Build()
File_netauth_proto = out.File
file_netauth_proto_rawDesc = nil
file_netauth_proto_goTypes = nil
file_netauth_proto_depIdxs = nil
}