【问题标题】:How to enable mutual TLS on Google Dialogflow如何在 Google Dialogflow 上启用双向 TLS
【发布时间】:2020-04-02 08:40:14
【问题描述】:

根据https://cloud.google.com/dialogflow/docs/fulfillment-mtls 的谷歌文档,双向 TLS 是一种可选的身份验证方式。

我一直在尝试使用 nginx 服务器作为我的 Fulfillment Endpoint 进行设置,但是 Dialogflow 似乎并未实际发送带有请求的证书。如果我使用一些letsencrypt证书向带有curl的nginx服务器发出请求,那么它会按预期工作并且请求被代理到我的API端点。

server {
listen 80;
listen [::]:80;
server_name *.mysite.com;
return 301 https://$host$request_uri;
}
server {
listen 443 default_server ssl;
server_name _;
ssl_certificate /etc/letsencrypt/live/mysite/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/mysite/privkey.pem;
}
server {
listen 443 ssl;
server_name mysubdomain.mysite;
ssl_protocols TLSv1.2;
ssl_client_certificate /home/user/cacert.pem;
ssl_verify_client on;
ssl_verify_depth 10;
ssl_certificate /etc/letsencrypt/live/mysite.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/mysite.com/privkey.pem;
location / {
  proxy_pass https://myapi/;
}
}

此功能是否需要在某处打开才能尝试 TLS 连接?有人搞定了吗?

【问题讨论】:

    标签: dialogflow-es mutual-authentication


    【解决方案1】:

    事实证明,来自here 的 mozilla 包不能很好地播放。使用 google 只为我解决了这个问题

    curl https://pki.goog/gsr2/GTS1O1.crt | openssl x509 -inform der >> ca-crt.pem
    curl https://pki.goog/gsr2/GSR2.crt | openssl x509 -inform der >> ca-crt.pem
    

    【讨论】:

      猜你喜欢
      • 2020-04-07
      • 2020-09-29
      • 2018-07-01
      • 1970-01-01
      • 2020-09-24
      • 2020-11-11
      • 2018-08-08
      • 2015-03-15
      • 2021-03-09
      相关资源
      最近更新 更多