Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable require_strict_1xx_and_204_response_headers in envoy configuration #5961

Open
rinormaloku opened this issue Feb 22, 2022 · 4 comments
Assignees
Labels
stale Issues that are stale. These will not be prioritized without further engagement on the issue. Type: Enhancement New feature or request

Comments

@rinormaloku
Copy link
Contributor

rinormaloku commented Feb 22, 2022

Version

No response

Is your feature request related to a problem? Please describe.

When Gloo edge is used alongside the Istio ingress gateway, web socket connections (verified with SignalR 5.x) are rejected with a 502 Bad Gateway, and with the following log in the gateway-proxy:

Error dispatching received data: http/1.1 protocol error: transfer encoding not allowed in 1xx or 204

This happens when a 101 status code is returned to upgrade the connection to web sockets. The istio-ingress gateway adds the following header key=transfer-encoding value=chunked as shown below

[2022-02-22 13:55:50.465][20][trace][http] [external/envoy/source/common/http/http1/codec_impl.cc:499] [C327] 
➥ completed header: key=transfer-encoding value=chunked

Which makes the envoy fail with:

Error dispatching received data: http/1.1 protocol error: transfer encoding not allowed in 1xx or 204

Describe the solution you'd like

Envoy from version 1.15 stopped allowing upstream 1xx or 204 responses with Transfer-Encoding or non-zero Content-Length headers. So now the default is to reject such requests. This however can be reverted by setting the following setting on envoy boostrap configuration to false (the default is true)

envoy.reloadable_features.send_strict_1xx_and_204_response_headers: false

The same is configured in the Istio side: https://github.com/istio/istio/blob/master/pkg/bootstrap/config.go#L282
To resolve those issues: #28433, #36711

Describe alternatives you've considered

No response

Additional Context

We only need to update our helm chart https://github.com/solo-io/gloo/blob/master/install/helm/gloo/templates/12-ingress-proxy-configmap.yaml#L20

To add the following config:

    layered_runtime:
      layers:
      - name: static_layer
        static_layer:
          overload:
            global_downstream_max_connections: 250000
        envoy.reloadable_features.require_strict_1xx_and_204_response_headers: false    # 1
      - name: admin_layer
        admin_layer: {}

1# The change

@Paschi28
Copy link

The solution for this issue is to add the config envoy.reloadable_features.require_strict_1xx_and_204_response_headers: false to the helm override values.

Values applied to gloo.gatewayProxies.gatewayProxy.customStaticLayer will add to the corresponding place in the configmap.

@rinormaloku this solves the workaround with adding the setting to the configmap.

@asenyaev
Copy link

@Paschi28 @rinormaloku Could you share the helm chart which you use? I cannot find the proper line in values in my chart.

@rinormaloku
Copy link
Contributor Author

@asenyaev I think Paschi used this property shown in this line: https://github.com/solo-io/gloo/blob/main/install/helm/gloo/templates/12-ingress-proxy-configmap.yaml#L152

It merges the configmap and produces a new value. I haven't stored the values, but you should be able to come up with it with a few tries.

Copy link

github-actions bot commented Jun 2, 2024

This issue has been marked as stale because of no activity in the last 180 days. It will be closed in the next 180 days unless it is tagged "no stalebot" or other activity occurs.

@github-actions github-actions bot added the stale Issues that are stale. These will not be prioritized without further engagement on the issue. label Jun 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Issues that are stale. These will not be prioritized without further engagement on the issue. Type: Enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants