-
Notifications
You must be signed in to change notification settings - Fork 574
Fix default tls mode for destination and add 80-443 mapping for ext svc #314
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -378,7 +378,7 @@ message OutlierDetection { | |
// privateKey: /etc/certs/client_private_key.pem | ||
// caCertificates: /etc/certs/rootcacerts.pem | ||
// | ||
// The following rule configures a client to use TLS when talking to a foreign service whose domain matches *.foo.com. | ||
// The following rule configures a client to use TLS when talking to an external service whose domain matches *.foo.com. | ||
// | ||
// apiVersion: config.istio.io/v1alpha2 | ||
// kind: DestinationRule | ||
|
@@ -393,19 +393,29 @@ message OutlierDetection { | |
message TLSSettings { | ||
// TLS connection mode | ||
enum TLSmode { | ||
// If set to "disable", the proxy will use not setup a TLS connection to the | ||
// upstream server. | ||
DISABLE = 0; | ||
|
||
// Placeholder | ||
TLSMODE_INVALID = 0; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we should keep There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There's also no reason to add an invalid value to our enum when there's a reasonable default value we can use instead. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Right, but that is covered right? I can omit TLSmode completely, in which case, the semantics is keep things as is.. if I specify a TLS mode, I have to pick something or other (certificates, modes, etc..). Disable implies do not setup a TLS context in the upstream cluster.. I felt that it was a bit dangerous to leave as default. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually, to that point: is There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah true. I was looking at it from a disable istio_mtls thing.. So that we have the ability to control the mTLS setting on a service by service basis. But may be this should not get into route rule in the first place. Should be kept strictly separate and let admins tackle that.. From that point, i think even specifying Istio as an mTLS option here seems like conflating auth and routing (I don't want to inherit RBAC related issues inside route rule semantics).. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If Istio is turning on mTLS by default with it's own provided certificates, isn't There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You are right in that ISTIO implies mTLS. But I was trying to avoid this implicit inference that if its mTLS it will be istio, unless you specify your own certs. (for what its worth, I could turn off istio auth completely). In that case, having a distinct ISTIO_MTLS is more clearer than simply mTLS. But that may be me reading too much into this. I am open to any option here. |
||
|
||
// If set to "istio", the proxy will set up mutual TLS authentication | ||
// using Istio CA issued certificates. This is the default when Istio | ||
// mTLS authentication is enabled mesh-wide. | ||
ISTIO = 1; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need an explicit value for this? Could we instead use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I like the idea of using the enum to distinguish between 'mutual using local mesh identity' and 'mutual using specific key'. At some point we'll likely end up having to support 'mutual with specific mesh identity' when our identity management system allows for identity delegation. We can just have the enum be "MUTUAL" but then we have to push the other options down into a one-of. oneof { There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry just saw this message, right, current setup is more extendable, but maybe we can give a more meaningful name. What about MUTUAL_TLS_ISTIO_CERT |
||
|
||
// If set to "simple", the proxy will originate a TLS connection to the | ||
// upstream server. | ||
SIMPLE = 1; | ||
// upstream server. This is the default mode for external services with | ||
// missing port specification. | ||
SIMPLE = 2; | ||
|
||
// If set to "mutual", the proxy will secure connections to the | ||
// upstream using mutual TLS by presenting client certificates for | ||
// authentication. | ||
MUTUAL = 2; | ||
}; | ||
// authentication. The certificates should be specified using the | ||
// configuration fields (clientCertificate, privateKey). | ||
MUTUAL = 3; | ||
|
||
// If set to "disable", the proxy will use not setup a TLS connection | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. doc is unclear. I tend to agree with Zack on PASSTHROUGH |
||
// to the upstream server. | ||
DISABLE = 4; | ||
}; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: wrong indentation here |
||
|
||
// REQUIRED: Indicates whether connections to this port should be secured | ||
// using TLS. The value of this field determines how TLS is enforced. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One small issue: if destination is *.foo.com, I'm not sure how SNI and SAN will be specified... Maybe indicate in the doc that if SNI or SAN is needed, you need individual hosts, no wildcard ?
Also, once Piotr has the SNI sniffing - we may want to add mode=TRANSPARENT, in which case the client will initiate
a https connection ( all other modes assume client connects to http://foo.com:443 - I assume ? ).
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is covered by the SAN and SNI fields on this object:
api/routing/v1alpha2/destination_rule.proto
Lines 437 to 443 in 911b3fc
We should update the comment on the SNI field to make clear that it must be a a subset of the hosts in the destination.