Hello,
I am using Istio 1.1.7 and trying to integrate it with Vault (version 1.1.3). I would like to achieve the service to service mtls communication, as explained here: https://istio.io/docs/tasks/security/vault-ca/
So I setup the Kubernetes auth backend in Vault, and the pki secret backend. I noticed Istio wants a specific path where to mount the pki, so I created a specific path for istio_ca. It seems the SDS is properly configured (the 3 node agent are running properly) and the communication to Vault is properly setup.
Once deployed the httpbin and sleep pods, the logs are saying:
[2019-07-22 13:44:36.837][20][warning][config] [bazel-out/k8-opt/bin/external/envoy/source/common/config/_virtual_includes/grpc_stream_lib/common/config/grpc_stream.h:86] gRPC config stream closed: 2, failed to sign CSR: no certificate chain in the CSR response
[2019-07-22 13:44:37.269][20][warning][config] [bazel-out/k8-opt/bin/external/envoy/source/common/config/_virtual_includes/grpc_stream_lib/common/config/grpc_stream.h:86] gRPC config stream closed: 2, failed to sign CSR: no certificate chain in the CSR response
[2019-07-22 13:44:38.054][20][warning][config] [bazel-out/k8-opt/bin/external/envoy/source/common/config/_virtual_includes/grpc_stream_lib/common/config/grpc_stream.h:86] gRPC config stream closed: 2, failed to get root cert
Looking at the Vault logs, I found request and response from the node agent:
Jul 22 14:12:23 ip-10-13-1-167 vault[1807]: {"time":"2019-07-22T14:12:23.725021758Z","type":"request","auth":{"client_token":"hmac-sha256:5c6c3aedde96f3376223eda8efe911c145324ebde4246cb3238ce6eb7cdf2cc3","accessor":"hmac-sha256:de78be48051cb887036ff1e535d9ac20b3be00147833a23327b3855e61e11daf","display_name":"kubernetes-default-vault-citadel-sa","policies":["default","k8spolicy"],"token_policies":["default","k8spolicy"],"metadata":{"role":"istio-cert","service_account_name":"vault-citadel-sa","service_account_namespace":"default","service_account_secret_name":"vault-citadel-sa-token-4cnd7","service_account_uid":"aa933d86-a713-11e9-8fd1-0a4f26ebfca0"},"entity_id":"af53aca7-4ffe-517c-9424-ce96cd9ef00d","token_type":"service"},"request":{"id":"4bc4d0a8-633b-740c-7746-b4ed1bf0dd8a","operation":"update","client_token":"hmac-sha256:5c6c3aedde96f3376223eda8efe911c145324ebde4246cb3238ce6eb7cdf2cc3","client_token_accessor":"hmac-sha256:de78be48051cb887036ff1e535d9ac20b3be00147833a23327b3855e61e11daf","namespace":{"id":"root","path":""},"path":"istio_ca/sign/istio-pki-role","data":{"csr":"hmac-sha256:7f215bbe7ac8db3eda1f40f6ff286d86bc6abb8e157b713602c0902ab63dab41","exclude_cn_from_sans":true,"format":"hmac-sha256:9ba85113ce4c2691fda9236d57270669425a9377c02a1112929c844e61c44884","ttl":"hmac-sha256:299ffec4408d56f906dca9fcd1532caf0ab082262f68323ca1a6100a3d52af3f"},"policy_override":false,"remote_address":"10.13.4.206","wrap_ttl":0,"headers":{}},"error":""}
Jul 22 14:12:23 ip-10-13-1-167 vault[1807]: {"time":"2019-07-22T14:12:23.728651711Z","type":"response","auth":{"client_token":"hmac-sha256:5c6c3aedde96f3376223eda8efe911c145324ebde4246cb3238ce6eb7cdf2cc3","accessor":"hmac-sha256:de78be48051cb887036ff1e535d9ac20b3be00147833a23327b3855e61e11daf","display_name":"kubernetes-default-vault-citadel-sa","policies":["default","k8spolicy"],"token_policies":["default","k8spolicy"],"metadata":{"role":"istio-cert","service_account_name":"vault-citadel-sa","service_account_namespace":"default","service_account_secret_name":"vault-citadel-sa-token-4cnd7","service_account_uid":"aa933d86-a713-11e9-8fd1-0a4f26ebfca0"},"entity_id":"af53aca7-4ffe-517c-9424-ce96cd9ef00d","token_type":"service"},"request":{"id":"4bc4d0a8-633b-740c-7746-b4ed1bf0dd8a","operation":"update","client_token":"hmac-sha256:5c6c3aedde96f3376223eda8efe911c145324ebde4246cb3238ce6eb7cdf2cc3","client_token_accessor":"hmac-sha256:de78be48051cb887036ff1e535d9ac20b3be00147833a23327b3855e61e11daf","namespace":{"id":"root","path":""},"path":"istio_ca/sign/istio-pki-role","data":{"csr":"hmac-sha256:7f215bbe7ac8db3eda1f40f6ff286d86bc6abb8e157b713602c0902ab63dab41","exclude_cn_from_sans":true,"format":"hmac-sha256:9ba85113ce4c2691fda9236d57270669425a9377c02a1112929c844e61c44884","ttl":"hmac-sha256:299ffec4408d56f906dca9fcd1532caf0ab082262f68323ca1a6100a3d52af3f"},"policy_override":false,"remote_address":"10.13.4.206","wrap_ttl":0,"headers":{}},"response":{"data":{"certificate":"hmac-sha256:f12fba4c09e2df7f75d0303cb89cd45241930fb36f49252125165a9798720837","expiration":1563891143,"issuing_ca":"hmac-sha256:a804dd6874577d9ab85d3ec771c34acf36bb0c2221adda1e22ff7ab25caa2c85","serial_number":"hmac-sha256:e8a59b891a9f7e6866b344105aa080d69eafff68ea0b3c9de9d0ba29befb2160"},"headers":null},"error":""}
It seems to me that Vault is not returning the full chain - maybe is returning only the client cert, but not the CA and the intermediate.
Could you help me here please?
Cheers,
Simone