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

TLS Termination Policy #52

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

TLS Termination Policy #52

danehans opened this issue Jan 28, 2020 · 14 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
Projects

Comments

@danehans
Copy link
Contributor

danehans commented Jan 28, 2020

What would you like to be added:
As an application developer, I need the ability to specify a TLS termination policy for my HTTPRoute to specify how the associated connections should be handled by the Gateway.

Why is this needed:
I create HTTPRoutes routes foo, bar and baz (with TLS configured). I need tls connections for route foo to be:
client----(tls)----->gateway----(http)---->service
The tls connection is terminated at the gateway and an http connection is created to the service.

I need tls connections for route bar to be:
client----(tls)----->gateway----(tls-2)---->service
Where tls-2 is a new tls connection between gateway and service. Options should be provided for one and two-way authentication between gateway and service.

I need tls connections for route baz to be:
client----(tls)----->gateway----(tls)---->service
Where the client tls connection is not terminated at the gateway, but instead is passed through to the backend service.

Implementation References

@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

Can this be achieved using match/filter/action of a route? If so, how easy is the workflow understood by a user? Is this a gateway class, gateway or route setting?

@bowei bowei added this to Discussion items in Main Jan 30, 2020
@bowei
Copy link
Contributor

bowei commented Feb 13, 2020

In scenario 2, are you doing http routing before using TLS on the backside? This might be handled by saying that the Service app-protocol field can be used to determine whether or not TLS will be used on the Gateway/HTTPRoute => Service leg of the journey.

In scenario 3, what kind of routing are you expecting wrt to TLS? For example, this could just be TCP passed through OR is there some form of routing on the hostname that happens?

@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
@hbagdi
Copy link
Contributor

hbagdi commented Feb 13, 2020

what kind of routing are you expecting wrt to TLS? For example, this could just be TCP passed through OR is there some form of routing on the hostname that happens?

I think both are valid use-cases.
See #81 (comment)

@danehans
Copy link
Contributor Author

In scenario 2, are you doing http routing before using TLS on the backside?

@bowei I call scenario 2 "Reencrypt" in which the gateway terminates the client-side tls connection and creates a new tls connection to the backend service. The gateway would associate a ca bundle with the route to auth the backend service. PTAL at https://github.com/kubernetes-sigs/service-apis/pull/71/files#diff-c32a8ad2aa56de73b42e20d9e3cc82d8 for an example.

This might be handled by saying that the Service app-protocol field can be used to determine whether or not TLS will be used on the Gateway/HTTPRoute => Service leg of the journey.

Can you help me better understand "Service app-protocol field"? Are you referring to service.spec.ports[x].protocol? PTAL at #71 on my thoughts for implementation.

In scenario 3, what kind of routing are you expecting wrt to TLS? For example, this could just be TCP passed through OR is there some form of routing on the hostname that happens?

I call this scenario "Passthrough". Yes, the supported route type would be TCPRoute, which could forward to a backend Service or TCPSplit that would load balance across multiple backend services pending #57

@hbagdi
Copy link
Contributor

hbagdi commented Feb 14, 2020

Can you help me better understand "Service app-protocol field"?

He is referring to a new field that is coming in 1.18: kubernetes/enhancements#1422

@bowei
Copy link
Contributor

bowei commented Feb 14, 2020

Thanks for providing the link.

@danehans
Copy link
Contributor Author

danehans commented Apr 9, 2020

He is referring to a new field that is coming in 1.18: kubernetes/enhancements#1422

@bowei do we want to address this use case for pre 1.18 clusters that don't support the Service app-protocol field?

@robscott
Copy link
Member

robscott commented Apr 9, 2020

As a bit of a tangential update, that field did land in 1.18 but due to backwards compatibility requirements had to be feature gated - it won't be enabled by default until 1.19, so given the extended timeline it might be worth looking at potential solutions here as well. For reference, here's the PR updating the KEP to reflect that updated timeline: kubernetes/enhancements#1676

@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 Jul 8, 2020
@bowei bowei removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 9, 2020
@hbagdi
Copy link
Contributor

hbagdi commented Sep 24, 2020

@danehans @bowei @jpeach @robscott With the current state of the API, is it safe to close this?

@hbagdi
Copy link
Contributor

hbagdi commented Oct 7, 2020

Considering this resolved.
Please re-open if otherwise.
/close.

@hbagdi
Copy link
Contributor

hbagdi commented Oct 7, 2020

/close

@k8s-ci-robot
Copy link
Contributor

@hbagdi: Closing this issue.

In response to 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.

Main automation moved this from Discussion items to Done Oct 7, 2020
jaison-tiu pushed a commit to jaison-tiu/gateway-api that referenced this issue Apr 14, 2022
Add Service Directory GKE Integration recipes
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
Projects
No open projects
Main
  
Done
Development

Successfully merging a pull request may close this issue.

7 participants