You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While the mechanics of plumbing multiple-valued headers to matchers have been taken care of by GHSA-2v25-cjjq-5f4w and its aftermath, we still do not have a particularly ergonomic way to match on multiple header values. We now have a canonicalized flat string of all header values, which requires gymnastics with regular expressions etc. to do a multi-value match.
Ideally we have a match interface that is capable of expressing first-class matchers that operate on a multimap, e.g. the ability to model multiple matchers and apply semantics to match such as "any of" or "all of".
Hi 👋 , do you still need help with this? I was looking at #13454 and got redirected to this issue. The idea would be to refactor the header matching operations without reintroducing the vulnerability found, is that correct?
my header is as follows:
curl --header "x-custom-route-svc:abcxyz:demo-service1.ns1.cluster.local" --header "x-custom-route-svc:mnop:demo-service2.ns2.cluster.local" URL
Format - x-custom-route-svc:[token1:service1,token2:service2]
here the header "x-custom-route-svc" is a multi-value with different service names and user-token. Since user-token is varying in every request, I would like to do substring match as above.
Unfortunately, contains_match does substring match with only first value.
Activity
htuch commentedon Oct 25, 2020
The work that @snowp is doing in #12968 is step in this direction, but does not cover all existing match sites yet.
mattklein123 commentedon Oct 27, 2020
+1 to trying to cover this via the @snowp work.
rialg commentedon Nov 26, 2020
Hi 👋 , do you still need help with this? I was looking at #13454 and got redirected to this issue. The idea would be to refactor the header matching operations without reintroducing the vulnerability found, is that correct?
htuch commentedon Nov 29, 2020
@grial1 I'd sync with @snowp on Slack on what might be possible, #12968 related work is the plan-of-record.
yogeshkrbhat commentedon Aug 26, 2023
my header is as follows:
curl --header "x-custom-route-svc:abcxyz:demo-service1.ns1.cluster.local" --header "x-custom-route-svc:mnop:demo-service2.ns2.cluster.local" URL
Format - x-custom-route-svc:[token1:service1,token2:service2]
And envoy route config:
routes:
- match:
prefix: "/"
headers:
- name: "x-custom-route-svc"
contains_match: "demo-service2.ns2.cluster.local"
here the header "x-custom-route-svc" is a multi-value with different service names and user-token. Since user-token is varying in every request, I would like to do substring match as above.
Unfortunately, contains_match does substring match with only first value.
any suggestions for this?