github.com/google/fleetspeak@v0.1.15-0.20240426164851-4f31f62c1aea/fleetspeak/src/server/components/proto/fleetspeak_components/config.proto (about) 1 // Copyright 2019 Google Inc. 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 fleetspeak.components; 18 19 option go_package = "github.com/google/fleetspeak/fleetspeak/src/server/components/proto/fleetspeak_components"; 20 21 message Config { 22 // Mysql connection string. Required. 23 // 24 // https://github.com/go-sql-driver/mysql#dsn-data-source-name 25 string mysql_data_source_name = 1; 26 27 // The parameters required to stand up an https server. 28 HttpsConfig https_config = 2; 29 30 // Parameters required to stand up an admin server. Either this or 31 // "https_config", or both, have to be specified. 32 AdminConfig admin_config = 7; 33 34 // Parameters required to set up a stats collector. 35 StatsConfig stats_config = 8; 36 37 // Parameters required to stand up a http health check service. Optional. 38 HealthCheckConfig health_check_config = 9; 39 40 // If set, expects connections to arrive through a load balance implementing 41 // the PROXY protocol. 42 // 43 // https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt 44 bool proxy_protocol = 3; 45 46 // If set, only clients reporting this label will be allowed to 47 // connect. Meant as a sanity check that the client and server are for the 48 // same Fleetspeak installation. 49 string required_label = 4; 50 51 // If set, the bind address to listen on to receive notifications from other 52 // fleetspeak servers. Optional, but strongly recommended for installations 53 // involving multiple servers. e.g. ":8080", "localhost:1234". 54 string notification_listen_address = 5; 55 56 // If set, other servers will be told to use this address in order to connect 57 // with this server's notification port. Has no effect when 58 // notification_listen_address is unset. 59 string notification_public_address = 6; 60 61 // If set, a HTTP notifier implementation is used for sending notifications. 62 // Set this if running a pure admin server (without a notification listener) 63 // in a distributed setup. 64 bool notification_use_http_notifier = 10; 65 } 66 67 // In this mode Fleetspeak accepts a mTLS connection directly from the client. 68 // The Fleetspeak frontend uses the client certificate from the HTTPS request 69 // to identify the client. 70 // This is the default operating mode of the frontend. 71 message MTlsConfig {} 72 73 // In this mode Fleetspeak accepts a TLS connection from an intermediate actor 74 // which terminates the TLS protocol (typically a layer 7 load balancer). 75 // The intermediate actor passes the client certificate it receives from the 76 // original TLS connection to the frontend via an HTTP header. 77 // The Fleetspeak frontend uses the certificate passed in this header to 78 // identify the client. 79 message HttpsHeaderConfig { 80 // The name of the HTTP header set by the intermediary that contains the 81 // forwarded client certificate. Required. 82 string client_certificate_header = 1; 83 } 84 85 // In this mode Fleetspeak accepts a TLS connection from an intermediate actor 86 // which terminates the TLS protocol (typically a layer 7 load balancer). 87 // The original client passes the certificate it uses for the TLS protocol to 88 // the frontend via an HTTP header. 89 // The intermediate actor passes a SHA256 checksum of client certificate it 90 // receives from the original TLS connection to the frontend via a second HTTP 91 // header. 92 // The Fleetspeak frontend uses the certificate passed passed from the client 93 // to identify it, and uses the hash from the intermediate actor to verify that 94 // this certificate was in fact used in the original TLS connection. 95 message HttpsHeaderChecksumConfig { 96 // The name of the HTTP header set by the client that contains the original 97 // client certificate. Required. 98 string client_certificate_header = 1; 99 // The name of the HTTP header set by the intermediary that contains the 100 // client certificate checksum. Required. 101 string client_certificate_checksum_header = 2; 102 } 103 104 // In this mode Fleetspeak runs in clear text (HTTP). This allows for 105 // Fleetspeak to be deployed in a Service Mesh behind a side car proxy that 106 // offers a secure communications channel. 107 // Fleetspeak accepts a TLS connection from an intermediate actor which 108 // terminates the TLS protocol (typically a layer 7 load balancer). 109 // The intermediate actor passes the client certificate it receives from the 110 // original TLS connection to the frontend via an HTTP header. 111 // The Fleetspeak frontend uses the certificate passed in this header to 112 // identify the client. 113 message CleartextHeaderConfig { 114 // The name of the HTTP header set by the intermediary that contains the 115 // forwarded client certificate. Required. 116 string client_certificate_header = 1; 117 } 118 119 // In this mode Fleetspeak runs in clear text (HTTP). This allows for 120 // Fleetspeak to be deployed in a Service Mesh behind a side car proxy that 121 // offers a secure communications channel. 122 // Fleetspeak accepts a TLS connection from an intermediate actor which 123 // terminates the TLS protocol (typically a layer 7 load balancer). 124 // The original client passes the certificate it uses for the TLS protocol to 125 // the frontend via an HTTP header. 126 // The intermediate actor passes a SHA256 checksum of client certificate it 127 // receives from the original TLS connection to the frontend via a second HTTP 128 // header. 129 // The Fleetspeak frontend uses the certificate passed passed from the client 130 // to identify it, and uses the hash from the intermediate actor to verify that 131 // this certificate was in fact used in the original TLS connection. 132 message CleartextHeaderChecksumConfig { 133 // The name of the HTTP header set by the client that contains the original 134 // client certificate. Required. 135 string client_certificate_header = 1; 136 // The name of the HTTP header set by the intermediary that contains the 137 // client certificate checksum. Required. 138 string client_certificate_checksum_header = 2; 139 } 140 141 // In this mode Fleetspeak runs in clear text (HTTP). This allows for 142 // Fleetspeak to be deployed in a Service Mesh behind a side car proxy that 143 // offers a secure communications channel. 144 // Fleetspeak accepts a TLS connection from an intermediate envoy which 145 // terminates the mTLS protocol exchange. 146 // The intermediate envoy passes the client certificate it receives from the 147 // original mTLS connection to the frontend via an HTTP header. 148 // The Fleetspeak frontend uses the certificate passed in this header to 149 // identify the client. 150 message CleartextXfccConfig { 151 // The name of the HTTP header set by the intermediary envoy that contains 152 // the forwarded client certificate. Required. 153 string client_certificate_header = 1; 154 } 155 156 // The frontend config determines how the Fleetspeak frontend communicates with 157 // clients and how it identifies them. 158 message FrontendConfig { 159 // The mode in which the frontend should operate. Defaults to MTlsConfig. 160 // 161 // Note: Typically MTlsConfig should be used. The other options are only used 162 // in scenarios where a direct TLS connection between client and server is not 163 // possible. 164 oneof frontend_mode { 165 MTlsConfig mtls_config = 7; 166 HttpsHeaderConfig https_header_config = 8; 167 HttpsHeaderChecksumConfig https_header_checksum_config = 9; 168 CleartextHeaderConfig cleartext_header_config = 10; 169 CleartextHeaderChecksumConfig cleartext_header_checksum_config = 11; 170 CleartextXfccConfig cleartext_xfcc_config = 12; 171 } 172 } 173 174 message HttpsConfig { 175 reserved 5, 6; 176 177 // The bind address to listen on for client connections, e.g. ":443" or 178 // "localhost:1234". Required. 179 string listen_address = 1; 180 181 // A certificate chain which identifies the server to clients. Must lead to a 182 // certificate known to the clients. x509 format. Required, if frontend mode 183 // is not cleartext (ie neither CleartextHeaderConfig nor 184 // CleartextHeaderChecksumConfig) 185 string certificates = 2; 186 187 // The private key used to identify the server. Must match the first entry in 188 // certificates. x509 format. Required, if frontend mode is not cleartext 189 // (ie neither CleartextHeaderConfig nor CleartextHeaderChecksumConfig) 190 string key = 3; 191 192 // If set, disables long running (streaming) connections. This type of 193 // connection causes more active connections but can reduce database load and 194 // server->client communications latency. 195 bool disable_streaming = 4; 196 197 // The frontend config. 198 // Optional; If not set, Fleetspeak will default to using MTlsConfig. 199 FrontendConfig frontend_config = 7; 200 } 201 202 message AdminConfig { 203 // The bind address to listen on for connections, e.g. ":443" or 204 // "localhost:1234". Required. 205 string listen_address = 1; 206 } 207 208 message StatsConfig { 209 // The bind address to listen on for Prometheus http metric collection in the 210 // form "<host>:<port>", e.g. "localhost:2112". 211 // Optional; if no address is configured, then no stats collector 212 // will be used (i.e. noopStatsCollector). 213 string address = 1; 214 } 215 216 message HealthCheckConfig { 217 // The bind address to listen on for http health check probes in the 218 // form "<host>:<port>", e.g. "localhost:8080". 219 string listen_address = 1; 220 }