envoyproxy/envoy

WebSockets with WSS are not working due to EnvoyFilter conflicts

Open

#19 645 ouverte le 21 janv. 2022

Voir sur GitHub
 (14 commentaires) (4 réactions) (0 assignés)C++ (5 373 forks)batch import
help wantedquestion

Métriques du dépôt

Stars
 (27 997 stars)
Métriques de merge PR
 (Merge moyen 8j) (378 PRs mergées en 30 j)

Description

Title: Websockets with WSS are not working due to EnvoyFilter conflicts

Description:

An EnvoyFilter applied to an Istio configuration (e.g. to limit request size) will break the WSS and fail to initiate 101 Switching Protocols.

Repro steps:

Here's an example filter that will cause websocket functionality to stop working:

apiVersion: networking.istio.io/v1alpha3
kind: EnvoyFilter
metadata:
  name: max-request-size
  namespace: istio-system
spec:
  configPatches:
  - applyTo: HTTP_FILTER
    match:
      context: SIDECAR_INBOUND
      listener:
        filterChain:
          filter:
            name: envoy.filters.network.http_connection_manager
            subFilter:
              name: "envoy.filters.http.router"
    patch:
      operation: INSERT_BEFORE
      value:
        name: envoy.filters.http.buffer
        typed_config:
          '@type': type.googleapis.com/envoy.extensions.filters.http.buffer.v3.Buffer
          max_request_bytes: 52428800

If this filter is removed WebSocket functionality returns to normal.

Related Links

https://github.com/istio/istio/issues/36545

Guide contributeur