-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Better handling for domain matching with ports #886
Comments
I'm not completely clear on the right behaviors here per RFCs. Needs some research. This would be a good opportunity to generally look at how we handle port inside the host/authority header. |
It will be great if envoy strip the standard port portion(like 443, or 80), then do domain match to decide which virtual host a request should go. |
any progress this issue? |
A workaround that seems to work is to explicitly match on both a version with and without the port. This was quite surprising to find. In my case I struggled to see why Prometheus scrape requests failed with 404s when browser (and almost everything else) checks on the same URL worked just fine. It was only when I discovered that it added the port to the domain that I found this issue. |
Anyone have a workaround for Envoy based gateways configurable via kubernetes Ingress configs which gives the following if you try to qualify w/ port which is not permitted?
|
Has this thing progressed? |
@bitsofinfo if the envoy virtual host were configured with |
Is there any progress on this? I'm also facing the issue (ended up here from istio/istio#8807) |
From the feedback I received, I need to revisit the implementation to
create a map of well known protocols to their common port, and only attempt
to resolve those.
I haven’t had any time lately to revisit this and for my real world
implementation, I’ve just added a wildcard match for the port to my
VirtualHost configurations that are propagated via my control plane.
As this is totally resolvable via configuration/control-plane conventions,
I am hesitant to pick this back up. In my opinion, a “domain” should match
the IEEE definition from the RFC or the config property should be renamed
to “authorities” and then control-planes and end-users will be responsible
for enumerating the ports (or matching by wildcard).
…On Tue, Sep 10, 2019 at 1:11 PM Miguel Angel Muñoz González < ***@***.***> wrote:
Is there any progress on this? I'm also facing the issue (ended up here
from istio/istio#8807 <istio/istio#8807>)
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#886?email_source=notifications&email_token=AAW6VM6GQDHIENBFMSTRP3LQI7IK5A5CNFSM4DJ6QHQKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6L2SYY#issuecomment-530032995>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAW6VM6GSXJRTXTDLWH6D53QI7IK5ANCNFSM4DJ6QHQA>
.
|
I too am having issues with this, but I have another bit of info to add. I'm using istio, and trying to create apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: happy-gw
spec:
selector:
istio: ingressgateway # use istio default ingress gateway
servers:
- port:
number: 443
name: https
protocol: HTTPS
tls:
mode: PASSTHROUGH
hosts:
- happy.localdomain
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: happy-vs
spec:
hosts:
- happy.localdomain
gateways:
- happy-gw
tls:
- match:
- port: 443
sni_hosts:
- happy.localdomain
route:
- destination:
host: happy-svc
port:
number: 8443 This works perfectly. Requests going to But this does not work: apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: sad-gw
spec:
selector:
istio: ingressgateway # use istio default ingress gateway
servers:
- port:
number: 80
name: http
protocol: HTTP
hosts:
- "sad.localdomain"
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: sad-vs
spec:
hosts:
- "sad.localdomain"
gateways:
- sad-gw
http:
- destination:
port:
number: 8080
host: sad-svc Requests to http://sad.localdomain:31380 return 404.
Why does it work for TLS connections but not HTTP? |
When explicitly adding port 80 to host such as http://host:80 it will not allow a redirect to https://host:443.
require_ssl of the virtualHost will redirect to https://host:80. What is desired is a redirect to https://host:443 when :80 is explicit.
The text was updated successfully, but these errors were encountered: