-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix issue where TLS configuration was ignored for unix sockets in con…
…sul connect envoy. (#15913) Fix issue where TLS configuration was ignored for unix sockets in consul connect envoy. Disable xds check on bootstrap mode and change check to warn only.
- Loading branch information
1 parent
233eacf
commit 7b4f45e
Showing
4 changed files
with
259 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
```release-note:bug | ||
cli: Fix issue where `consul connect envoy` was unable to configure TLS over unix-sockets to gRPC. | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
222 changes: 222 additions & 0 deletions
222
command/connect/envoy/testdata/grpc-addr-unix-with-tls.golden
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,222 @@ | ||
{ | ||
"admin": { | ||
"access_log_path": "/dev/null", | ||
"address": { | ||
"socket_address": { | ||
"address": "127.0.0.1", | ||
"port_value": 19000 | ||
} | ||
} | ||
}, | ||
"node": { | ||
"cluster": "test", | ||
"id": "test-proxy", | ||
"metadata": { | ||
"namespace": "default", | ||
"partition": "default" | ||
} | ||
}, | ||
"layered_runtime": { | ||
"layers": [ | ||
{ | ||
"name": "base", | ||
"static_layer": { | ||
"re2.max_program_size.error_level": 1048576 | ||
} | ||
} | ||
] | ||
}, | ||
"static_resources": { | ||
"clusters": [ | ||
{ | ||
"name": "local_agent", | ||
"ignore_health_on_host_removal": false, | ||
"connect_timeout": "1s", | ||
"type": "STATIC", | ||
"transport_socket": { | ||
"name": "tls", | ||
"typed_config": { | ||
"@type": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext", | ||
"common_tls_context": { | ||
"validation_context": { | ||
"trusted_ca": { | ||
"inline_string": "-----BEGIN CERTIFICATE-----\nMIIEtzCCA5+gAwIBAgIJAIewRMI8OnvTMA0GCSqGSIb3DQEBBQUAMIGYMQswCQYD\nVQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDVNhbiBGcmFuY2lzY28xHDAa\nBgNVBAoTE0hhc2hpQ29ycCBUZXN0IENlcnQxDDAKBgNVBAsTA0RldjEWMBQGA1UE\nAxMNdGVzdC5pbnRlcm5hbDEgMB4GCSqGSIb3DQEJARYRdGVzdEBpbnRlcm5hbC5j\nb20wHhcNMTQwNDA3MTkwMTA4WhcNMjQwNDA0MTkwMTA4WjCBmDELMAkGA1UEBhMC\nVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1TYW4gRnJhbmNpc2NvMRwwGgYDVQQK\nExNIYXNoaUNvcnAgVGVzdCBDZXJ0MQwwCgYDVQQLEwNEZXYxFjAUBgNVBAMTDXRl\nc3QuaW50ZXJuYWwxIDAeBgkqhkiG9w0BCQEWEXRlc3RAaW50ZXJuYWwuY29tMIIB\nIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxrs6JK4NpiOItxrpNR/1ppUU\nmH7p2BgLCBZ6eHdclle9J56i68adt8J85zaqphCfz6VDP58DsFx+N50PZyjQaDsU\nd0HejRqfHRMtg2O+UQkv4Z66+Vo+gc6uGuANi2xMtSYDVTAqqzF48OOPQDgYkzcG\nxcFZzTRFFZt2vPnyHj8cHcaFo/NMNVh7C3yTXevRGNm9u2mrbxCEeiHzFC2WUnvg\nU2jQuC7Fhnl33Zd3B6d3mQH6O23ncmwxTcPUJe6xZaIRrDuzwUcyhLj5Z3faag/f\npFIIcHSiHRfoqHLGsGg+3swId/zVJSSDHr7pJUu7Cre+vZa63FqDaooqvnisrQID\nAQABo4IBADCB/TAdBgNVHQ4EFgQUo/nrOfqvbee2VklVKIFlyQEbuJUwgc0GA1Ud\nIwSBxTCBwoAUo/nrOfqvbee2VklVKIFlyQEbuJWhgZ6kgZswgZgxCzAJBgNVBAYT\nAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNU2FuIEZyYW5jaXNjbzEcMBoGA1UE\nChMTSGFzaGlDb3JwIFRlc3QgQ2VydDEMMAoGA1UECxMDRGV2MRYwFAYDVQQDEw10\nZXN0LmludGVybmFsMSAwHgYJKoZIhvcNAQkBFhF0ZXN0QGludGVybmFsLmNvbYIJ\nAIewRMI8OnvTMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBADa9fV9h\ngjapBlkNmu64WX0Ufub5dsJrdHS8672P30S7ILB7Mk0W8sL65IezRsZnG898yHf9\n2uzmz5OvNTM9K380g7xFlyobSVq+6yqmmSAlA/ptAcIIZT727P5jig/DB7fzJM3g\njctDlEGOmEe50GQXc25VKpcpjAsNQi5ER5gowQ0v3IXNZs+yU+LvxLHc0rUJ/XSp\nlFCAMOqd5uRoMOejnT51G6krvLNzPaQ3N9jQfNVY4Q0zfs0M+6dRWvqfqB9Vyq8/\nPOLMld+HyAZEBk9zK3ZVIXx6XS4dkDnSNR91njLq7eouf6M7+7s/oMQZZRtAfQ6r\nwlW975rYa1ZqEdA=\n-----END CERTIFICATE-----\n" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"http2_protocol_options": {}, | ||
"loadAssignment": { | ||
"clusterName": "local_agent", | ||
"endpoints": [ | ||
{ | ||
"lbEndpoints": [ | ||
{ | ||
"endpoint": { | ||
"address": { | ||
"pipe": { | ||
"path": "/var/run/consul.sock" | ||
} | ||
} | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} | ||
] | ||
}, | ||
"stats_config": { | ||
"stats_tags": [ | ||
{ | ||
"regex": "^cluster\\.(?:passthrough~)?((?:([^.]+)~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", | ||
"tag_name": "consul.destination.custom_hash" | ||
}, | ||
{ | ||
"regex": "^cluster\\.(?:passthrough~)?((?:[^.]+~)?(?:([^.]+)\\.)?[^.]+\\.[^.]+\\.(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", | ||
"tag_name": "consul.destination.service_subset" | ||
}, | ||
{ | ||
"regex": "^cluster\\.(?:passthrough~)?((?:[^.]+~)?(?:[^.]+\\.)?([^.]+)\\.[^.]+\\.(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", | ||
"tag_name": "consul.destination.service" | ||
}, | ||
{ | ||
"regex": "^cluster\\.(?:passthrough~)?((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.([^.]+)\\.(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", | ||
"tag_name": "consul.destination.namespace" | ||
}, | ||
{ | ||
"regex": "^cluster\\.(?:passthrough~)?((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.(?:([^.]+)\\.)?[^.]+\\.internal[^.]*\\.[^.]+\\.consul\\.)", | ||
"tag_name": "consul.destination.partition" | ||
}, | ||
{ | ||
"regex": "^cluster\\.(?:passthrough~)?((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.(?:[^.]+\\.)?([^.]+)\\.internal[^.]*\\.[^.]+\\.consul\\.)", | ||
"tag_name": "consul.destination.datacenter" | ||
}, | ||
{ | ||
"regex": "^cluster\\.([^.]+\\.(?:[^.]+\\.)?([^.]+)\\.external\\.[^.]+\\.consul\\.)", | ||
"tag_name": "consul.destination.peer" | ||
}, | ||
{ | ||
"regex": "^cluster\\.(?:passthrough~)?((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.(?:[^.]+\\.)?[^.]+\\.([^.]+)\\.[^.]+\\.consul\\.)", | ||
"tag_name": "consul.destination.routing_type" | ||
}, | ||
{ | ||
"regex": "^cluster\\.(?:passthrough~)?((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.(?:[^.]+\\.)?[^.]+\\.[^.]+\\.([^.]+)\\.consul\\.)", | ||
"tag_name": "consul.destination.trust_domain" | ||
}, | ||
{ | ||
"regex": "^cluster\\.(?:passthrough~)?(((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.(?:[^.]+\\.)?[^.]+)\\.[^.]+\\.[^.]+\\.consul\\.)", | ||
"tag_name": "consul.destination.target" | ||
}, | ||
{ | ||
"regex": "^cluster\\.(?:passthrough~)?(((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+)\\.consul\\.)", | ||
"tag_name": "consul.destination.full_target" | ||
}, | ||
{ | ||
"regex": "^(?:tcp|http)\\.upstream(?:_peered)?\\.(([^.]+)(?:\\.[^.]+)?(?:\\.[^.]+)?\\.[^.]+\\.)", | ||
"tag_name": "consul.upstream.service" | ||
}, | ||
{ | ||
"regex": "^(?:tcp|http)\\.upstream\\.([^.]+(?:\\.[^.]+)?(?:\\.[^.]+)?\\.([^.]+)\\.)", | ||
"tag_name": "consul.upstream.datacenter" | ||
}, | ||
{ | ||
"regex": "^(?:tcp|http)\\.upstream_peered\\.([^.]+(?:\\.[^.]+)?\\.([^.]+)\\.)", | ||
"tag_name": "consul.upstream.peer" | ||
}, | ||
{ | ||
"regex": "^(?:tcp|http)\\.upstream(?:_peered)?\\.([^.]+(?:\\.([^.]+))?(?:\\.[^.]+)?\\.[^.]+\\.)", | ||
"tag_name": "consul.upstream.namespace" | ||
}, | ||
{ | ||
"regex": "^(?:tcp|http)\\.upstream\\.([^.]+(?:\\.[^.]+)?(?:\\.([^.]+))?\\.[^.]+\\.)", | ||
"tag_name": "consul.upstream.partition" | ||
}, | ||
{ | ||
"regex": "^cluster\\.((?:([^.]+)~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", | ||
"tag_name": "consul.custom_hash" | ||
}, | ||
{ | ||
"regex": "^cluster\\.((?:[^.]+~)?(?:([^.]+)\\.)?[^.]+\\.[^.]+\\.(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", | ||
"tag_name": "consul.service_subset" | ||
}, | ||
{ | ||
"regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?([^.]+)\\.[^.]+\\.(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", | ||
"tag_name": "consul.service" | ||
}, | ||
{ | ||
"regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.([^.]+)\\.(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+\\.consul\\.)", | ||
"tag_name": "consul.namespace" | ||
}, | ||
{ | ||
"regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.(?:[^.]+\\.)?([^.]+)\\.internal[^.]*\\.[^.]+\\.consul\\.)", | ||
"tag_name": "consul.datacenter" | ||
}, | ||
{ | ||
"regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.(?:[^.]+\\.)?[^.]+\\.([^.]+)\\.[^.]+\\.consul\\.)", | ||
"tag_name": "consul.routing_type" | ||
}, | ||
{ | ||
"regex": "^cluster\\.((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.(?:[^.]+\\.)?[^.]+\\.[^.]+\\.([^.]+)\\.consul\\.)", | ||
"tag_name": "consul.trust_domain" | ||
}, | ||
{ | ||
"regex": "^cluster\\.(((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.(?:[^.]+\\.)?[^.]+)\\.[^.]+\\.[^.]+\\.consul\\.)", | ||
"tag_name": "consul.target" | ||
}, | ||
{ | ||
"regex": "^cluster\\.(((?:[^.]+~)?(?:[^.]+\\.)?[^.]+\\.[^.]+\\.(?:[^.]+\\.)?[^.]+\\.[^.]+\\.[^.]+)\\.consul\\.)", | ||
"tag_name": "consul.full_target" | ||
}, | ||
{ | ||
"tag_name": "local_cluster", | ||
"fixed_value": "test" | ||
}, | ||
{ | ||
"tag_name": "consul.source.service", | ||
"fixed_value": "test" | ||
}, | ||
{ | ||
"tag_name": "consul.source.namespace", | ||
"fixed_value": "default" | ||
}, | ||
{ | ||
"tag_name": "consul.source.partition", | ||
"fixed_value": "default" | ||
}, | ||
{ | ||
"tag_name": "consul.source.datacenter", | ||
"fixed_value": "dc1" | ||
} | ||
], | ||
"use_all_default_tags": true | ||
}, | ||
"dynamic_resources": { | ||
"lds_config": { | ||
"ads": {}, | ||
"resource_api_version": "V3" | ||
}, | ||
"cds_config": { | ||
"ads": {}, | ||
"resource_api_version": "V3" | ||
}, | ||
"ads_config": { | ||
"api_type": "DELTA_GRPC", | ||
"transport_api_version": "V3", | ||
"grpc_services": { | ||
"initial_metadata": [ | ||
{ | ||
"key": "x-consul-token", | ||
"value": "" | ||
} | ||
], | ||
"envoy_grpc": { | ||
"cluster_name": "local_agent" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|