Skip to content

Commit

Permalink
security: document threat model. (#8906)
Browse files Browse the repository at this point in the history
* Add an explicit threat model to the end user facing docs, link to this from SECURITY.md

* Switch all Envoy extensions to use a new macro `envoy_cc_extension`, mandating that extensions declare a security posture. Extensions can also optionally declare `alpha` or `wip` status.

* Tag all documentation sites with their well-known Envoy names.

* Introduce tooling to automagically populate a list of known trusted/untrusted extensions in the threat model docs.

* Generate API docs for extensions that depend on `google.protobuf.Empty`. This pattern is deprecated as per envoyproxy/envoy#8933, but we need these for tooling support meanwhile.

This work was motivated by oss-fuzz issue https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=18370

Signed-off-by: Harvey Tuch <[email protected]>

Mirrored from https://github.com/envoyproxy/envoy @ 90d1094b32aa017f90cc8efcd379aeb143acabfc
  • Loading branch information
data-plane-api(CircleCI) committed Nov 11, 2019
1 parent cd96bf6 commit a3a9012
Show file tree
Hide file tree
Showing 84 changed files with 104 additions and 3 deletions.
3 changes: 3 additions & 0 deletions docs/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,13 @@ proto_library(
"//envoy/config/filter/network/ext_authz/v2:pkg",
"//envoy/config/filter/network/http_connection_manager/v2:pkg",
"//envoy/config/filter/network/mongo_proxy/v2:pkg",
"//envoy/config/filter/network/mysql_proxy/v1alpha1:pkg",
"//envoy/config/filter/network/rate_limit/v2:pkg",
"//envoy/config/filter/network/rbac/v2:pkg",
"//envoy/config/filter/network/redis_proxy/v2:pkg",
"//envoy/config/filter/network/tcp_proxy/v2:pkg",
"//envoy/config/filter/network/thrift_proxy/v2alpha1:pkg",
"//envoy/config/filter/network/zookeeper_proxy/v1alpha1:pkg",
"//envoy/config/filter/thrift/rate_limit/v2alpha1:pkg",
"//envoy/config/filter/thrift/router/v2alpha1:pkg",
"//envoy/config/grpc_credential/v2alpha:pkg",
Expand All @@ -72,6 +74,7 @@ proto_library(
"//envoy/config/rbac/v2:pkg",
"//envoy/config/resource_monitor/fixed_heap/v2alpha:pkg",
"//envoy/config/resource_monitor/injected_resource/v2alpha:pkg",
"//envoy/config/retry/previous_priorities:pkg",
"//envoy/config/trace/v2:pkg",
"//envoy/config/transport_socket/alts/v2alpha:pkg",
"//envoy/config/transport_socket/tap/v2alpha:pkg",
Expand Down
2 changes: 2 additions & 0 deletions envoy/config/accesslog/v2/als.proto
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import "validate/validate.proto";
// :ref:`AccessLog <envoy_api_msg_config.filter.accesslog.v2.AccessLog>`. This configuration will
// populate :ref:`StreamAccessLogsMessage.http_logs
// <envoy_api_field_service.accesslog.v2.StreamAccessLogsMessage.http_logs>`.
// [#extension: envoy.access_loggers.http_grpc]
message HttpGrpcAccessLogConfig {
CommonGrpcAccessLogConfig common_config = 1 [(validate.rules).message = {required: true}];

Expand All @@ -37,6 +38,7 @@ message HttpGrpcAccessLogConfig {

// Configuration for the built-in *envoy.tcp_grpc_access_log* type. This configuration will
// populate *StreamAccessLogsMessage.tcp_logs*.
// [#extension: envoy.access_loggers.tcp_grpc]
message TcpGrpcAccessLogConfig {
CommonGrpcAccessLogConfig common_config = 1 [(validate.rules).message = {required: true}];
}
Expand Down
1 change: 1 addition & 0 deletions envoy/config/accesslog/v2/file.proto
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import "google/protobuf/struct.proto";
import "validate/validate.proto";

// [#protodoc-title: File access log]
// [#extension: envoy.access_loggers.file]

// Custom configuration for an :ref:`AccessLog <envoy_api_msg_config.filter.accesslog.v2.AccessLog>`
// that writes log entries directly to a file. Configures the built-in *envoy.file_access_log*
Expand Down
2 changes: 2 additions & 0 deletions envoy/config/accesslog/v3alpha/als.proto
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import "validate/validate.proto";
// :ref:`AccessLog <envoy_api_msg_config.filter.accesslog.v3alpha.AccessLog>`. This configuration
// will populate :ref:`StreamAccessLogsMessage.http_logs
// <envoy_api_field_service.accesslog.v3alpha.StreamAccessLogsMessage.http_logs>`.
// [#extension: envoy.access_loggers.http_grpc]
message HttpGrpcAccessLogConfig {
CommonGrpcAccessLogConfig common_config = 1 [(validate.rules).message = {required: true}];

Expand All @@ -37,6 +38,7 @@ message HttpGrpcAccessLogConfig {

// Configuration for the built-in *envoy.tcp_grpc_access_log* type. This configuration will
// populate *StreamAccessLogsMessage.tcp_logs*.
// [#extension: envoy.access_loggers.tcp_grpc]
message TcpGrpcAccessLogConfig {
CommonGrpcAccessLogConfig common_config = 1 [(validate.rules).message = {required: true}];
}
Expand Down
1 change: 1 addition & 0 deletions envoy/config/accesslog/v3alpha/file.proto
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import "google/protobuf/struct.proto";
import "validate/validate.proto";

// [#protodoc-title: File access log]
// [#extension: envoy.access_loggers.file]

// Custom configuration for an :ref:`AccessLog
// <envoy_api_msg_config.filter.accesslog.v3alpha.AccessLog>` that writes log entries directly to a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import "validate/validate.proto";

// Configuration for the dynamic forward proxy cluster. See the :ref:`architecture overview
// <arch_overview_http_dynamic_forward_proxy>` for more information.
// [#extension: envoy.clusters.dynamic_forward_proxy]
message ClusterConfig {
// The DNS cache configuration that the cluster will attach to. Note this configuration must
// match that of associated :ref:`dynamic forward proxy HTTP filter configuration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import "validate/validate.proto";

// Configuration for the dynamic forward proxy cluster. See the :ref:`architecture overview
// <arch_overview_http_dynamic_forward_proxy>` for more information.
// [#extension: envoy.clusters.dynamic_forward_proxy]
message ClusterConfig {
// The DNS cache configuration that the cluster will attach to. Note this configuration must
// match that of associated :ref:`dynamic forward proxy HTTP filter configuration
Expand Down
1 change: 1 addition & 0 deletions envoy/config/cluster/redis/redis_cluster.proto
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ import "validate/validate.proto";
// cluster_refresh_timeout: 0.5s
// redirect_refresh_interval: 10s
// redirect_refresh_threshold: 10
// [#extension: envoy.clusters.redis]

message RedisClusterConfig {
// Interval between successive topology refresh requests. If not set, this defaults to 5s.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import "validate/validate.proto";
// [#protodoc-title: Adaptive Concurrency]
// Adaptive Concurrency Control :ref:`configuration overview
// <config_http_filters_adaptive_concurrency>`.
// [#extension: envoy.filters.http.adaptive_concurrency]

// Configuration parameters for the gradient controller.
message GradientControllerConfig {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import "validate/validate.proto";
// [#protodoc-title: Adaptive Concurrency]
// Adaptive Concurrency Control :ref:`configuration overview
// <config_http_filters_adaptive_concurrency>`.
// [#extension: envoy.filters.http.adaptive_concurrency]

// Configuration parameters for the gradient controller.
message GradientControllerConfig {
Expand Down
1 change: 1 addition & 0 deletions envoy/config/filter/http/buffer/v2/buffer.proto
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import "validate/validate.proto";

// [#protodoc-title: Buffer]
// Buffer :ref:`configuration overview <config_http_filters_buffer>`.
// [#extension: envoy.filters.http.buffer]

message Buffer {
reserved 2;
Expand Down
1 change: 1 addition & 0 deletions envoy/config/filter/http/csrf/v2/csrf.proto
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import "validate/validate.proto";

// [#protodoc-title: CSRF]
// Cross-Site Request Forgery :ref:`configuration overview <config_http_filters_csrf>`.
// [#extension: envoy.filters.http.csrf]

// CSRF filter config.
message CsrfPolicy {
Expand Down
1 change: 1 addition & 0 deletions envoy/config/filter/http/csrf/v3alpha/csrf.proto
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import "validate/validate.proto";

// [#protodoc-title: CSRF]
// Cross-Site Request Forgery :ref:`configuration overview <config_http_filters_csrf>`.
// [#extension: envoy.filters.http.csrf]

// CSRF filter config.
message CsrfPolicy {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import "validate/validate.proto";

// Configuration for the dynamic forward proxy HTTP filter. See the :ref:`architecture overview
// <arch_overview_http_dynamic_forward_proxy>` for more information.
// [#extension: envoy.filters.http.dynamic_forward_proxy]
message FilterConfig {
// The DNS cache configuration that the filter will attach to. Note this configuration must
// match that of associated :ref:`dynamic forward proxy cluster configuration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import "validate/validate.proto";

// Configuration for the dynamic forward proxy HTTP filter. See the :ref:`architecture overview
// <arch_overview_http_dynamic_forward_proxy>` for more information.
// [#extension: envoy.filters.http.dynamic_forward_proxy]
message FilterConfig {
// The DNS cache configuration that the filter will attach to. Note this configuration must
// match that of associated :ref:`dynamic forward proxy cluster configuration
Expand Down
1 change: 1 addition & 0 deletions envoy/config/filter/http/ext_authz/v2/ext_authz.proto
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import "validate/validate.proto";

// [#protodoc-title: External Authorization]
// External Authorization :ref:`configuration overview <config_http_filters_ext_authz>`.
// [#extension: envoy.filters.http.ext_authz]

// [#next-free-field: 11]
message ExtAuthz {
Expand Down
1 change: 1 addition & 0 deletions envoy/config/filter/http/ext_authz/v3alpha/ext_authz.proto
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import "validate/validate.proto";

// [#protodoc-title: External Authorization]
// External Authorization :ref:`configuration overview <config_http_filters_ext_authz>`.
// [#extension: envoy.filters.http.ext_authz]

// [#next-free-field: 11]
message ExtAuthz {
Expand Down
1 change: 1 addition & 0 deletions envoy/config/filter/http/fault/v2/fault.proto
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import "validate/validate.proto";

// [#protodoc-title: Fault Injection]
// Fault Injection :ref:`configuration overview <config_http_filters_fault_injection>`.
// [#extension: envoy.filters.http.fault]

message FaultAbort {
reserved 1;
Expand Down
1 change: 1 addition & 0 deletions envoy/config/filter/http/fault/v3alpha/fault.proto
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import "validate/validate.proto";

// [#protodoc-title: Fault Injection]
// Fault Injection :ref:`configuration overview <config_http_filters_fault_injection>`.
// [#extension: envoy.filters.http.fault]

message FaultAbort {
reserved 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import "validate/validate.proto";
// [#protodoc-title: gRPC HTTP/1.1 Reverse Bridge]
// gRPC HTTP/1.1 Reverse Bridge :ref:`configuration overview
// <config_http_filters_grpc_http1_reverse_bridge>`.
// [#extension: envoy.filters.http.grpc_http1_reverse_bridge]

// gRPC reverse bridge filter configuration
message FilterConfig {
Expand Down
1 change: 1 addition & 0 deletions envoy/config/filter/http/grpc_stats/v2alpha/config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import "validate/validate.proto";

// [#protodoc-title: gRPC statistics] gRPC statistics filter
// :ref:`configuration overview <config_http_filters_grpc_stats>`.
// [#extension: envoy.filters.http.grpc_stats]

// gRPC statistics filter configuration
message FilterConfig {
Expand Down
1 change: 1 addition & 0 deletions envoy/config/filter/http/gzip/v2/gzip.proto
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import "validate/validate.proto";

// [#protodoc-title: Gzip]
// Gzip :ref:`configuration overview <config_http_filters_gzip>`.
// [#extension: envoy.filters.http.gzip]

// [#next-free-field: 10]
message Gzip {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import "validate/validate.proto";
// for matching load balancer subsets, logging, etc.
//
// Header to Metadata :ref:`configuration overview <config_http_filters_header_to_metadata>`.
// [#extension: envoy.filters.http.header_to_metadata]

message Config {
enum ValueType {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import "validate/validate.proto";

// [#protodoc-title: Health check]
// Health check :ref:`configuration overview <config_http_filters_health_check>`.
// [#extension: envoy.filters.http.health_check]

// [#next-free-field: 6]
message HealthCheck {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import "validate/validate.proto";

// [#protodoc-title: Health check]
// Health check :ref:`configuration overview <config_http_filters_health_check>`.
// [#extension: envoy.filters.http.health_check]

// [#next-free-field: 6]
message HealthCheck {
Expand Down
1 change: 1 addition & 0 deletions envoy/config/filter/http/ip_tagging/v2/ip_tagging.proto
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import "validate/validate.proto";

// [#protodoc-title: IP tagging]
// IP tagging :ref:`configuration overview <config_http_filters_ip_tagging>`.
// [#extension: envoy.filters.http.ip_tagging]

message IPTagging {
// The type of requests the filter should apply to. The supported types
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import "validate/validate.proto";

// [#protodoc-title: IP tagging]
// IP tagging :ref:`configuration overview <config_http_filters_ip_tagging>`.
// [#extension: envoy.filters.http.ip_tagging]

message IPTagging {
// The type of requests the filter should apply to. The supported types
Expand Down
1 change: 1 addition & 0 deletions envoy/config/filter/http/jwt_authn/v2alpha/config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import "validate/validate.proto";

// [#protodoc-title: JWT Authentication]
// JWT Authentication :ref:`configuration overview <config_http_filters_jwt_authn>`.
// [#extension: envoy.filters.http.jwt_authn]

// Please see following for JWT authentication flow:
//
Expand Down
1 change: 1 addition & 0 deletions envoy/config/filter/http/jwt_authn/v3alpha/config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import "validate/validate.proto";

// [#protodoc-title: JWT Authentication]
// JWT Authentication :ref:`configuration overview <config_http_filters_jwt_authn>`.
// [#extension: envoy.filters.http.jwt_authn]

// Please see following for JWT authentication flow:
//
Expand Down
1 change: 1 addition & 0 deletions envoy/config/filter/http/lua/v2/lua.proto
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import "validate/validate.proto";

// [#protodoc-title: Lua]
// Lua :ref:`configuration overview <config_http_filters_lua>`.
// [#extension: envoy.filters.http.lua]

message Lua {
// The Lua code that Envoy will execute. This can be a very small script that
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import "validate/validate.proto";
// The Original Src filter binds upstream connections to the original source address determined
// for the request. This address could come from something like the Proxy Protocol filter, or it
// could come from trusted http headers.
// [#extension: envoy.filters.http.original_src]
message OriginalSrc {
// Sets the SO_MARK option on the upstream connection's socket to the provided value. Used to
// ensure that non-local addresses may be routed back through envoy when binding to the original
Expand Down
1 change: 1 addition & 0 deletions envoy/config/filter/http/rate_limit/v2/rate_limit.proto
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import "validate/validate.proto";

// [#protodoc-title: Rate limit]
// Rate limit :ref:`configuration overview <config_http_filters_rate_limit>`.
// [#extension: envoy.filters.http.ratelimit]

// [#next-free-field: 8]
message RateLimit {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import "validate/validate.proto";

// [#protodoc-title: Rate limit]
// Rate limit :ref:`configuration overview <config_http_filters_rate_limit>`.
// [#extension: envoy.filters.http.ratelimit]

// [#next-free-field: 8]
message RateLimit {
Expand Down
1 change: 1 addition & 0 deletions envoy/config/filter/http/rbac/v2/rbac.proto
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import "validate/validate.proto";

// [#protodoc-title: RBAC]
// Role-Based Access Control :ref:`configuration overview <config_http_filters_rbac>`.
// [#extension: envoy.filters.http.rbac]

// RBAC filter config.
message RBAC {
Expand Down
1 change: 1 addition & 0 deletions envoy/config/filter/http/rbac/v3alpha/rbac.proto
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import "validate/validate.proto";

// [#protodoc-title: RBAC]
// Role-Based Access Control :ref:`configuration overview <config_http_filters_rbac>`.
// [#extension: envoy.filters.http.rbac]

// RBAC filter config.
message RBAC {
Expand Down
1 change: 1 addition & 0 deletions envoy/config/filter/http/router/v2/router.proto
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import "validate/validate.proto";

// [#protodoc-title: Router]
// Router :ref:`configuration overview <config_http_filters_router>`.
// [#extension: envoy.filters.http.router]

// [#next-free-field: 7]
message Router {
Expand Down
1 change: 1 addition & 0 deletions envoy/config/filter/http/router/v3alpha/router.proto
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import "validate/validate.proto";

// [#protodoc-title: Router]
// Router :ref:`configuration overview <config_http_filters_router>`.
// [#extension: envoy.filters.http.router]

// [#next-free-field: 7]
message Router {
Expand Down
1 change: 1 addition & 0 deletions envoy/config/filter/http/squash/v2/squash.proto
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import "validate/validate.proto";

// [#protodoc-title: Squash]
// Squash :ref:`configuration overview <config_http_filters_squash>`.
// [#extension: envoy.filters.http.squash]

// [#next-free-field: 6]
message Squash {
Expand Down
1 change: 1 addition & 0 deletions envoy/config/filter/http/tap/v2alpha/tap.proto
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import "validate/validate.proto";

// [#protodoc-title: Tap]
// Tap :ref:`configuration overview <config_http_filters_tap>`.
// [#extension: envoy.filters.http.tap]

// Top level configuration for the tap filter.
message Tap {
Expand Down
1 change: 1 addition & 0 deletions envoy/config/filter/http/tap/v3alpha/tap.proto
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import "validate/validate.proto";

// [#protodoc-title: Tap]
// Tap :ref:`configuration overview <config_http_filters_tap>`.
// [#extension: envoy.filters.http.tap]

// Top level configuration for the tap filter.
message Tap {
Expand Down
1 change: 1 addition & 0 deletions envoy/config/filter/http/transcoder/v2/transcoder.proto
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import "validate/validate.proto";

// [#protodoc-title: gRPC-JSON transcoder]
// gRPC-JSON transcoder :ref:`configuration overview <config_http_filters_grpc_json_transcoder>`.
// [#extension: envoy.filters.http.grpc_json_transcoder]

// [#next-free-field: 10]
message GrpcJsonTranscoder {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import "validate/validate.proto";

// [#protodoc-title: Original Src Filter]
// Use the Original source address on upstream connections.
// [#extension: envoy.filters.listener.original_src]

// The Original Src filter binds upstream connections to the original source address determined
// for the connection. This address could come from something like the Proxy Protocol filter, or it
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import "validate/validate.proto";
// [#protodoc-title: Client TLS authentication]
// Client TLS authentication
// :ref:`configuration overview <config_network_filters_client_ssl_auth>`.
// [#extension: envoy.filters.network.client_ssl_auth]

message ClientSSLAuth {
// The :ref:`cluster manager <arch_overview_cluster_manager>` cluster that runs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import "validate/validate.proto";
// [#protodoc-title: Client TLS authentication]
// Client TLS authentication
// :ref:`configuration overview <config_network_filters_client_ssl_auth>`.
// [#extension: envoy.filters.network.client_ssl_auth]

message ClientSSLAuth {
// The :ref:`cluster manager <arch_overview_cluster_manager>` cluster that runs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import "validate/validate.proto";

// [#protodoc-title: Dubbo Proxy]
// Dubbo Proxy :ref:`configuration overview <config_network_filters_dubbo_proxy>`.
// [#extension: envoy.filters.network.dubbo_proxy]

// Dubbo Protocol types supported by Envoy.
enum ProtocolType {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import "validate/validate.proto";

// [#protodoc-title: Dubbo Proxy]
// Dubbo Proxy :ref:`configuration overview <config_network_filters_dubbo_proxy>`.
// [#extension: envoy.filters.network.dubbo_proxy]

// Dubbo Protocol types supported by Envoy.
enum ProtocolType {
Expand Down
Loading

0 comments on commit a3a9012

Please sign in to comment.