Skip to content

URI template operators * and ** do not match the * character #39168

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

Closed
barchw opened this issue Apr 18, 2025 · 1 comment · Fixed by #39169
Closed

URI template operators * and ** do not match the * character #39168

barchw opened this issue Apr 18, 2025 · 1 comment · Fixed by #39169

Comments

@barchw
Copy link
Contributor

barchw commented Apr 18, 2025

Description:
When using the * or ** operators in URI template path, the templates do not match the * operator. This behaviour is not documented, even though it is explicitly set up in this way according to

"!$&'()+,;" // sub-delims excluding *=

Repro steps:

  1. Set up a URI template path that includes the ** operator: e.g. /anything/**
  2. Requests to the /anything/*abc are not accepted.

For example, reproducing using Istio, with following Envoy config setup for authorization:

"uri_template": {
 "name": "uri-template",
 "typed_config": {
  "@type": "type.googleapis.com/envoy.extensions.path.match.uri_template.v3.UriTemplateMatchConfig",
  "path_template": "/anything/**"
 }
}
-> % curl https://httpbin.local.kyma.dev/anything/abc -ik
HTTP/2 200
content-type: application/json; charset=utf-8
date: Fri, 18 Apr 2025 12:24:54 GMT
content-length: 991
x-envoy-upstream-service-time: 0
server: istio-envoy

-> % curl https://httpbin.local.kyma.dev/anything/\*abc -ik
HTTP/2 403
content-length: 19
content-type: text/plain
date: Fri, 18 Apr 2025 12:24:56 GMT
server: istio-envoy
x-envoy-upstream-service-time: 2

Config:

"uri_template": {
 "name": "uri-template",
 "typed_config": {
  "@type": "type.googleapis.com/envoy.extensions.path.match.uri_template.v3.UriTemplateMatchConfig",
  "path_template": "/anything/**"
 }
}

References

@yanavlasov
Copy link
Contributor

We should at least clarify this in docs.

@yanavlasov yanavlasov added the help wanted Needs help! label Apr 21, 2025
yanavlasov pushed a commit to yanavlasov/envoy that referenced this issue May 5, 2025
…ewrite and matching (envoyproxy#39169)

Adds support for matching requests that include the `*` character in the
path. A relevant issue was created:
envoyproxy#39168
Risk Level:
Testing: Updated unit tests
Docs Changes: N/A
Release Notes: Added
Platform Specific Features: N/A
Runtime guard: envoy.reloadable_features.uri_template_match_on_asterisk

Resolves: envoyproxy#39168

---------

Signed-off-by: Chwila <bartosz.chwila@sap.com>
yanavlasov pushed a commit to yanavlasov/envoy that referenced this issue May 5, 2025
…ewrite and matching (envoyproxy#39169)

Adds support for matching requests that include the `*` character in the
path. A relevant issue was created:
envoyproxy#39168
Risk Level:
Testing: Updated unit tests
Docs Changes: N/A
Release Notes: Added
Platform Specific Features: N/A
Runtime guard: envoy.reloadable_features.uri_template_match_on_asterisk

Resolves: envoyproxy#39168

---------

Signed-off-by: Chwila <bartosz.chwila@sap.com>
Signed-off-by: Yan Avlasov <yavlasov@google.com>
yanavlasov pushed a commit to yanavlasov/envoy that referenced this issue May 5, 2025
…ewrite and matching (envoyproxy#39169)

Adds support for matching requests that include the `*` character in the
path. A relevant issue was created:
envoyproxy#39168
Risk Level:
Testing: Updated unit tests
Docs Changes: N/A
Release Notes: Added
Platform Specific Features: N/A
Runtime guard: envoy.reloadable_features.uri_template_match_on_asterisk

Resolves: envoyproxy#39168

---------

Signed-off-by: Chwila <bartosz.chwila@sap.com>
Signed-off-by: Yan Avlasov <yavlasov@google.com>
yanavlasov pushed a commit to yanavlasov/envoy that referenced this issue May 5, 2025
…ewrite and matching (envoyproxy#39169)

Adds support for matching requests that include the `*` character in the
path. A relevant issue was created:
envoyproxy#39168
Risk Level:
Testing: Updated unit tests
Docs Changes: N/A
Release Notes: Added
Platform Specific Features: N/A
Runtime guard: envoy.reloadable_features.uri_template_match_on_asterisk

Resolves: envoyproxy#39168

---------

Signed-off-by: Chwila <bartosz.chwila@sap.com>
Signed-off-by: Yan Avlasov <yavlasov@google.com>
yanavlasov pushed a commit to yanavlasov/envoy that referenced this issue May 5, 2025
…ewrite and matching (envoyproxy#39169)

Adds support for matching requests that include the `*` character in the
path. A relevant issue was created:
envoyproxy#39168
Risk Level:
Testing: Updated unit tests
Docs Changes: N/A
Release Notes: Added
Platform Specific Features: N/A
Runtime guard: envoy.reloadable_features.uri_template_match_on_asterisk

Resolves: envoyproxy#39168

---------

Signed-off-by: Chwila <bartosz.chwila@sap.com>
Signed-off-by: Yan Avlasov <yavlasov@google.com>
yanavlasov pushed a commit to yanavlasov/envoy that referenced this issue May 5, 2025
…ewrite and matching (envoyproxy#39169)

Adds support for matching requests that include the `*` character in the
path. A relevant issue was created:
envoyproxy#39168
Risk Level:
Testing: Updated unit tests
Docs Changes: N/A
Release Notes: Added
Platform Specific Features: N/A
Runtime guard: envoy.reloadable_features.uri_template_match_on_asterisk

Resolves: envoyproxy#39168

---------

Signed-off-by: Chwila <bartosz.chwila@sap.com>
Signed-off-by: Yan Avlasov <yavlasov@google.com>
phlax pushed a commit that referenced this issue May 5, 2025
…ewrite and matching (#39169)

Adds support for matching requests that include the `*` character in the
path. A relevant issue was created:
#39168
Risk Level:
Testing: Updated unit tests
Docs Changes: N/A
Release Notes: Added
Platform Specific Features: N/A
Runtime guard: envoy.reloadable_features.uri_template_match_on_asterisk

Resolves: #39168

---------

Signed-off-by: Chwila <bartosz.chwila@sap.com>
Signed-off-by: Yan Avlasov <yavlasov@google.com>
phlax pushed a commit that referenced this issue May 5, 2025
…ewrite and matching (#39169)

Adds support for matching requests that include the `*` character in the
path. A relevant issue was created:
#39168
Risk Level:
Testing: Updated unit tests
Docs Changes: N/A
Release Notes: Added
Platform Specific Features: N/A
Runtime guard: envoy.reloadable_features.uri_template_match_on_asterisk

Resolves: #39168

---------

Signed-off-by: Chwila <bartosz.chwila@sap.com>
Signed-off-by: Yan Avlasov <yavlasov@google.com>
phlax pushed a commit that referenced this issue May 6, 2025
…ewrite and matching (#39169)

Adds support for matching requests that include the `*` character in the
path. A relevant issue was created:
#39168
Risk Level:
Testing: Updated unit tests
Docs Changes: N/A
Release Notes: Added
Platform Specific Features: N/A
Runtime guard: envoy.reloadable_features.uri_template_match_on_asterisk

Resolves: #39168

---------

Signed-off-by: Chwila <bartosz.chwila@sap.com>
Signed-off-by: Yan Avlasov <yavlasov@google.com>
phlax pushed a commit that referenced this issue May 6, 2025
…ewrite and matching (#39169)

Adds support for matching requests that include the `*` character in the
path. A relevant issue was created:
#39168
Risk Level:
Testing: Updated unit tests
Docs Changes: N/A
Release Notes: Added
Platform Specific Features: N/A
Runtime guard: envoy.reloadable_features.uri_template_match_on_asterisk

Resolves: #39168

---------

Signed-off-by: Chwila <bartosz.chwila@sap.com>
Signed-off-by: Yan Avlasov <yavlasov@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants