...

Source file src/github.com/google/s2a-go/internal/proto/v2/s2a_context_go_proto/s2a_context.pb.go

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

     1  // Copyright 2022 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/v2/s2a_context/s2a_context.proto
    20  
    21  package s2a_context_go_proto
    22  
    23  import (
    24  	common_go_proto "github.com/google/s2a-go/internal/proto/common_go_proto"
    25  	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
    26  	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
    27  	reflect "reflect"
    28  	sync "sync"
    29  )
    30  
    31  const (
    32  	// Verify that this generated code is sufficiently up-to-date.
    33  	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
    34  	// Verify that runtime/protoimpl is sufficiently up-to-date.
    35  	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
    36  )
    37  
    38  type S2AContext struct {
    39  	state         protoimpl.MessageState
    40  	sizeCache     protoimpl.SizeCache
    41  	unknownFields protoimpl.UnknownFields
    42  
    43  	// The SPIFFE ID from the peer leaf certificate, if present.
    44  	//
    45  	// This field is only populated if the leaf certificate is a valid SPIFFE
    46  	// SVID; in particular, there is a unique URI SAN and this URI SAN is a valid
    47  	// SPIFFE ID.
    48  	LeafCertSpiffeId string `protobuf:"bytes,1,opt,name=leaf_cert_spiffe_id,json=leafCertSpiffeId,proto3" json:"leaf_cert_spiffe_id,omitempty"`
    49  	// The URIs that are present in the SubjectAltName extension of the peer leaf
    50  	// certificate.
    51  	//
    52  	// Note that the extracted URIs are not validated and may not be properly
    53  	// formatted.
    54  	LeafCertUris []string `protobuf:"bytes,2,rep,name=leaf_cert_uris,json=leafCertUris,proto3" json:"leaf_cert_uris,omitempty"`
    55  	// The DNSNames that are present in the SubjectAltName extension of the peer
    56  	// leaf certificate.
    57  	LeafCertDnsnames []string `protobuf:"bytes,3,rep,name=leaf_cert_dnsnames,json=leafCertDnsnames,proto3" json:"leaf_cert_dnsnames,omitempty"`
    58  	// The (ordered) list of fingerprints in the certificate chain used to verify
    59  	// the given leaf certificate. The order MUST be from leaf certificate
    60  	// fingerprint to root certificate fingerprint.
    61  	//
    62  	// A fingerprint is the base-64 encoding of the SHA256 hash of the
    63  	// DER-encoding of a certificate. The list MAY be populated even if the peer
    64  	// certificate chain was NOT validated successfully.
    65  	PeerCertificateChainFingerprints []string `protobuf:"bytes,4,rep,name=peer_certificate_chain_fingerprints,json=peerCertificateChainFingerprints,proto3" json:"peer_certificate_chain_fingerprints,omitempty"`
    66  	// The local identity used during session setup.
    67  	LocalIdentity *common_go_proto.Identity `protobuf:"bytes,5,opt,name=local_identity,json=localIdentity,proto3" json:"local_identity,omitempty"`
    68  	// The SHA256 hash of the DER-encoding of the local leaf certificate used in
    69  	// the handshake.
    70  	LocalLeafCertFingerprint []byte `protobuf:"bytes,6,opt,name=local_leaf_cert_fingerprint,json=localLeafCertFingerprint,proto3" json:"local_leaf_cert_fingerprint,omitempty"`
    71  }
    72  
    73  func (x *S2AContext) Reset() {
    74  	*x = S2AContext{}
    75  	if protoimpl.UnsafeEnabled {
    76  		mi := &file_internal_proto_v2_s2a_context_s2a_context_proto_msgTypes[0]
    77  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    78  		ms.StoreMessageInfo(mi)
    79  	}
    80  }
    81  
    82  func (x *S2AContext) String() string {
    83  	return protoimpl.X.MessageStringOf(x)
    84  }
    85  
    86  func (*S2AContext) ProtoMessage() {}
    87  
    88  func (x *S2AContext) ProtoReflect() protoreflect.Message {
    89  	mi := &file_internal_proto_v2_s2a_context_s2a_context_proto_msgTypes[0]
    90  	if protoimpl.UnsafeEnabled && x != nil {
    91  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    92  		if ms.LoadMessageInfo() == nil {
    93  			ms.StoreMessageInfo(mi)
    94  		}
    95  		return ms
    96  	}
    97  	return mi.MessageOf(x)
    98  }
    99  
   100  // Deprecated: Use S2AContext.ProtoReflect.Descriptor instead.
   101  func (*S2AContext) Descriptor() ([]byte, []int) {
   102  	return file_internal_proto_v2_s2a_context_s2a_context_proto_rawDescGZIP(), []int{0}
   103  }
   104  
   105  func (x *S2AContext) GetLeafCertSpiffeId() string {
   106  	if x != nil {
   107  		return x.LeafCertSpiffeId
   108  	}
   109  	return ""
   110  }
   111  
   112  func (x *S2AContext) GetLeafCertUris() []string {
   113  	if x != nil {
   114  		return x.LeafCertUris
   115  	}
   116  	return nil
   117  }
   118  
   119  func (x *S2AContext) GetLeafCertDnsnames() []string {
   120  	if x != nil {
   121  		return x.LeafCertDnsnames
   122  	}
   123  	return nil
   124  }
   125  
   126  func (x *S2AContext) GetPeerCertificateChainFingerprints() []string {
   127  	if x != nil {
   128  		return x.PeerCertificateChainFingerprints
   129  	}
   130  	return nil
   131  }
   132  
   133  func (x *S2AContext) GetLocalIdentity() *common_go_proto.Identity {
   134  	if x != nil {
   135  		return x.LocalIdentity
   136  	}
   137  	return nil
   138  }
   139  
   140  func (x *S2AContext) GetLocalLeafCertFingerprint() []byte {
   141  	if x != nil {
   142  		return x.LocalLeafCertFingerprint
   143  	}
   144  	return nil
   145  }
   146  
   147  var File_internal_proto_v2_s2a_context_s2a_context_proto protoreflect.FileDescriptor
   148  
   149  var file_internal_proto_v2_s2a_context_s2a_context_proto_rawDesc = []byte{
   150  	0x0a, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
   151  	0x2f, 0x76, 0x32, 0x2f, 0x73, 0x32, 0x61, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2f,
   152  	0x73, 0x32, 0x61, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74,
   153  	0x6f, 0x12, 0x0c, 0x73, 0x32, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x76, 0x32, 0x1a,
   154  	0x22, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f,
   155  	0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72,
   156  	0x6f, 0x74, 0x6f, 0x22, 0xd9, 0x02, 0x0a, 0x0a, 0x53, 0x32, 0x41, 0x43, 0x6f, 0x6e, 0x74, 0x65,
   157  	0x78, 0x74, 0x12, 0x2d, 0x0a, 0x13, 0x6c, 0x65, 0x61, 0x66, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x5f,
   158  	0x73, 0x70, 0x69, 0x66, 0x66, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
   159  	0x10, 0x6c, 0x65, 0x61, 0x66, 0x43, 0x65, 0x72, 0x74, 0x53, 0x70, 0x69, 0x66, 0x66, 0x65, 0x49,
   160  	0x64, 0x12, 0x24, 0x0a, 0x0e, 0x6c, 0x65, 0x61, 0x66, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x5f, 0x75,
   161  	0x72, 0x69, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x6c, 0x65, 0x61, 0x66, 0x43,
   162  	0x65, 0x72, 0x74, 0x55, 0x72, 0x69, 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x6c, 0x65, 0x61, 0x66, 0x5f,
   163  	0x63, 0x65, 0x72, 0x74, 0x5f, 0x64, 0x6e, 0x73, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x03, 0x20,
   164  	0x03, 0x28, 0x09, 0x52, 0x10, 0x6c, 0x65, 0x61, 0x66, 0x43, 0x65, 0x72, 0x74, 0x44, 0x6e, 0x73,
   165  	0x6e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x4d, 0x0a, 0x23, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x63, 0x65,
   166  	0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f,
   167  	0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03,
   168  	0x28, 0x09, 0x52, 0x20, 0x70, 0x65, 0x65, 0x72, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63,
   169  	0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x46, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72,
   170  	0x69, 0x6e, 0x74, 0x73, 0x12, 0x3a, 0x0a, 0x0e, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x69, 0x64,
   171  	0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x73,
   172  	0x32, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74,
   173  	0x79, 0x52, 0x0d, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79,
   174  	0x12, 0x3d, 0x0a, 0x1b, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x6c, 0x65, 0x61, 0x66, 0x5f, 0x63,
   175  	0x65, 0x72, 0x74, 0x5f, 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x18,
   176  	0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x18, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x4c, 0x65, 0x61, 0x66,
   177  	0x43, 0x65, 0x72, 0x74, 0x46, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x42,
   178  	0x3e, 0x5a, 0x3c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f,
   179  	0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x73, 0x32, 0x61, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61,
   180  	0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x76, 0x32, 0x2f, 0x73, 0x32, 0x61, 0x5f, 0x63,
   181  	0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x67, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
   182  	0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
   183  }
   184  
   185  var (
   186  	file_internal_proto_v2_s2a_context_s2a_context_proto_rawDescOnce sync.Once
   187  	file_internal_proto_v2_s2a_context_s2a_context_proto_rawDescData = file_internal_proto_v2_s2a_context_s2a_context_proto_rawDesc
   188  )
   189  
   190  func file_internal_proto_v2_s2a_context_s2a_context_proto_rawDescGZIP() []byte {
   191  	file_internal_proto_v2_s2a_context_s2a_context_proto_rawDescOnce.Do(func() {
   192  		file_internal_proto_v2_s2a_context_s2a_context_proto_rawDescData = protoimpl.X.CompressGZIP(file_internal_proto_v2_s2a_context_s2a_context_proto_rawDescData)
   193  	})
   194  	return file_internal_proto_v2_s2a_context_s2a_context_proto_rawDescData
   195  }
   196  
   197  var file_internal_proto_v2_s2a_context_s2a_context_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
   198  var file_internal_proto_v2_s2a_context_s2a_context_proto_goTypes = []interface{}{
   199  	(*S2AContext)(nil),               // 0: s2a.proto.v2.S2AContext
   200  	(*common_go_proto.Identity)(nil), // 1: s2a.proto.Identity
   201  }
   202  var file_internal_proto_v2_s2a_context_s2a_context_proto_depIdxs = []int32{
   203  	1, // 0: s2a.proto.v2.S2AContext.local_identity:type_name -> s2a.proto.Identity
   204  	1, // [1:1] is the sub-list for method output_type
   205  	1, // [1:1] is the sub-list for method input_type
   206  	1, // [1:1] is the sub-list for extension type_name
   207  	1, // [1:1] is the sub-list for extension extendee
   208  	0, // [0:1] is the sub-list for field type_name
   209  }
   210  
   211  func init() { file_internal_proto_v2_s2a_context_s2a_context_proto_init() }
   212  func file_internal_proto_v2_s2a_context_s2a_context_proto_init() {
   213  	if File_internal_proto_v2_s2a_context_s2a_context_proto != nil {
   214  		return
   215  	}
   216  	if !protoimpl.UnsafeEnabled {
   217  		file_internal_proto_v2_s2a_context_s2a_context_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
   218  			switch v := v.(*S2AContext); i {
   219  			case 0:
   220  				return &v.state
   221  			case 1:
   222  				return &v.sizeCache
   223  			case 2:
   224  				return &v.unknownFields
   225  			default:
   226  				return nil
   227  			}
   228  		}
   229  	}
   230  	type x struct{}
   231  	out := protoimpl.TypeBuilder{
   232  		File: protoimpl.DescBuilder{
   233  			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
   234  			RawDescriptor: file_internal_proto_v2_s2a_context_s2a_context_proto_rawDesc,
   235  			NumEnums:      0,
   236  			NumMessages:   1,
   237  			NumExtensions: 0,
   238  			NumServices:   0,
   239  		},
   240  		GoTypes:           file_internal_proto_v2_s2a_context_s2a_context_proto_goTypes,
   241  		DependencyIndexes: file_internal_proto_v2_s2a_context_s2a_context_proto_depIdxs,
   242  		MessageInfos:      file_internal_proto_v2_s2a_context_s2a_context_proto_msgTypes,
   243  	}.Build()
   244  	File_internal_proto_v2_s2a_context_s2a_context_proto = out.File
   245  	file_internal_proto_v2_s2a_context_s2a_context_proto_rawDesc = nil
   246  	file_internal_proto_v2_s2a_context_s2a_context_proto_goTypes = nil
   247  	file_internal_proto_v2_s2a_context_s2a_context_proto_depIdxs = nil
   248  }
   249  

View as plain text