Skip to content

Simple regexp length error not caught by Gateway #2543

Closed
@akhenakh

Description

@akhenakh

A simple regexp is rejected by Envoy Proxy:

Envoy Proxy is measuring a regexp complexity and compare it with max_program_size.

According to this, increasing it per entry has been deprecated several years ago
https://github.com/envoyproxy/envoy/blob/main/api/envoy/type/matcher/regex.proto#L41

Using 0.6.0 Gateway, this value is still 100 which is quite low, for example this regexp is valued 118:
^/v4/advisory/[0-9a-z-]{36}/clone$.

Envoy Proxy will reject it at runtime, we found it the hard way, since on a restart it will then refuse to load every route 404ing on everything.

Can we increase the default in Gateway and raise an error earlier in Gateway rather than in Proxy?

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/translatorIssues related to Gateway's translation service, e.g. translating Gateway APIs into the IR.area/xds-serverIssues related to the xDS Server used for managing Envoy configuration.help wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions