Debian Codegraph @

internal/proto/v2/common/common.proto

raw
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/common_go_proto";
20
21 // The TLS 1.0-1.2 ciphersuites that the application can negotiate when using
22 // S2A.
23 enum Ciphersuite {
24 CIPHERSUITE_UNSPECIFIED = 0;
25 CIPHERSUITE_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 = 1;
26 CIPHERSUITE_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 = 2;
27 CIPHERSUITE_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 = 3;
28 CIPHERSUITE_ECDHE_RSA_WITH_AES_128_GCM_SHA256 = 4;
29 CIPHERSUITE_ECDHE_RSA_WITH_AES_256_GCM_SHA384 = 5;
30 CIPHERSUITE_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 = 6;
31 }
32
33 // The TLS versions supported by S2A's handshaker module.
34 enum TLSVersion {
35 TLS_VERSION_UNSPECIFIED = 0;
36 TLS_VERSION_1_0 = 1;
37 TLS_VERSION_1_1 = 2;
38 TLS_VERSION_1_2 = 3;
39 TLS_VERSION_1_3 = 4;
40 }
41
42 // The side in the TLS connection.
43 enum ConnectionSide {
44 CONNECTION_SIDE_UNSPECIFIED = 0;
45 CONNECTION_SIDE_CLIENT = 1;
46 CONNECTION_SIDE_SERVER = 2;
47 }
48
49 // The ALPN protocols that the application can negotiate during a TLS handshake.
50 enum AlpnProtocol {
51 ALPN_PROTOCOL_UNSPECIFIED = 0;
52 ALPN_PROTOCOL_GRPC = 1;
53 ALPN_PROTOCOL_HTTP2 = 2;
54 ALPN_PROTOCOL_HTTP1_1 = 3;
55 }
56
57 message Identity {
58 oneof identity_oneof {
59 // The SPIFFE ID of a connection endpoint.
60 string spiffe_id = 1;
61
62 // The hostname of a connection endpoint.
63 string hostname = 2;
64
65 // The UID of a connection endpoint.
66 string uid = 4;
67
68 // The username of a connection endpoint.
69 string username = 5;
70
71 // The GCP ID of a connection endpoint.
72 string gcp_id = 6;
73 }
74
75 // Additional identity-specific attributes.
76 map<string, string> attributes = 3;
77 }