[英]How can I get Certificate from HTTPS request?
I am working with Google Assistant / Dialogflow.我正在使用 Google Assistant / Dialogflow。 I want to check all incoming requests.
我想检查所有传入的请求。 I need to get and verify a certificate.
我需要获取并验证证书。 I try to get a certificate from a header or param from HttpRequestServlet but nothing to get.
我尝试从 header 获取证书或从 HttpRequestServlet 获取参数,但一无所获。 How can I do this?
我怎样才能做到这一点?
I'm assuming that you want to validate incoming Dialogflow requests in your Java webhook server.我假设您想在 Java webhook 服务器中验证传入的 Dialogflow 请求。
Take a look at this.看看这个。 You should use Mutual TLS authentication:
您应该使用相互 TLS 身份验证:
To request mTLS:要请求 mTLS:
The documentation also provides a demo about how to do this on NodeJS server .该文档还提供了有关如何在 NodeJS 服务器上执行此操作的演示。 In Java, it depends on what you're using but the process is the same.
在 Java 中,这取决于您使用的是什么,但过程是相同的。 So take a look a these links about setting up mTLS on Java servers and you can use the NodeJS server demo as reference.
因此,请查看这些关于在 Java 服务器上设置 mTLS 的链接,您可以使用 NodeJS 服务器演示作为参考。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.