-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Add verify server hostname to tls default #17155
Changes from all commits
d608f6c
f2f28e1
e424fe8
7637f10
1be54d3
c628acc
76281e2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
```release-note:improvement | ||
config: Add new `tls.defaults.verify_server_hostname` configuration option. This specifies the default value for any interfaces that support the `verify_server_hostname` option. | ||
``` |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2094,6 +2094,12 @@ specially crafted certificate signed by the CA can be used to gain full access t | |
* `TLSv1_2` (default) | ||
* `TLSv1_3` | ||
|
||
- `verify_server_hostname` ((#tls_internal_rpc_verify_server_hostname)) When | ||
set to true, Consul verifies the TLS certificate presented by the servers | ||
match the hostname `server.<datacenter>.<domain>`. By default this is false, | ||
and Consul does not verify the hostname of the certificate, only that it | ||
is signed by a trusted CA. | ||
|
||
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 need to add 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're right, thanks, I pushed the change |
||
**WARNING: TLS 1.1 and lower are generally considered less secure and | ||
should not be used if possible.** | ||
|
||
|
@@ -2201,7 +2207,7 @@ specially crafted certificate signed by the CA can be used to gain full access t | |
only way to enforce that no client can communicate with a server unencrypted | ||
is to also enable `verify_incoming` which requires client certificates too. | ||
|
||
- `verify_server_hostname` ((#tls_internal_rpc_verify_server_hostname)) When | ||
- `verify_server_hostname` Overrides [tls.defaults.verify_server_hostname](#tls_defaults_verify_server_hostname). When | ||
set to true, Consul verifies the TLS certificate presented by the servers | ||
match the hostname `server.<datacenter>.<domain>`. By default this is false, | ||
and Consul does not verify the hostname of the certificate, only that it | ||
|
@@ -2285,9 +2291,6 @@ tls { | |
ca_file = "/etc/pki/tls/certs/ca-bundle.crt" | ||
verify_incoming = true | ||
verify_outgoing = true | ||
} | ||
|
||
internal_rpc { | ||
verify_server_hostname = true | ||
} | ||
} | ||
|
@@ -2316,9 +2319,7 @@ tls { | |
"cert_file": "/etc/pki/tls/certs/my.crt", | ||
"ca_file": "/etc/pki/tls/certs/ca-bundle.crt", | ||
"verify_incoming": true, | ||
"verify_outgoing": true | ||
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. Thank you for the diligence in updating these config examples in the docs :) |
||
}, | ||
"internal_rpc": { | ||
"verify_outgoing": true, | ||
fulviodenza marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"verify_server_hostname": true | ||
} | ||
} | ||
|
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.
Shall we add a test case testing that
tls.internal_rpc.verify_server_hostname
overridestls.defaults.verify_server_hostname
?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.
@fulviodenza , I am not sure if this test case has been added. Could you please confirm this? Thanks.
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.
yes, sorry, didn't push a change. Now should have been added