-
Notifications
You must be signed in to change notification settings - Fork 21
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
Request with |
(pipe) character in authority header is auto-rejected by Limitador
#53
Comments
@rahulanand16nov I don't think it is feasible for Istio to change the cluster name format at this stage - it's been well documented for a long time. It might be easier to change Envoy to use the actual authority rather than the cluster name, but still difficult given how this has been around for long - so failing the above, we'll have to work around this case on our side. |
Good point 🤔 I'll add steps to reproduce for anyone picking this up before I get to it. |
cc @alexsnaps |
I have tried using a DestinationRule used: apiVersion: networking.istio.io/v1beta1
kind: DestinationRule
metadata:
name: limitador
namespace: kuadrant-system
spec:
host: limitador.kuadrant-system.svc.cluster.local
trafficPolicy:
portLevelSettings:
- port:
number: 8081
tls:
mode: SIMPLE
sni: rate-limit-cluster There are only two options left:
|
So that's all hardcoded afaict: https://github.com/istio/istio/blob/32afc27ea91ef68e4e5f0ee3dd47d0aedfba35f1/pilot/pkg/model/service.go#L691-L693 |
Found this issue that seems to suffer from the same malformed header:
|
|
(pipe) character in authority header is auto-rejected by Limitador
That's a very similar issue to ours. Added my thoughts there: istio/istio#39196 (comment) |
I still can’t figure out where the fix should be tho… wondering if Envoy should somehow address this ¯_(ツ)_/¯ |
Changing Envoy will be a two-step change, first, we change the behavior in Envoy or we add another configurable field to the cluster config and then Istio follows suit to utilize that. I think Istio should change the pipe to dot because virtually it has no change (or at least I cannot think of any problem). |
Enabling TLS on the cluster forces Envoy to use |
@rahulanand16nov, Envoy gRPC client config allows to overwrite the Can you somehow influence Istio to use that option? |
@alexsnaps I am thinking we close this, do we expect to do anything about it? I will close and let it be reopened if needed |
This issue describes the finding of auto-rejection of requests that contains the pipe character in their
:authority
header field. I tracked down this problem to a dependency named h2.Following was from the trace logs:
Why there is a pipe character in the authority header?
That format should be familiar if you have seen Istio's cluster config. Still, if not, that format is auto-generated by Istio's control plane by looking at its service registry. So, when you add a Limitador service in the cluster where Istio is also present, the service registry picks up the service and sends that to all the Envoys present in the cluster (gateway or sidecar) as a cluster. And the name of that cluster is of that format as seen above in the log.
As Limitador is used right now, it receives a callout request from an Envoy's RateLimit filter and one particular behavior of envoy is to use the cluster name as
:authority
header of the callout. Hence why you get the pipe character in the header.Potential way to solve this problem?
I have seen a few comments around updating dependencies but I cannot find them right now. One option is to update the dependency which is already a bit old.
Second, I am going to create an issue in the Istio and Envoy repo to highlight this behavior to them. Possibly Istio can change the cluster format or Envoy can allow overriding authority?
cc @maleck13 @unleashed
The text was updated successfully, but these errors were encountered: