Skip to content

SNI routing primitives#546

Merged
istio-testing merged 2 commits intoistio:masterfrom
rshriram:sni_routing
Jun 19, 2018
Merged

SNI routing primitives#546
istio-testing merged 2 commits intoistio:masterfrom
rshriram:sni_routing

Conversation

@rshriram
Copy link
Copy Markdown
Member

Treating SNI routing as an explicit act rather than implicitly enabling it
by port names.

Signed-off-by: Shriram Rajagopalan shriramr@vmware.com

Signed-off-by: Shriram Rajagopalan <shriramr@vmware.com>
@googlebot googlebot added the cla: yes Set by the Google CLA bot to indicate the author of a PR has signed the Google CLA. label Jun 19, 2018
// The first rule matching an incoming request is used.
// An ordered list of route rules for HTTP traffic. HTTP routes will be
// applied to platform service ports named http-*/http2-*/grpc-*, gateway
// ports with protocol HTTP/HTTP2/GRPC/HTTPS and service entry ports
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note conflict with HTTPS here and mention below.

Suggest differentiating as "TLS terminated HTTPS" vs "unterminated TLS"

// An ordered list of route rules for TCP traffic.
// The first rule matching an incoming request is used.
repeated TCPRoute tcp = 4;
// An ordered list of route rules for TCP+TLS or HTTPS traffic. Routing
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alternate phrasing suggestion

"An ordered list of route rule for non-terminated TLS & HTTPS traffic..."

repeated TCPRoute tcp = 4;
// An ordered list of route rules for TCP+TLS or HTTPS traffic. Routing
// is typically performed using the SNI value presented by the
// ClientHello message. TLS routes will be applied to platform service
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we should just call the protocol tls instead of TCP_TLS. I think it reads better and doesn't necessarily imply the underlying protocol. Also the tunneling protocol should be listed first so for instance we can have 'tls-mongo' as a port label and have it work with tls-* matching rules

"TLS routes can be applies to service ports labelled tls-* & https-*, ...

// name: bookinfo-sni
// spec:
// hosts:
// - reviews.prod.svc.cluster.local
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SNI host should be in agreement with outer host right ??

The more useful example would be outer host is wildcard and SNI host is a sub-domain for routing

// port:
// number: 443
// ```
message TLSRoute {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@PiotrSikora should we include ALPN in here at some point ?

// SNI (server name indicator) to match on. Wildcard prefixes can be used
// in the SNI value. E.g., *.com will match foo.example.com as well as
// example.com.
string sni = 3;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

repeated ? Also sni_hosts to be consistent with terms.

// a.b.c.d/xx form or just a.b.c.d. This is only valid when the
// destination service has several IPs and the application explicitly
// specifies a particular IP.
string destination_subnet = 1;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we think this will be needed ? I guess eventually it might but I suspect we can leave it out for the moment. Same for port as the primary use case is Gateway binding.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is very useful and I am waiting for this to land in the filter chain match. I could do things like filter based on the service VIP subnet range if need be.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess it does no harm and we can see if it gains traction.

Aside - We need a refined way to mark individual API features as alpha/beta

@rshriram rshriram requested review from frankbu and vadimeisenbergibm and removed request for qiwzhang and sebastienvas June 19, 2018 21:30
@vadimeisenbergibm
Copy link
Copy Markdown
Contributor

/lgtm

@istio-testing
Copy link
Copy Markdown
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rshriram, vadimeisenbergibm

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@istio-testing istio-testing merged commit 3f90a76 into istio:master Jun 19, 2018
string sni = 3;
repeated string sni_hosts = 3;

// ALPN protocols to match on. Multiple ALPN protocols can be specified
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@PiotrSikora

lets leave this for a follow on PR. Needs some thought

rshriram pushed a commit to rshriram/api that referenced this pull request Jun 20, 2018
This reverts commit 3f90a76.

This PR was merged prematurely. Needs more work.
rshriram added a commit that referenced this pull request Jun 20, 2018
This reverts commit 3f90a76.

This PR was merged prematurely. Needs more work.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes Set by the Google CLA bot to indicate the author of a PR has signed the Google CLA.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants