Skip to content

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

Closed
@barchw

Description

@barchw

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions