forked from spinnaker/kleat
/
authn.pb.go
1699 lines (1525 loc) · 64.6 KB
/
authn.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
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
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.14.0
// source: security/authn/authn.proto
package authn
import (
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
wrapperspb "google.golang.org/protobuf/types/known/wrapperspb"
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)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
// Methods to transmit authentication tokens to an OAuth 2.0 provider.
type OAuth2Client_AuthenticationScheme int32
const (
// Unspecified. Do not directly use, instead omit the field.
OAuth2Client_unspecified OAuth2Client_AuthenticationScheme = 0
// Token is sent in the request header.
OAuth2Client_header OAuth2Client_AuthenticationScheme = 1
// Token is sent as a query parameter.
OAuth2Client_query OAuth2Client_AuthenticationScheme = 2
// Token is sent in the form body.
OAuth2Client_form OAuth2Client_AuthenticationScheme = 3
// Token is not sent at all.
OAuth2Client_none OAuth2Client_AuthenticationScheme = 4
)
// Enum value maps for OAuth2Client_AuthenticationScheme.
var (
OAuth2Client_AuthenticationScheme_name = map[int32]string{
0: "unspecified",
1: "header",
2: "query",
3: "form",
4: "none",
}
OAuth2Client_AuthenticationScheme_value = map[string]int32{
"unspecified": 0,
"header": 1,
"query": 2,
"form": 3,
"none": 4,
}
)
func (x OAuth2Client_AuthenticationScheme) Enum() *OAuth2Client_AuthenticationScheme {
p := new(OAuth2Client_AuthenticationScheme)
*p = x
return p
}
func (x OAuth2Client_AuthenticationScheme) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (OAuth2Client_AuthenticationScheme) Descriptor() protoreflect.EnumDescriptor {
return file_security_authn_authn_proto_enumTypes[0].Descriptor()
}
func (OAuth2Client_AuthenticationScheme) Type() protoreflect.EnumType {
return &file_security_authn_authn_proto_enumTypes[0]
}
func (x OAuth2Client_AuthenticationScheme) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use OAuth2Client_AuthenticationScheme.Descriptor instead.
func (OAuth2Client_AuthenticationScheme) EnumDescriptor() ([]byte, []int) {
return file_security_authn_authn_proto_rawDescGZIP(), []int{2, 0}
}
// Digest algorithms to sign SAML messages.
type Saml_SignatureDigest int32
const (
// Unspecified. Do not directly use, instead omit the field.
Saml_UNSPECIFIED Saml_SignatureDigest = 0
// Digest algorithm SHA1 (default).
Saml_SHA1 Saml_SignatureDigest = 1
// Digest algorithm SHA256.
Saml_SHA256 Saml_SignatureDigest = 2
// Digest algorithm SHA384.
Saml_SHA384 Saml_SignatureDigest = 3
// Digest algorithm SHA512.
Saml_SHA512 Saml_SignatureDigest = 4
// Digest algorithm RIPEMD160.
Saml_RIPEMD160 Saml_SignatureDigest = 5
// Digest algorithm MD5 (not recommended).
Saml_MD5 Saml_SignatureDigest = 6
)
// Enum value maps for Saml_SignatureDigest.
var (
Saml_SignatureDigest_name = map[int32]string{
0: "UNSPECIFIED",
1: "SHA1",
2: "SHA256",
3: "SHA384",
4: "SHA512",
5: "RIPEMD160",
6: "MD5",
}
Saml_SignatureDigest_value = map[string]int32{
"UNSPECIFIED": 0,
"SHA1": 1,
"SHA256": 2,
"SHA384": 3,
"SHA512": 4,
"RIPEMD160": 5,
"MD5": 6,
}
)
func (x Saml_SignatureDigest) Enum() *Saml_SignatureDigest {
p := new(Saml_SignatureDigest)
*p = x
return p
}
func (x Saml_SignatureDigest) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (Saml_SignatureDigest) Descriptor() protoreflect.EnumDescriptor {
return file_security_authn_authn_proto_enumTypes[1].Descriptor()
}
func (Saml_SignatureDigest) Type() protoreflect.EnumType {
return &file_security_authn_authn_proto_enumTypes[1]
}
func (x Saml_SignatureDigest) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use Saml_SignatureDigest.Descriptor instead.
func (Saml_SignatureDigest) EnumDescriptor() ([]byte, []int) {
return file_security_authn_authn_proto_rawDescGZIP(), []int{5, 0}
}
// Configuration of how users authenticate against Spinnaker.
type Authentication struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Whether to enabled authentication.
Enabled *wrapperspb.BoolValue `protobuf:"bytes,1,opt,name=enabled,proto3" json:"enabled,omitempty"`
// OAuth 2.0 configuration.
Oauth2 *OAuth2 `protobuf:"bytes,2,opt,name=oauth2,proto3" json:"oauth2,omitempty"`
// SAML configuration.
Saml *Saml `protobuf:"bytes,3,opt,name=saml,proto3" json:"saml,omitempty"`
// LDAP configuration.
Ldap *Ldap `protobuf:"bytes,4,opt,name=ldap,proto3" json:"ldap,omitempty"`
// X509 configuration.
X509 *X509 `protobuf:"bytes,5,opt,name=x509,proto3" json:"x509,omitempty"`
// Google Cloud Identity-Aware Proxy configuration.
Iap *Iap `protobuf:"bytes,6,opt,name=iap,proto3" json:"iap,omitempty"`
// Basic username/password authentication.
Basic *Basic `protobuf:"bytes,7,opt,name=basic,proto3" json:"basic,omitempty"`
}
func (x *Authentication) Reset() {
*x = Authentication{}
if protoimpl.UnsafeEnabled {
mi := &file_security_authn_authn_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Authentication) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Authentication) ProtoMessage() {}
func (x *Authentication) ProtoReflect() protoreflect.Message {
mi := &file_security_authn_authn_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 Authentication.ProtoReflect.Descriptor instead.
func (*Authentication) Descriptor() ([]byte, []int) {
return file_security_authn_authn_proto_rawDescGZIP(), []int{0}
}
func (x *Authentication) GetEnabled() *wrapperspb.BoolValue {
if x != nil {
return x.Enabled
}
return nil
}
func (x *Authentication) GetOauth2() *OAuth2 {
if x != nil {
return x.Oauth2
}
return nil
}
func (x *Authentication) GetSaml() *Saml {
if x != nil {
return x.Saml
}
return nil
}
func (x *Authentication) GetLdap() *Ldap {
if x != nil {
return x.Ldap
}
return nil
}
func (x *Authentication) GetX509() *X509 {
if x != nil {
return x.X509
}
return nil
}
func (x *Authentication) GetIap() *Iap {
if x != nil {
return x.Iap
}
return nil
}
func (x *Authentication) GetBasic() *Basic {
if x != nil {
return x.Basic
}
return nil
}
// Configuration for authentication via OAuth 2.0.
type OAuth2 struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Whether the authentication method is enabled.
Enabled *wrapperspb.BoolValue `protobuf:"bytes,1,opt,name=enabled,proto3" json:"enabled,omitempty"`
// Configuration for your OAuth 2.0 client.
Client *OAuth2Client `protobuf:"bytes,2,opt,name=client,proto3" json:"client,omitempty"`
// The map of requirements the userInfo request must have. This is used to
// restrict user login to specific domains or having a specific attribute.
UserInfoRequirements map[string]string `protobuf:"bytes,3,rep,name=userInfoRequirements,proto3" json:"userInfoRequirements,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// Configuration for OAuth 2.0 resources.
Resource *OAuth2Resource `protobuf:"bytes,4,opt,name=resource,proto3" json:"resource,omitempty"`
// Mapping of user attributes to fields returned by your OAuth 2.0 provider.
// This field controls how the fields returned from the OAuth 2.0 provider's user
// info endpoint are translated into a Spinnaker user.
UserInfoMapping *OAuth2UserInfoMapping `protobuf:"bytes,5,opt,name=userInfoMapping,proto3" json:"userInfoMapping,omitempty"`
}
func (x *OAuth2) Reset() {
*x = OAuth2{}
if protoimpl.UnsafeEnabled {
mi := &file_security_authn_authn_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *OAuth2) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*OAuth2) ProtoMessage() {}
func (x *OAuth2) ProtoReflect() protoreflect.Message {
mi := &file_security_authn_authn_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 OAuth2.ProtoReflect.Descriptor instead.
func (*OAuth2) Descriptor() ([]byte, []int) {
return file_security_authn_authn_proto_rawDescGZIP(), []int{1}
}
func (x *OAuth2) GetEnabled() *wrapperspb.BoolValue {
if x != nil {
return x.Enabled
}
return nil
}
func (x *OAuth2) GetClient() *OAuth2Client {
if x != nil {
return x.Client
}
return nil
}
func (x *OAuth2) GetUserInfoRequirements() map[string]string {
if x != nil {
return x.UserInfoRequirements
}
return nil
}
func (x *OAuth2) GetResource() *OAuth2Resource {
if x != nil {
return x.Resource
}
return nil
}
func (x *OAuth2) GetUserInfoMapping() *OAuth2UserInfoMapping {
if x != nil {
return x.UserInfoMapping
}
return nil
}
// Configuration for an OAuth 2.0 client.
type OAuth2Client struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The OAuth client ID you have configured with your OAuth 2.0 provider.
ClientId string `protobuf:"bytes,1,opt,name=clientId,proto3" json:"clientId,omitempty"`
// The OAuth client secret you have configured with your OAuth provider.
ClientSecret string `protobuf:"bytes,2,opt,name=clientSecret,proto3" json:"clientSecret,omitempty"`
// The access token uri for your OAuth provider.
AccessTokenUri string `protobuf:"bytes,3,opt,name=accessTokenUri,proto3" json:"accessTokenUri,omitempty"`
// The user authorization uri for your OAuth 2.0 provider.
UserAuthorizationUri string `protobuf:"bytes,4,opt,name=userAuthorizationUri,proto3" json:"userAuthorizationUri,omitempty"`
// The method used to transmit authentication credentials to your OAuth 2.0
// provider.
ClientAuthenticationScheme OAuth2Client_AuthenticationScheme `protobuf:"varint,5,opt,name=clientAuthenticationScheme,proto3,enum=proto.security.authn.OAuth2Client_AuthenticationScheme" json:"clientAuthenticationScheme,omitempty"`
// The scope to request when obtaining an access token from your OAuth 2.0 provider.
Scope string `protobuf:"bytes,6,opt,name=scope,proto3" json:"scope,omitempty"`
// The externally accessible URL for Gate. For use with load balancers that do
// any kind of address manipulation for Gate traffic, such as an SSL terminating
// load balancer.
PreEstablishedRedirectUri string `protobuf:"bytes,7,opt,name=preEstablishedRedirectUri,proto3" json:"preEstablishedRedirectUri,omitempty"`
// Whether the current URI in the request should be preferred over the pre-established
// redirect URI.
UseCurrentUri *wrapperspb.BoolValue `protobuf:"bytes,8,opt,name=useCurrentUri,proto3" json:"useCurrentUri,omitempty"`
}
func (x *OAuth2Client) Reset() {
*x = OAuth2Client{}
if protoimpl.UnsafeEnabled {
mi := &file_security_authn_authn_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *OAuth2Client) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*OAuth2Client) ProtoMessage() {}
func (x *OAuth2Client) ProtoReflect() protoreflect.Message {
mi := &file_security_authn_authn_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 OAuth2Client.ProtoReflect.Descriptor instead.
func (*OAuth2Client) Descriptor() ([]byte, []int) {
return file_security_authn_authn_proto_rawDescGZIP(), []int{2}
}
func (x *OAuth2Client) GetClientId() string {
if x != nil {
return x.ClientId
}
return ""
}
func (x *OAuth2Client) GetClientSecret() string {
if x != nil {
return x.ClientSecret
}
return ""
}
func (x *OAuth2Client) GetAccessTokenUri() string {
if x != nil {
return x.AccessTokenUri
}
return ""
}
func (x *OAuth2Client) GetUserAuthorizationUri() string {
if x != nil {
return x.UserAuthorizationUri
}
return ""
}
func (x *OAuth2Client) GetClientAuthenticationScheme() OAuth2Client_AuthenticationScheme {
if x != nil {
return x.ClientAuthenticationScheme
}
return OAuth2Client_unspecified
}
func (x *OAuth2Client) GetScope() string {
if x != nil {
return x.Scope
}
return ""
}
func (x *OAuth2Client) GetPreEstablishedRedirectUri() string {
if x != nil {
return x.PreEstablishedRedirectUri
}
return ""
}
func (x *OAuth2Client) GetUseCurrentUri() *wrapperspb.BoolValue {
if x != nil {
return x.UseCurrentUri
}
return nil
}
// Configuration for OAuth 2.0 resources.
type OAuth2Resource struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The user info URI for your OAuth 2.0 provider.
UserInfoUri string `protobuf:"bytes,1,opt,name=userInfoUri,proto3" json:"userInfoUri,omitempty"`
}
func (x *OAuth2Resource) Reset() {
*x = OAuth2Resource{}
if protoimpl.UnsafeEnabled {
mi := &file_security_authn_authn_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *OAuth2Resource) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*OAuth2Resource) ProtoMessage() {}
func (x *OAuth2Resource) ProtoReflect() protoreflect.Message {
mi := &file_security_authn_authn_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 OAuth2Resource.ProtoReflect.Descriptor instead.
func (*OAuth2Resource) Descriptor() ([]byte, []int) {
return file_security_authn_authn_proto_rawDescGZIP(), []int{3}
}
func (x *OAuth2Resource) GetUserInfoUri() string {
if x != nil {
return x.UserInfoUri
}
return ""
}
// Mapping of user attributes to fields returned by an OAuth 2.0 provider.
// This field controls how the fields returned from the OAuth 2.0 provider's user
// info endpoint are translated into a Spinnaker user.
type OAuth2UserInfoMapping struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Email.
Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
// First name.
FirstName string `protobuf:"bytes,2,opt,name=firstName,proto3" json:"firstName,omitempty"`
// Last name.
LastName string `protobuf:"bytes,3,opt,name=lastName,proto3" json:"lastName,omitempty"`
// Username.
Username string `protobuf:"bytes,4,opt,name=username,proto3" json:"username,omitempty"`
}
func (x *OAuth2UserInfoMapping) Reset() {
*x = OAuth2UserInfoMapping{}
if protoimpl.UnsafeEnabled {
mi := &file_security_authn_authn_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *OAuth2UserInfoMapping) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*OAuth2UserInfoMapping) ProtoMessage() {}
func (x *OAuth2UserInfoMapping) ProtoReflect() protoreflect.Message {
mi := &file_security_authn_authn_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 OAuth2UserInfoMapping.ProtoReflect.Descriptor instead.
func (*OAuth2UserInfoMapping) Descriptor() ([]byte, []int) {
return file_security_authn_authn_proto_rawDescGZIP(), []int{4}
}
func (x *OAuth2UserInfoMapping) GetEmail() string {
if x != nil {
return x.Email
}
return ""
}
func (x *OAuth2UserInfoMapping) GetFirstName() string {
if x != nil {
return x.FirstName
}
return ""
}
func (x *OAuth2UserInfoMapping) GetLastName() string {
if x != nil {
return x.LastName
}
return ""
}
func (x *OAuth2UserInfoMapping) GetUsername() string {
if x != nil {
return x.Username
}
return ""
}
// Configuration for authentication via SAML.
// SAML authenticates users by passing cryptographically signed XML documents
// between the Gate server and an identity provider. Gate's key is stored and
// accessed via the -keystore parameters, while the identity provider's keys are
// included in the metadata.xml. Finally, the identity provider must redirect the
// control flow (through the user's browser) back to Gate by way of the
// -serviceAddressUrl. This is likely the address of Gate's load balancer.
type Saml struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Whether the authentication method is enabled.
Enabled *wrapperspb.BoolValue `protobuf:"bytes,1,opt,name=enabled,proto3" json:"enabled,omitempty"`
// The path to a local file containing identity provider's metadata XML file; can
// be either a local file or a URI.
MetadataUrl string `protobuf:"bytes,2,opt,name=metadataUrl,proto3" json:"metadataUrl,omitempty"`
// The identity of the Spinnaker application registered with the SAML provider.
IssuerId string `protobuf:"bytes,3,opt,name=issuerId,proto3" json:"issuerId,omitempty"`
// Path to the keystore that contains this server's private key. This key is
// used to cryptographically sign SAML AuthNRequest objects.
KeyStore string `protobuf:"bytes,4,opt,name=keyStore,proto3" json:"keyStore,omitempty"`
// The password used to access the file specified in -keystore.
KeyStorePassword string `protobuf:"bytes,5,opt,name=keyStorePassword,proto3" json:"keyStorePassword,omitempty"`
// The name of the alias under which this server's private key is stored in
// the -keystore file.
KeyStoreAliasName string `protobuf:"bytes,6,opt,name=keyStoreAliasName,proto3" json:"keyStoreAliasName,omitempty"`
// The host name of the gate server as accessible by the SAML identity
// provider. If deployed behind a load balancer, this would be the load
// balancer's address. (Ex: gate.org.com:8084)
RedirectHostname string `protobuf:"bytes,7,opt,name=redirectHostname,proto3" json:"redirectHostname,omitempty"`
// The base path on the gate server to which redirects will be sent. Defaults
// to '/' if absent.
RedirectBasePath string `protobuf:"bytes,8,opt,name=redirectBasePath,proto3" json:"redirectBasePath,omitempty"`
// The protocol to use to when redirecting back to the Gate server. Defaults
// to 'https' if absent.
RedirectProtocol string `protobuf:"bytes,9,opt,name=redirectProtocol,proto3" json:"redirectProtocol,omitempty"`
// Configuration for fields returned from your SAML provider.
UserAttributeMapping *Saml_UserAttributes `protobuf:"bytes,10,opt,name=userAttributeMapping,proto3" json:"userAttributeMapping,omitempty"`
// Digest algorithm to sign SAML messages (optional).
SignatureDigest Saml_SignatureDigest `protobuf:"varint,11,opt,name=signatureDigest,proto3,enum=proto.security.authn.Saml_SignatureDigest" json:"signatureDigest,omitempty"`
}
func (x *Saml) Reset() {
*x = Saml{}
if protoimpl.UnsafeEnabled {
mi := &file_security_authn_authn_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Saml) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Saml) ProtoMessage() {}
func (x *Saml) ProtoReflect() protoreflect.Message {
mi := &file_security_authn_authn_proto_msgTypes[5]
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 Saml.ProtoReflect.Descriptor instead.
func (*Saml) Descriptor() ([]byte, []int) {
return file_security_authn_authn_proto_rawDescGZIP(), []int{5}
}
func (x *Saml) GetEnabled() *wrapperspb.BoolValue {
if x != nil {
return x.Enabled
}
return nil
}
func (x *Saml) GetMetadataUrl() string {
if x != nil {
return x.MetadataUrl
}
return ""
}
func (x *Saml) GetIssuerId() string {
if x != nil {
return x.IssuerId
}
return ""
}
func (x *Saml) GetKeyStore() string {
if x != nil {
return x.KeyStore
}
return ""
}
func (x *Saml) GetKeyStorePassword() string {
if x != nil {
return x.KeyStorePassword
}
return ""
}
func (x *Saml) GetKeyStoreAliasName() string {
if x != nil {
return x.KeyStoreAliasName
}
return ""
}
func (x *Saml) GetRedirectHostname() string {
if x != nil {
return x.RedirectHostname
}
return ""
}
func (x *Saml) GetRedirectBasePath() string {
if x != nil {
return x.RedirectBasePath
}
return ""
}
func (x *Saml) GetRedirectProtocol() string {
if x != nil {
return x.RedirectProtocol
}
return ""
}
func (x *Saml) GetUserAttributeMapping() *Saml_UserAttributes {
if x != nil {
return x.UserAttributeMapping
}
return nil
}
func (x *Saml) GetSignatureDigest() Saml_SignatureDigest {
if x != nil {
return x.SignatureDigest
}
return Saml_UNSPECIFIED
}
// Configuration for authentication via LDAP.
// Lightweight Directory Access Protocol (LDAP) is a standard way many organizations
// maintain user credentials and group memberships. Spinnaker uses the standard
// 'bind' approach for user authentication. This is a fancy way of saying that
// Gate uses your username and password to login to the LDAP server, and if the
// connection is successful, you're considered authenticated.
type Ldap struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Whether the authentication method is enabled.
Enabled *wrapperspb.BoolValue `protobuf:"bytes,1,opt,name=enabled,proto3" json:"enabled,omitempty"`
// ldap:// or ldaps:// url of the LDAP server.
Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"`
// The pattern for finding a user's DN using simple pattern matching. For example,
// if your LDAP server has the URL ldap://mysite.com/dc=spinnaker,dc=org, and
// you have the pattern 'uid={0},ou=members', 'me' will map to a DN
// uid=me,ou=members,dc=spinnaker,dc=org. If no match is found, will try to
// find the user using user-search-filter, if set.
UserDnPattern string `protobuf:"bytes,3,opt,name=userDnPattern,proto3" json:"userDnPattern,omitempty"`
// The part of the directory tree under which user searches should be performed.
// If user-search-base isn't supplied, the search will be performed from the root.
UserSearchBase string `protobuf:"bytes,4,opt,name=userSearchBase,proto3" json:"userSearchBase,omitempty"`
// The filter to use when searching for a user's DN. Will search either from
// user-search-base (if specified) or root for entires matching the filter, then
// attempt to bind as that user with the login password. For example, the filter
// 'uid={0}' would apply to any user where uid matched the user's login name. If
// -user-dn-pattern is also specified, will attempt to find a match using the
// specified pattern first, before searching with the specified search filter
// if no match is found from the pattern.
UserSearchFilter string `protobuf:"bytes,5,opt,name=userSearchFilter,proto3" json:"userSearchFilter,omitempty"`
// An LDAP manager user is required for binding to the LDAP server for the user
// authentication process. This property refers to the DN of that entry. I.e.
// this is not the user which will be authenticated when logging into DHIS2,
// rather the user which binds to the LDAP server in order to do the authentication.
ManagerDn string `protobuf:"bytes,6,opt,name=managerDn,proto3" json:"managerDn,omitempty"`
// The password for the LDAP manager user.
ManagerPassword string `protobuf:"bytes,7,opt,name=managerPassword,proto3" json:"managerPassword,omitempty"`
// The part of the directory tree under which group searches should be performed.
GroupSearchBase string `protobuf:"bytes,8,opt,name=groupSearchBase,proto3" json:"groupSearchBase,omitempty"`
}
func (x *Ldap) Reset() {
*x = Ldap{}
if protoimpl.UnsafeEnabled {
mi := &file_security_authn_authn_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Ldap) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Ldap) ProtoMessage() {}
func (x *Ldap) ProtoReflect() protoreflect.Message {
mi := &file_security_authn_authn_proto_msgTypes[6]
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 Ldap.ProtoReflect.Descriptor instead.
func (*Ldap) Descriptor() ([]byte, []int) {
return file_security_authn_authn_proto_rawDescGZIP(), []int{6}
}
func (x *Ldap) GetEnabled() *wrapperspb.BoolValue {
if x != nil {
return x.Enabled
}
return nil
}
func (x *Ldap) GetUrl() string {
if x != nil {
return x.Url
}
return ""
}
func (x *Ldap) GetUserDnPattern() string {
if x != nil {
return x.UserDnPattern
}
return ""
}
func (x *Ldap) GetUserSearchBase() string {
if x != nil {
return x.UserSearchBase
}
return ""
}
func (x *Ldap) GetUserSearchFilter() string {
if x != nil {
return x.UserSearchFilter
}
return ""
}
func (x *Ldap) GetManagerDn() string {
if x != nil {
return x.ManagerDn
}
return ""
}
func (x *Ldap) GetManagerPassword() string {
if x != nil {
return x.ManagerPassword
}
return ""
}
func (x *Ldap) GetGroupSearchBase() string {
if x != nil {
return x.GroupSearchBase
}
return ""
}
// Configuration for authentication via X509 certificates.
// X509 authenticates users via client certificate and a corresponding private key.
// These certificates optionally provide authorization information via custom OIDs
// with corresponding group information for the user. This can be configured via -roleOid.
type X509 struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Whether the authentication method is enabled.
Enabled *wrapperspb.BoolValue `protobuf:"bytes,1,opt,name=enabled,proto3" json:"enabled,omitempty"`
// The OID that encodes roles that the user specified in the x509 certificate
// belongs to.
RoleOid string `protobuf:"bytes,2,opt,name=roleOid,proto3" json:"roleOid,omitempty"`
// The regex used to parse the subject principal name embedded in the x509
// certificate if necessary.
SubjectPrincipalRegex string `protobuf:"bytes,3,opt,name=subjectPrincipalRegex,proto3" json:"subjectPrincipalRegex,omitempty"`
}
func (x *X509) Reset() {
*x = X509{}
if protoimpl.UnsafeEnabled {
mi := &file_security_authn_authn_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *X509) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*X509) ProtoMessage() {}
func (x *X509) ProtoReflect() protoreflect.Message {
mi := &file_security_authn_authn_proto_msgTypes[7]
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 X509.ProtoReflect.Descriptor instead.
func (*X509) Descriptor() ([]byte, []int) {
return file_security_authn_authn_proto_rawDescGZIP(), []int{7}
}
func (x *X509) GetEnabled() *wrapperspb.BoolValue {
if x != nil {
return x.Enabled
}
return nil
}
func (x *X509) GetRoleOid() string {
if x != nil {
return x.RoleOid
}
return ""
}
func (x *X509) GetSubjectPrincipalRegex() string {
if x != nil {
return x.SubjectPrincipalRegex
}
return ""
}
// Configuration for authentication via Google Cloud Identity-Aware Proxy.
// Google Cloud Identity-Aware Proxy (IAP) is an authentication model that utilizes
// Google OAuth 2.0 and an authorization service to provide access control for users
// of GCP. After a user has been authenticated and authorized by IAP's service, a
// JWT token is passed along which Spinnaker uses to check for authenticity and to
// get the user email from the payload and sign the user in. To configure IAP, set
// the audience field retrieved from the IAP console.
type Iap struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Whether the authentication method is enabled.
Enabled *wrapperspb.BoolValue `protobuf:"bytes,1,opt,name=enabled,proto3" json:"enabled,omitempty"`
// The HTTP request header that contains the JWT token.
JwtHeader string `protobuf:"bytes,2,opt,name=jwtHeader,proto3" json:"jwtHeader,omitempty"`
// The Issuer from the ID token payload.
IssuerId string `protobuf:"bytes,3,opt,name=issuerId,proto3" json:"issuerId,omitempty"`
// The Audience from the ID token payload. You can retrieve this field from the
// IAP console: https://cloud.google.com/iap/docs/signed-headers-howto#verify_the_id_token_header.
Audience string `protobuf:"bytes,4,opt,name=audience,proto3" json:"audience,omitempty"`
// The URL containing the Cloud IAP public keys in JWK format.
IapVerifyKeyUrl string `protobuf:"bytes,5,opt,name=iapVerifyKeyUrl,proto3" json:"iapVerifyKeyUrl,omitempty"`
}
func (x *Iap) Reset() {
*x = Iap{}
if protoimpl.UnsafeEnabled {
mi := &file_security_authn_authn_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Iap) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Iap) ProtoMessage() {}
func (x *Iap) ProtoReflect() protoreflect.Message {
mi := &file_security_authn_authn_proto_msgTypes[8]
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 Iap.ProtoReflect.Descriptor instead.