| 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 |
syntax = "proto3"; |
| 16 |
|
| 17 |
package s2a.proto.v2; |
| 18 |
|
| 19 |
option go_package = "github.com/google/s2a/internal/proto/v2/s2a_context_go_proto"; |
| 20 |
|
| 21 |
import "internal/proto/v2/common/common.proto"; |
| 22 |
|
| 23 |
message S2AContext { |
| 24 |
reserved 5, 7, 8; |
| 25 |
|
| 26 |
// The SPIFFE ID from the peer leaf certificate, if present. |
| 27 |
// |
| 28 |
// This field is only populated if the leaf certificate is a valid SPIFFE |
| 29 |
// SVID; in particular, there is a unique URI SAN and this URI SAN is a valid |
| 30 |
// SPIFFE ID. |
| 31 |
string leaf_cert_spiffe_id = 1; |
| 32 |
|
| 33 |
// The URIs that are present in the SubjectAltName extension of the peer leaf |
| 34 |
// certificate. |
| 35 |
// |
| 36 |
// Note that the extracted URIs are not validated and may not be properly |
| 37 |
// formatted. |
| 38 |
repeated string leaf_cert_uris = 2; |
| 39 |
|
| 40 |
// The DNSNames that are present in the SubjectAltName extension of the peer |
| 41 |
// leaf certificate. |
| 42 |
repeated string leaf_cert_dnsnames = 3; |
| 43 |
|
| 44 |
// The (ordered) list of fingerprints in the certificate chain used to verify |
| 45 |
// the given leaf certificate. The order MUST be from leaf certificate |
| 46 |
// fingerprint to root certificate fingerprint. |
| 47 |
// |
| 48 |
// A fingerprint is the base-64 encoding of the SHA256 hash of the |
| 49 |
// DER-encoding of a certificate. The list MAY be populated even if the peer |
| 50 |
// certificate chain was NOT validated successfully. |
| 51 |
repeated string peer_certificate_chain_fingerprints = 4; |
| 52 |
|
| 53 |
// The local identity used during session setup. |
| 54 |
Identity local_identity = 9; |
| 55 |
|
| 56 |
// The SHA256 hash of the DER-encoding of the local leaf certificate used in |
| 57 |
// the handshake. |
| 58 |
bytes local_leaf_cert_fingerprint = 6; |
| 59 |
} |
| 60 |
|