Skip to content
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

Insecure Connection Policy #51

Closed
danehans opened this issue Jan 28, 2020 · 12 comments
Closed

Insecure Connection Policy #51

danehans opened this issue Jan 28, 2020 · 12 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature. kind/user-story Categorizes an issue as capturing a user story lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness.

Comments

@danehans
Copy link
Contributor

danehans commented Jan 28, 2020

What would you like to be added:
The ability to enforce how insecure (http) connections are handled for a xRoute:

InsecureConnections: “Redirect”: Redirects http > https connections for an xRoute.
InsecureConnections: “None”: Refuse http connections for an xRoute.
InsecureConnections: “Allow”: Allows insecure connections for an xRoute.

Why is this needed:
As a cluster operator, I need the ability to enforce how insecure (i.e. http) connections are handled for an xRoute bound to a Gateway. For example, I have hostname "foo.example.com" hosted by service-apis that routes to a backend http Service. The Gateway exposes a secure and insecure listener. I want to ensure any attempt for "http://foo.example.com" is either allowed, disallowed or redirected to "https://foo.example.com".

@danehans danehans added the kind/feature Categorizes issue or PR as related to a new feature. label Jan 28, 2020
@danehans
Copy link
Contributor Author

danehans commented Jan 28, 2020

#35 lays the ground work for per route TLS configuration. If "Insecure Connection Policy" is a route-level configuration, then this can be added as a field of TLSConfig. Otherwise, should this functionality be added to gateway ListenerTLS?

@hbagdi
Copy link
Contributor

hbagdi commented Jan 30, 2020

Otherwise, should this functionality be added to gateway ListenerTLS?

This seems like a route level property since each application or route will want to control it.

I do see value in having a Gateway-level property where one configures redirects for every request.
But, it would be hard to use in practice. For instance, HTTP challenge in the ACME protocol for automated-certificate is always HTTP based.

@jpeach
Copy link
Contributor

jpeach commented Feb 13, 2020

/kind user-story

@k8s-ci-robot k8s-ci-robot added the kind/user-story Categorizes an issue as capturing a user story label Feb 13, 2020
@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 3, 2020
@robscott
Copy link
Member

robscott commented Jun 3, 2020

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 3, 2020
@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Sep 1, 2020
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Oct 1, 2020
@hbagdi
Copy link
Contributor

hbagdi commented Oct 20, 2020

/remove-lifecycle rotten
/lifecycle frozen

@k8s-ci-robot k8s-ci-robot added lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. and removed lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. labels Oct 20, 2020
@stevesloka
Copy link
Contributor

In Contour, we've implemented this by having the 301 redirect from http->https if a cert is defined on the route. Then if someone needs to remove the redirect, we have a field to allow the route path to serve insecure.

What's nice about this is by default most folks probably want the 301 redirect if they have a cert applied, but don't need more configuration.

@hbagdi
Copy link
Contributor

hbagdi commented Aug 23, 2021

#713 covers this in some sense.
Safe to close?
/cc @robscott @jpeach @youngnick

@robscott
Copy link
Member

Agree with that, feel free to reopen if there's a better more portable way to handle this.

/close

@k8s-ci-robot
Copy link
Contributor

@robscott: Closing this issue.

In response to this:

Agree with that, feel free to reopen if there's a better more portable way to handle this.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

jaison-tiu pushed a commit to jaison-tiu/gateway-api that referenced this issue Apr 14, 2022
Created CloudArmor GKE ingress recipe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. kind/user-story Categorizes an issue as capturing a user story lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness.
Projects
None yet
Development

No branches or pull requests

7 participants