Skip to content

Commit

Permalink
Merge branch 'main' into allow-upstream-half-close
Browse files Browse the repository at this point in the history
  • Loading branch information
yanavlasov committed Jun 28, 2024
2 parents f24bc34 + 3feff04 commit 0e881dc
Show file tree
Hide file tree
Showing 254 changed files with 5,863 additions and 1,412 deletions.
21 changes: 12 additions & 9 deletions api/envoy/config/cluster/v3/cluster.proto
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ message Cluster {
// The name of the match, used in stats generation.
string name = 1 [(validate.rules).string = {min_len: 1}];

// Optional endpoint metadata match criteria.
// Optional metadata match criteria.
// The connection to the endpoint with metadata matching what is set in this field
// will use the transport socket configuration specified here.
// The endpoint's metadata entry in ``envoy.transport_socket_match`` is used to match
Expand Down Expand Up @@ -754,12 +754,14 @@ message Cluster {

reserved "hosts", "tls_context", "extension_protocol_options";

// Configuration to use different transport sockets for different endpoints.
// The entry of ``envoy.transport_socket_match`` in the
// :ref:`LbEndpoint.Metadata <envoy_v3_api_field_config.endpoint.v3.LbEndpoint.metadata>`
// is used to match against the transport sockets as they appear in the list. The first
// :ref:`match <envoy_v3_api_msg_config.cluster.v3.Cluster.TransportSocketMatch>` is used.
// For example, with the following match
// Configuration to use different transport sockets for different endpoints. The entry of
// ``envoy.transport_socket_match`` in the :ref:`LbEndpoint.Metadata
// <envoy_v3_api_field_config.endpoint.v3.LbEndpoint.metadata>` is used to match against the
// transport sockets as they appear in the list. If a match is not found, the search continues in
// :ref:`LocalityLbEndpoints.Metadata
// <envoy_v3_api_field_config.endpoint.v3.LocalityLbEndpoints.metadata>`. The first :ref:`match
// <envoy_v3_api_msg_config.cluster.v3.Cluster.TransportSocketMatch>` is used. For example, with
// the following match
//
// .. code-block:: yaml
//
Expand All @@ -783,8 +785,9 @@ message Cluster {
// socket match in case above.
//
// If an endpoint metadata's value under ``envoy.transport_socket_match`` does not match any
// ``TransportSocketMatch``, socket configuration fallbacks to use the ``tls_context`` or
// ``transport_socket`` specified in this cluster.
// ``TransportSocketMatch``, the locality metadata is then checked for a match. Barring any
// matches in the endpoint or locality metadata, the socket configuration fallbacks to use the
// ``tls_context`` or ``transport_socket`` specified in this cluster.
//
// This field allows gradual and flexible transport socket configuration changes.
//
Expand Down
7 changes: 7 additions & 0 deletions api/envoy/config/core/v3/grpc_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE;
message GrpcService {
option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.core.GrpcService";

// [#next-free-field: 6]
message EnvoyGrpc {
option (udpa.annotations.versioning).previous_message_type =
"envoy.api.v2.core.GrpcService.EnvoyGrpc";
Expand All @@ -55,6 +56,12 @@ message GrpcService {
// This limit is applied to individual messages in the streaming response and not the total size of streaming response.
// Defaults to 0, which means unlimited.
google.protobuf.UInt32Value max_receive_message_length = 4;

// This provides gRPC client level control over envoy generated headers.
// If false, the header will be sent but it can be overridden by per stream option.
// If true, the header will be removed and can not be overridden by per stream option.
// Default to false.
bool skip_envoy_headers = 5;
}

// [#next-free-field: 9]
Expand Down
5 changes: 4 additions & 1 deletion api/envoy/config/endpoint/v3/endpoint_components.proto
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ message LedsClusterLocalityConfig {
// A group of endpoints belonging to a Locality.
// One can have multiple LocalityLbEndpoints for a locality, but only if
// they have different priorities.
// [#next-free-field: 9]
// [#next-free-field: 10]
message LocalityLbEndpoints {
option (udpa.annotations.versioning).previous_message_type =
"envoy.api.v2.endpoint.LocalityLbEndpoints";
Expand All @@ -161,6 +161,9 @@ message LocalityLbEndpoints {
// Identifies location of where the upstream hosts run.
core.v3.Locality locality = 1;

// Metadata to provide additional information about the locality endpoints in aggregate.
core.v3.Metadata metadata = 9;

// The group of endpoints belonging to the locality specified.
// [#comment:TODO(adisuissa): Once LEDS is implemented this field needs to be
// deprecated and replaced by ``load_balancer_endpoints``.]
Expand Down
10 changes: 10 additions & 0 deletions api/envoy/extensions/filters/http/composite/v3/composite.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ syntax = "proto3";

package envoy.extensions.filters.http.composite.v3;

import "envoy/config/core/v3/base.proto";
import "envoy/config/core/v3/config_source.proto";
import "envoy/config/core/v3/extension.proto";

Expand Down Expand Up @@ -57,4 +58,13 @@ message ExecuteFilterAction {
// Only one of ``typed_config`` or ``dynamic_config`` can be set.
DynamicConfig dynamic_config = 2
[(udpa.annotations.field_migrate).oneof_promotion = "config_type"];

// Probability of the action execution. If not specified, this is 100%.
// This allows sampling behavior for the configured actions.
// For example, if
// :ref:`default_value <envoy_v3_api_field_config.core.v3.RuntimeFractionalPercent.default_value>`
// under the ``sample_percent`` is configured with 30%, a dice roll with that
// probability is done. The underline action will only be executed if the
// dice roll returns positive. Otherwise, the action is skipped.
config.core.v3.RuntimeFractionalPercent sample_percent = 3;
}
13 changes: 12 additions & 1 deletion api/envoy/extensions/filters/http/ext_authz/v3/ext_authz.proto
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE;
// External Authorization :ref:`configuration overview <config_http_filters_ext_authz>`.
// [#extension: envoy.filters.http.ext_authz]

// [#next-free-field: 27]
// [#next-free-field: 28]
message ExtAuthz {
option (udpa.annotations.versioning).previous_message_type =
"envoy.config.filter.http.ext_authz.v3.ExtAuthz";
Expand Down Expand Up @@ -279,6 +279,17 @@ message ExtAuthz {
// correctness checks for all header / query parameter mutations (e.g. for invalid characters).
// This field allows the filter to reject mutations to specific headers.
config.common.mutation_rules.v3.HeaderMutationRules decoder_header_mutation_rules = 26;

// Enable / disable ingestion of dynamic metadata from ext_authz service.
//
// If false, the filter will ignore dynamic metadata injected by the ext_authz service. If the
// ext_authz service tries injecting dynamic metadata, the filter will log, increment the
// ``ignored_dynamic_metadata`` stat, then continue handling the response.
//
// If true, the filter will ingest dynamic metadata entries as normal.
//
// If unset, defaults to true.
google.protobuf.BoolValue enable_dynamic_metadata_ingestion = 27;
}

// Configuration for buffering the request data.
Expand Down
9 changes: 7 additions & 2 deletions api/envoy/extensions/filters/http/jwt_authn/v3/config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ message RemoteJwks {
// cluster: jwt.www.googleapis.com|443
// timeout: 1s
//
config.core.v3.HttpUri http_uri = 1;
config.core.v3.HttpUri http_uri = 1 [(validate.rules).message = {required: true}];

// Duration after which the cached JWKS should be expired. If not specified, default cache
// duration is 10 minutes.
Expand Down Expand Up @@ -729,7 +729,7 @@ message FilterStateRule {
// - provider_name: provider1
// - provider_name: provider2
//
// [#next-free-field: 6]
// [#next-free-field: 7]
message JwtAuthentication {
option (udpa.annotations.versioning).previous_message_type =
"envoy.config.filter.http.jwt_authn.v2alpha.JwtAuthentication";
Expand Down Expand Up @@ -802,6 +802,11 @@ message JwtAuthentication {
// :ref:`requirement_name <envoy_v3_api_field_extensions.filters.http.jwt_authn.v3.PerRouteConfig.requirement_name>`
// in ``PerRouteConfig`` uses this map to specify a JwtRequirement.
map<string, JwtRequirement> requirement_map = 5;

// A request failing the verification process will receive a 401 downstream with the failure response details
// in the body along with WWWAuthenticate header value set with "invalid token". If this value is set to true,
// the response details will be stripped and only a 401 response code will be returned. Default value is false
bool strip_failure_response = 6;
}

// Specify per-route config.
Expand Down
16 changes: 16 additions & 0 deletions api/envoy/extensions/transport_sockets/tls/v3/common.proto
Original file line number Diff line number Diff line change
Expand Up @@ -314,13 +314,29 @@ message SubjectAltNameMatcher {
DNS = 2;
URI = 3;
IP_ADDRESS = 4;
OTHER_NAME = 5;
}

// Specification of type of SAN. Note that the default enum value is an invalid choice.
SanType san_type = 1 [(validate.rules).enum = {defined_only: true not_in: 0}];

// Matcher for SAN value.
//
// The string matching for OTHER_NAME SAN values depends on their ASN.1 type:
//
// * OBJECT: Validated against its dotted numeric notation (e.g., "1.2.3.4")
// * BOOLEAN: Validated against strings "true" or "false"
// * INTEGER/ENUMERATED: Validated against a string containing the integer value
// * NULL: Validated against an empty string
// * Other types: Validated directly against the string value
type.matcher.v3.StringMatcher matcher = 2 [(validate.rules).message = {required: true}];

// OID Value which is required if OTHER_NAME SAN type is used.
// For example, UPN OID is 1.3.6.1.4.1.311.20.2.3
// (Reference: http://oid-info.com/get/1.3.6.1.4.1.311.20.2.3).
//
// If set for SAN types other than OTHER_NAME, it will be ignored.
string oid = 3;
}

// [#next-free-field: 18]
Expand Down
8 changes: 4 additions & 4 deletions bazel/external/quiche.BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -1618,7 +1618,6 @@ envoy_cc_library(
# "quiche/quic/platform/api/quic_test_loopback.h",
],
repository = "@envoy",
tags = ["nofips"],
visibility = ["//visibility:public"],
deps = [
":quic_platform_bug_tracker",
Expand Down Expand Up @@ -1695,7 +1694,6 @@ envoy_cc_library(
hdrs = ["quiche/quic/platform/api/quic_ip_address.h"],
copts = quiche_copts,
repository = "@envoy",
tags = ["nofips"],
visibility = ["//visibility:public"],
deps = [
":quic_platform_base",
Expand Down Expand Up @@ -1743,7 +1741,6 @@ envoy_cc_library(
hdrs = ["quiche/quic/platform/api/quic_socket_address.h"],
copts = quiche_copts,
repository = "@envoy",
tags = ["nofips"],
visibility = ["//visibility:public"],
deps = [
":quic_platform_export",
Expand Down Expand Up @@ -3408,9 +3405,12 @@ envoy_cc_library(
}),
)

envoy_quic_cc_library(
envoy_cc_library(
name = "quic_core_lru_cache_lib",
hdrs = ["quiche/quic/core/quic_lru_cache.h"],
copts = quiche_copts,
repository = "@envoy",
visibility = ["//visibility:public"],
deps = [":quic_platform_base"],
)

Expand Down
6 changes: 3 additions & 3 deletions bazel/repository_locations.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -620,13 +620,13 @@ REPOSITORY_LOCATIONS_SPEC = dict(
project_name = "Datadog C++ Tracing Library",
project_desc = "Datadog distributed tracing for C++",
project_url = "https://github.com/DataDog/dd-trace-cpp",
version = "0.2.1",
sha256 = "1d3dd5dc139fca43e902c756f3eb5ca0b64a6f50a09c06215084a9fb632c0da7",
version = "0.2.2",
sha256 = "ee524a9b70d39dcfd815b90d9d6fc5599db7989dff072980bff90bae81c4daf7",
strip_prefix = "dd-trace-cpp-{version}",
urls = ["https://github.com/DataDog/dd-trace-cpp/archive/v{version}.tar.gz"],
use_category = ["observability_ext"],
extensions = ["envoy.tracers.datadog"],
release_date = "2024-05-28",
release_date = "2024-06-21",
cpe = "N/A",
license = "Apache-2.0",
license_url = "https://github.com/DataDog/dd-trace-cpp/blob/v{version}/LICENSE.md",
Expand Down
46 changes: 46 additions & 0 deletions changelogs/current.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,20 @@ behavior_changes:
unchanged and the stream is reset if the upstream server completes response before the downstream. The stream is also
reset if the upstream server responds with an error status before the downstream. This behavior is disabled by default
and can be enabled by setting the ``envoy.reloadable_features.allow_multiplexed_upstream_half_close`` runtime key to true.
- area: composite_filter
change: |
Adding support for
:ref:`sample_percent <envoy_v3_api_field_extensions.filters.http.composite.v3.ExecuteFilterAction.sample_percent>`.
It specifies the probability of the action execution. If not specified, it is 100%.
- area: golang
change: |
Move ``Continue``, ``SendLocalReply`` and ``RecoverPanic` from ``FilterCallbackHandler`` to ``DecoderFilterCallbacks`` and
``EncoderFilterCallbacks``, to support full-duplex processing.
- area: ext_proc
change: |
Added support for observability mode. If enabled, each part of the HTTP request or response specified by ProcessingMode
is sent without waiting for the response from the ext_proc service. It is "Send and Go" mode that can be used by external
processor to observe Envoy data and status.
minor_behavior_changes:
# *Changes that may cause incompatibilities for some users, but should not for most*
Expand Down Expand Up @@ -99,6 +109,11 @@ minor_behavior_changes:
change: |
Changing header validation checks in the substitution format utility and CEL code to do RCF complaint header validation.
This behavior can be reverted by setting the runtime guard ``envoy.reloadable_features.consistent_header_validation`` to false.
- area: quic
change: |
Cache source/destination address instances in a LUR cache for packet read to improve performance.
This behavior can be reverted by setting the runtime guard
``envoy.reloadable_features.quic_upstream_socket_use_address_cache_for_read`` to false.
- area: quic
change: |
When a quic connection socket is created, the socket's detected transport protocol will be set to "quic".
Expand All @@ -110,6 +125,11 @@ minor_behavior_changes:
- area: filters
change: |
Set ``WWW-Authenticate`` header for 401 responses from the Basic Auth filter.
- area: jwt_authn
change: |
jwt_authn now validates provider URIs. If the validation is too strict it can temporarily be
disabled by setting the runtime guard ``envoy.reloadable_features.jwt_authn_validate_uri`` to
false.
- area: http
change: |
Removed runtime guard ``envoy.reloadable_features.refresh_rtt_after_request`` and legacy code path.
Expand Down Expand Up @@ -205,6 +225,10 @@ bug_fixes:
change: |
Fixed missing :ref:`additional addresses <envoy_v3_api_msg_config.endpoint.v3.Endpoint.AdditionalAddress>`
for :ref:`LbEndpoint <envoy_v3_api_field_config.endpoint.v3.LbEndpoint.endpoint>` in config dump.
- area: http
change: |
Fixed a bug where additional :ref:`cookie attributes <envoy_v3_api_msg_config.route.v3.RouteAction.HashPolicy.cookie>`
are not sent properly to clients.
removed_config_or_runtime:
# *Normally occurs at the end of the* :ref:`deprecation period <deprecated>`
Expand Down Expand Up @@ -289,6 +313,11 @@ new_features:
to specify headers that should never be sent to the external authentication service. Overrides
:ref:`allowed_headers <envoy_v3_api_field_extensions.filters.http.ext_authz.v3.ExtAuthz.allowed_headers>`
if a header matches both.
- area: upstream
change: |
Added a new field to LocalityLbEndpoints, :ref:`LocalityLbEndpoints.Metadata
<envoy_v3_api_field_config.endpoint.v3.LocalityLbEndpoints.metadata>`, that may be used for transport socket
matching groups of endpoints.
- area: quic
change: |
Added support for QUIC server preferred address when there is a DNAT between the client and Envoy. See
Expand Down Expand Up @@ -376,11 +405,28 @@ new_features:
change: |
Added :ref:`bypass_overload_manager <envoy_v3_api_field_config.listener.v3.Listener.bypass_overload_manager>`
to bypass the overload manager for a listener. When set to true, the listener will not be subject to overload protection.
- area: ext_authz
change: |
Added
:ref:`enable_dynamic_metadata_ingestion
<envoy_v3_api_field_extensions.filters.http.ext_authz.v3.ExtAuthz.enable_dynamic_metadata_ingestion>`,
which allows ext_authz to be configured to ignore dynamic metadata in ext_authz responses.
- area: rbac
change: |
The RBAC filter will now log the enforced rule to the dynamic metadata field
"enforced_effective_policy_id" and the result to the dynamic metadata field
"enforced_engine_result". These are only populated if a non-shadow engine exists.
- area: jwt_authn
change: |
Added :ref:`strip_failure_response
<envoy_v3_api_field_extensions.filters.http.jwt_authn.v3.JwtAuthentication.strip_failure_response>`
to allow stripping the failure response details from the JWT authentication filter.
- area: tls
change: |
added support to match against ``OtherName`` SAN Type under :ref:`match_typed_subject_alt_names
<envoy_v3_api_field_extensions.transport_sockets.tls.v3.CertificateValidationContext.match_typed_subject_alt_names>`.
An additional field ``oid`` is added to :ref:`SubjectAltNameMatcher
<envoy_v3_api_msg_extensions.transport_sockets.tls.v3.SubjectAltNameMatcher>` to support this change.
deprecated:
- area: tracing
Expand Down
2 changes: 1 addition & 1 deletion ci/do_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -835,7 +835,7 @@ case $CI_TARGET in
# define the 'release' builds as canonical and test them only in CI, so the
# toolchain is kept consistent. This ifdef is checked in
# test/common/stats/stat_test_utility.cc when computing
# Stats::TestUtil::MemoryTest::mode().
# Memory::TestUtil::MemoryTest::mode().
if [[ "${ENVOY_BUILD_ARCH}" == "x86_64" ]]; then
BAZEL_BUILD_OPTIONS+=("--test_env=ENVOY_MEMORY_TEST_EXACT=true")
fi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ class UpstreamSSLBaseIntegrationTest : public PostgresBaseIntegrationTest {

NiceMock<Server::Configuration::MockTransportSocketFactoryContext> mock_factory_ctx;
ON_CALL(mock_factory_ctx.server_context_, api()).WillByDefault(testing::ReturnRef(*api_));
auto cfg = std::make_unique<Extensions::TransportSockets::Tls::ServerContextConfigImpl>(
auto cfg = *Extensions::TransportSockets::Tls::ServerContextConfigImpl::create(
downstream_tls_context, mock_factory_ctx);
static auto* client_stats_store = new Stats::TestIsolatedStoreImpl();
Network::DownstreamTransportSocketFactoryPtr tls_context =
Expand Down Expand Up @@ -536,7 +536,7 @@ class UpstreamAndDownstreamSSLIntegrationTest : public UpstreamSSLBaseIntegratio

NiceMock<Server::Configuration::MockTransportSocketFactoryContext> mock_factory_ctx;
ON_CALL(mock_factory_ctx.server_context_, api()).WillByDefault(testing::ReturnRef(*api_));
auto cfg = std::make_unique<Extensions::TransportSockets::Tls::ClientContextConfigImpl>(
auto cfg = *Extensions::TransportSockets::Tls::ClientContextConfigImpl::create(
upstream_tls_context, mock_factory_ctx);
static auto* client_stats_store = new Stats::TestIsolatedStoreImpl();
Network::UpstreamTransportSocketFactoryPtr tls_context =
Expand Down
11 changes: 10 additions & 1 deletion envoy/network/socket_interface.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#pragma once

#include <stddef.h>

#include "envoy/common/platform.h"
#include "envoy/common/pure.h"
#include "envoy/network/socket.h"
Expand All @@ -15,8 +17,15 @@ struct SocketCreationOptions {
// and only valid on Linux.
bool mptcp_enabled_{false};

// Specifies the maximum size of the cache of the address instances associated with
// packets received by this socket.
// If this is 0, no addresses will be cached.
// Is only valid for datagram sockets.
size_t max_addresses_cache_size_{0};

bool operator==(const SocketCreationOptions& rhs) const {
return mptcp_enabled_ == rhs.mptcp_enabled_;
return mptcp_enabled_ == rhs.mptcp_enabled_ &&
max_addresses_cache_size_ == rhs.max_addresses_cache_size_;
}
};

Expand Down
Loading

0 comments on commit 0e881dc

Please sign in to comment.