...

Source file src/github.com/google/s2a-go/internal/proto/common_go_proto/common.pb.go

Documentation: github.com/google/s2a-go/internal/proto/common_go_proto

     1  // Copyright 2021 Google LLC
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //    https://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  
    15  // Code generated by protoc-gen-go. DO NOT EDIT.
    16  // versions:
    17  // 	protoc-gen-go v1.30.0
    18  // 	protoc        v3.21.12
    19  // source: internal/proto/common/common.proto
    20  
    21  package common_go_proto
    22  
    23  import (
    24  	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
    25  	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
    26  	reflect "reflect"
    27  	sync "sync"
    28  )
    29  
    30  const (
    31  	// Verify that this generated code is sufficiently up-to-date.
    32  	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
    33  	// Verify that runtime/protoimpl is sufficiently up-to-date.
    34  	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
    35  )
    36  
    37  // The ciphersuites supported by S2A. The name determines the confidentiality,
    38  // and authentication ciphers as well as the hash algorithm used for PRF in
    39  // TLS 1.2 or HKDF in TLS 1.3. Thus, the components of the name are:
    40  //   - AEAD -- for encryption and authentication, e.g., AES_128_GCM.
    41  //   - Hash algorithm -- used in PRF or HKDF, e.g., SHA256.
    42  type Ciphersuite int32
    43  
    44  const (
    45  	Ciphersuite_AES_128_GCM_SHA256       Ciphersuite = 0
    46  	Ciphersuite_AES_256_GCM_SHA384       Ciphersuite = 1
    47  	Ciphersuite_CHACHA20_POLY1305_SHA256 Ciphersuite = 2
    48  )
    49  
    50  // Enum value maps for Ciphersuite.
    51  var (
    52  	Ciphersuite_name = map[int32]string{
    53  		0: "AES_128_GCM_SHA256",
    54  		1: "AES_256_GCM_SHA384",
    55  		2: "CHACHA20_POLY1305_SHA256",
    56  	}
    57  	Ciphersuite_value = map[string]int32{
    58  		"AES_128_GCM_SHA256":       0,
    59  		"AES_256_GCM_SHA384":       1,
    60  		"CHACHA20_POLY1305_SHA256": 2,
    61  	}
    62  )
    63  
    64  func (x Ciphersuite) Enum() *Ciphersuite {
    65  	p := new(Ciphersuite)
    66  	*p = x
    67  	return p
    68  }
    69  
    70  func (x Ciphersuite) String() string {
    71  	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
    72  }
    73  
    74  func (Ciphersuite) Descriptor() protoreflect.EnumDescriptor {
    75  	return file_internal_proto_common_common_proto_enumTypes[0].Descriptor()
    76  }
    77  
    78  func (Ciphersuite) Type() protoreflect.EnumType {
    79  	return &file_internal_proto_common_common_proto_enumTypes[0]
    80  }
    81  
    82  func (x Ciphersuite) Number() protoreflect.EnumNumber {
    83  	return protoreflect.EnumNumber(x)
    84  }
    85  
    86  // Deprecated: Use Ciphersuite.Descriptor instead.
    87  func (Ciphersuite) EnumDescriptor() ([]byte, []int) {
    88  	return file_internal_proto_common_common_proto_rawDescGZIP(), []int{0}
    89  }
    90  
    91  // The TLS versions supported by S2A's handshaker module.
    92  type TLSVersion int32
    93  
    94  const (
    95  	TLSVersion_TLS1_2 TLSVersion = 0
    96  	TLSVersion_TLS1_3 TLSVersion = 1
    97  )
    98  
    99  // Enum value maps for TLSVersion.
   100  var (
   101  	TLSVersion_name = map[int32]string{
   102  		0: "TLS1_2",
   103  		1: "TLS1_3",
   104  	}
   105  	TLSVersion_value = map[string]int32{
   106  		"TLS1_2": 0,
   107  		"TLS1_3": 1,
   108  	}
   109  )
   110  
   111  func (x TLSVersion) Enum() *TLSVersion {
   112  	p := new(TLSVersion)
   113  	*p = x
   114  	return p
   115  }
   116  
   117  func (x TLSVersion) String() string {
   118  	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
   119  }
   120  
   121  func (TLSVersion) Descriptor() protoreflect.EnumDescriptor {
   122  	return file_internal_proto_common_common_proto_enumTypes[1].Descriptor()
   123  }
   124  
   125  func (TLSVersion) Type() protoreflect.EnumType {
   126  	return &file_internal_proto_common_common_proto_enumTypes[1]
   127  }
   128  
   129  func (x TLSVersion) Number() protoreflect.EnumNumber {
   130  	return protoreflect.EnumNumber(x)
   131  }
   132  
   133  // Deprecated: Use TLSVersion.Descriptor instead.
   134  func (TLSVersion) EnumDescriptor() ([]byte, []int) {
   135  	return file_internal_proto_common_common_proto_rawDescGZIP(), []int{1}
   136  }
   137  
   138  type Identity struct {
   139  	state         protoimpl.MessageState
   140  	sizeCache     protoimpl.SizeCache
   141  	unknownFields protoimpl.UnknownFields
   142  
   143  	// Types that are assignable to IdentityOneof:
   144  	//
   145  	//	*Identity_SpiffeId
   146  	//	*Identity_Hostname
   147  	//	*Identity_Uid
   148  	//	*Identity_MdbUsername
   149  	//	*Identity_GaiaId
   150  	IdentityOneof isIdentity_IdentityOneof `protobuf_oneof:"identity_oneof"`
   151  	// Additional identity-specific attributes.
   152  	Attributes map[string]string `protobuf:"bytes,3,rep,name=attributes,proto3" json:"attributes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
   153  }
   154  
   155  func (x *Identity) Reset() {
   156  	*x = Identity{}
   157  	if protoimpl.UnsafeEnabled {
   158  		mi := &file_internal_proto_common_common_proto_msgTypes[0]
   159  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   160  		ms.StoreMessageInfo(mi)
   161  	}
   162  }
   163  
   164  func (x *Identity) String() string {
   165  	return protoimpl.X.MessageStringOf(x)
   166  }
   167  
   168  func (*Identity) ProtoMessage() {}
   169  
   170  func (x *Identity) ProtoReflect() protoreflect.Message {
   171  	mi := &file_internal_proto_common_common_proto_msgTypes[0]
   172  	if protoimpl.UnsafeEnabled && x != nil {
   173  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   174  		if ms.LoadMessageInfo() == nil {
   175  			ms.StoreMessageInfo(mi)
   176  		}
   177  		return ms
   178  	}
   179  	return mi.MessageOf(x)
   180  }
   181  
   182  // Deprecated: Use Identity.ProtoReflect.Descriptor instead.
   183  func (*Identity) Descriptor() ([]byte, []int) {
   184  	return file_internal_proto_common_common_proto_rawDescGZIP(), []int{0}
   185  }
   186  
   187  func (m *Identity) GetIdentityOneof() isIdentity_IdentityOneof {
   188  	if m != nil {
   189  		return m.IdentityOneof
   190  	}
   191  	return nil
   192  }
   193  
   194  func (x *Identity) GetSpiffeId() string {
   195  	if x, ok := x.GetIdentityOneof().(*Identity_SpiffeId); ok {
   196  		return x.SpiffeId
   197  	}
   198  	return ""
   199  }
   200  
   201  func (x *Identity) GetHostname() string {
   202  	if x, ok := x.GetIdentityOneof().(*Identity_Hostname); ok {
   203  		return x.Hostname
   204  	}
   205  	return ""
   206  }
   207  
   208  func (x *Identity) GetUid() string {
   209  	if x, ok := x.GetIdentityOneof().(*Identity_Uid); ok {
   210  		return x.Uid
   211  	}
   212  	return ""
   213  }
   214  
   215  func (x *Identity) GetMdbUsername() string {
   216  	if x, ok := x.GetIdentityOneof().(*Identity_MdbUsername); ok {
   217  		return x.MdbUsername
   218  	}
   219  	return ""
   220  }
   221  
   222  func (x *Identity) GetGaiaId() string {
   223  	if x, ok := x.GetIdentityOneof().(*Identity_GaiaId); ok {
   224  		return x.GaiaId
   225  	}
   226  	return ""
   227  }
   228  
   229  func (x *Identity) GetAttributes() map[string]string {
   230  	if x != nil {
   231  		return x.Attributes
   232  	}
   233  	return nil
   234  }
   235  
   236  type isIdentity_IdentityOneof interface {
   237  	isIdentity_IdentityOneof()
   238  }
   239  
   240  type Identity_SpiffeId struct {
   241  	// The SPIFFE ID of a connection endpoint.
   242  	SpiffeId string `protobuf:"bytes,1,opt,name=spiffe_id,json=spiffeId,proto3,oneof"`
   243  }
   244  
   245  type Identity_Hostname struct {
   246  	// The hostname of a connection endpoint.
   247  	Hostname string `protobuf:"bytes,2,opt,name=hostname,proto3,oneof"`
   248  }
   249  
   250  type Identity_Uid struct {
   251  	// The UID of a connection endpoint.
   252  	Uid string `protobuf:"bytes,4,opt,name=uid,proto3,oneof"`
   253  }
   254  
   255  type Identity_MdbUsername struct {
   256  	// The MDB username of a connection endpoint.
   257  	MdbUsername string `protobuf:"bytes,5,opt,name=mdb_username,json=mdbUsername,proto3,oneof"`
   258  }
   259  
   260  type Identity_GaiaId struct {
   261  	// The Gaia ID of a connection endpoint.
   262  	GaiaId string `protobuf:"bytes,6,opt,name=gaia_id,json=gaiaId,proto3,oneof"`
   263  }
   264  
   265  func (*Identity_SpiffeId) isIdentity_IdentityOneof() {}
   266  
   267  func (*Identity_Hostname) isIdentity_IdentityOneof() {}
   268  
   269  func (*Identity_Uid) isIdentity_IdentityOneof() {}
   270  
   271  func (*Identity_MdbUsername) isIdentity_IdentityOneof() {}
   272  
   273  func (*Identity_GaiaId) isIdentity_IdentityOneof() {}
   274  
   275  var File_internal_proto_common_common_proto protoreflect.FileDescriptor
   276  
   277  var file_internal_proto_common_common_proto_rawDesc = []byte{
   278  	0x0a, 0x22, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
   279  	0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70,
   280  	0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x73, 0x32, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
   281  	0xb1, 0x02, 0x0a, 0x08, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x1d, 0x0a, 0x09,
   282  	0x73, 0x70, 0x69, 0x66, 0x66, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48,
   283  	0x00, 0x52, 0x08, 0x73, 0x70, 0x69, 0x66, 0x66, 0x65, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x08, 0x68,
   284  	0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52,
   285  	0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x03, 0x75, 0x69, 0x64,
   286  	0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x23, 0x0a,
   287  	0x0c, 0x6d, 0x64, 0x62, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20,
   288  	0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x6d, 0x64, 0x62, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61,
   289  	0x6d, 0x65, 0x12, 0x19, 0x0a, 0x07, 0x67, 0x61, 0x69, 0x61, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20,
   290  	0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x67, 0x61, 0x69, 0x61, 0x49, 0x64, 0x12, 0x43, 0x0a,
   291  	0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28,
   292  	0x0b, 0x32, 0x23, 0x2e, 0x73, 0x32, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x49, 0x64,
   293  	0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65,
   294  	0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74,
   295  	0x65, 0x73, 0x1a, 0x3d, 0x0a, 0x0f, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73,
   296  	0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01,
   297  	0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
   298  	0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38,
   299  	0x01, 0x42, 0x10, 0x0a, 0x0e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x6f, 0x6e,
   300  	0x65, 0x6f, 0x66, 0x2a, 0x5b, 0x0a, 0x0b, 0x43, 0x69, 0x70, 0x68, 0x65, 0x72, 0x73, 0x75, 0x69,
   301  	0x74, 0x65, 0x12, 0x16, 0x0a, 0x12, 0x41, 0x45, 0x53, 0x5f, 0x31, 0x32, 0x38, 0x5f, 0x47, 0x43,
   302  	0x4d, 0x5f, 0x53, 0x48, 0x41, 0x32, 0x35, 0x36, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x41, 0x45,
   303  	0x53, 0x5f, 0x32, 0x35, 0x36, 0x5f, 0x47, 0x43, 0x4d, 0x5f, 0x53, 0x48, 0x41, 0x33, 0x38, 0x34,
   304  	0x10, 0x01, 0x12, 0x1c, 0x0a, 0x18, 0x43, 0x48, 0x41, 0x43, 0x48, 0x41, 0x32, 0x30, 0x5f, 0x50,
   305  	0x4f, 0x4c, 0x59, 0x31, 0x33, 0x30, 0x35, 0x5f, 0x53, 0x48, 0x41, 0x32, 0x35, 0x36, 0x10, 0x02,
   306  	0x2a, 0x24, 0x0a, 0x0a, 0x54, 0x4c, 0x53, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x0a,
   307  	0x0a, 0x06, 0x54, 0x4c, 0x53, 0x31, 0x5f, 0x32, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x54, 0x4c,
   308  	0x53, 0x31, 0x5f, 0x33, 0x10, 0x01, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
   309  	0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x73, 0x32, 0x61, 0x2f,
   310  	0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63,
   311  	0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x67, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06,
   312  	0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
   313  }
   314  
   315  var (
   316  	file_internal_proto_common_common_proto_rawDescOnce sync.Once
   317  	file_internal_proto_common_common_proto_rawDescData = file_internal_proto_common_common_proto_rawDesc
   318  )
   319  
   320  func file_internal_proto_common_common_proto_rawDescGZIP() []byte {
   321  	file_internal_proto_common_common_proto_rawDescOnce.Do(func() {
   322  		file_internal_proto_common_common_proto_rawDescData = protoimpl.X.CompressGZIP(file_internal_proto_common_common_proto_rawDescData)
   323  	})
   324  	return file_internal_proto_common_common_proto_rawDescData
   325  }
   326  
   327  var file_internal_proto_common_common_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
   328  var file_internal_proto_common_common_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
   329  var file_internal_proto_common_common_proto_goTypes = []interface{}{
   330  	(Ciphersuite)(0), // 0: s2a.proto.Ciphersuite
   331  	(TLSVersion)(0),  // 1: s2a.proto.TLSVersion
   332  	(*Identity)(nil), // 2: s2a.proto.Identity
   333  	nil,              // 3: s2a.proto.Identity.AttributesEntry
   334  }
   335  var file_internal_proto_common_common_proto_depIdxs = []int32{
   336  	3, // 0: s2a.proto.Identity.attributes:type_name -> s2a.proto.Identity.AttributesEntry
   337  	1, // [1:1] is the sub-list for method output_type
   338  	1, // [1:1] is the sub-list for method input_type
   339  	1, // [1:1] is the sub-list for extension type_name
   340  	1, // [1:1] is the sub-list for extension extendee
   341  	0, // [0:1] is the sub-list for field type_name
   342  }
   343  
   344  func init() { file_internal_proto_common_common_proto_init() }
   345  func file_internal_proto_common_common_proto_init() {
   346  	if File_internal_proto_common_common_proto != nil {
   347  		return
   348  	}
   349  	if !protoimpl.UnsafeEnabled {
   350  		file_internal_proto_common_common_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
   351  			switch v := v.(*Identity); i {
   352  			case 0:
   353  				return &v.state
   354  			case 1:
   355  				return &v.sizeCache
   356  			case 2:
   357  				return &v.unknownFields
   358  			default:
   359  				return nil
   360  			}
   361  		}
   362  	}
   363  	file_internal_proto_common_common_proto_msgTypes[0].OneofWrappers = []interface{}{
   364  		(*Identity_SpiffeId)(nil),
   365  		(*Identity_Hostname)(nil),
   366  		(*Identity_Uid)(nil),
   367  		(*Identity_MdbUsername)(nil),
   368  		(*Identity_GaiaId)(nil),
   369  	}
   370  	type x struct{}
   371  	out := protoimpl.TypeBuilder{
   372  		File: protoimpl.DescBuilder{
   373  			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
   374  			RawDescriptor: file_internal_proto_common_common_proto_rawDesc,
   375  			NumEnums:      2,
   376  			NumMessages:   2,
   377  			NumExtensions: 0,
   378  			NumServices:   0,
   379  		},
   380  		GoTypes:           file_internal_proto_common_common_proto_goTypes,
   381  		DependencyIndexes: file_internal_proto_common_common_proto_depIdxs,
   382  		EnumInfos:         file_internal_proto_common_common_proto_enumTypes,
   383  		MessageInfos:      file_internal_proto_common_common_proto_msgTypes,
   384  	}.Build()
   385  	File_internal_proto_common_common_proto = out.File
   386  	file_internal_proto_common_common_proto_rawDesc = nil
   387  	file_internal_proto_common_common_proto_goTypes = nil
   388  	file_internal_proto_common_common_proto_depIdxs = nil
   389  }
   390  

View as plain text