Skip to content

Request with | (pipe) character in authority header is auto-rejected by Limitador #53

Closed as not planned
@rahulanand16nov

Description

@rahulanand16nov

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:

malformed headers: malformed authority (b"outbound|8081||limitador.rahul-test.svc.cluster.local"): invalid uri character

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions