[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-18。"],[[["\u003cp\u003eDialogflow CX webhooks, which require HTTPS endpoints, can utilize custom CA certificates when the default Google trust store is insufficient, such as for servers within Google's private VPC network.\u003c/p\u003e\n"],["\u003cp\u003eCustom certificates, either self-signed or custom root certificates, must be in DER format and include a subject alternative name that matches the webhook URL, with the optional keyUsage extension set to \u003ccode\u003edigitalSignature\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eTo configure a webhook with a custom certificate, the certificate file (in DER format) must be uploaded, and the webhook URL must correspond to the domain name signed by the custom certificate.\u003c/p\u003e\n"],["\u003cp\u003eService directory integrations require you to set the service directory endpoint with the IP and port of your server.\u003c/p\u003e\n"]]],[],null,["# Custom CA certificates\n\nConversational Agents (Dialogflow CX) webhooks require HTTPS endpoints\nthat present valid TLS certificates when they are\nverified using Google's default trust store. However, you may want to use custom\nCA certificates, which cannot be signed by a certificate authority recognized by\nGoogle's default trust store. For example, webhook servers that are inside\nGoogle's private VPC network have this issue. In this case, you can upload the\ncustom certificates to Conversational Agents (Dialogflow CX) when creating webhooks, and the uploaded\ncertificates will override Google's default trust store.\n\nCustom CA certificates can be self-signed certificates or custom root\ncertificates. You can upload multiple certificates in case you want to rotate\nthe certificates. The certificates must be in\n[DER format](https://en.wikipedia.org/wiki/X.509#Certificate_filename_extensions)\nand must be signed with\n[subject alternative name](https://en.wikipedia.org/wiki/Subject_Alternative_Name)\nmatching the webhook URL. When the\n[keyUsage](https://datatracker.ietf.org/doc/html/rfc5280#section-4.2.1.3)\nextension is present, its value needs to be `digitalSignature`.\n| **Note:** Conversational Agents (Dialogflow CX) does not support customizing the webhook client certificate to perform [mutual TLS authentication](/dialogflow/cx/docs/concept/mtls).\n\nDemo self-signed server\n-----------------------\n\nThe following is the configuration of a demo server:\n\n1. Prepare self-signed certificate files. We use www.example.com as the example domain. \n\n ```text\n openssl genrsa -out server.key 2048\n openssl req -nodes -new -sha256 -newkey rsa:2048 -key server.key -subj \"/CN=www.example.com\" -out server.csr\n openssl x509 -req -days 3650 -sha256 -in server.csr -signkey server.key -out server.crt -extfile \u003c(printf \"\\nsubjectAltName='DNS:www.example.com'\")\n openssl x509 -in server.crt -out server.der -outform DER\n ```\n2. Start your HTTPS server using the server certificate (`server.crt`) and private key (`server.key`) created in previous step. We assume the server is listening on port 443.\n3. Test to connect to the server locally. \n\n ```text\n curl --cacert server.crt https://www.example.com --resolve www.example.com:443:127.0.0.1\n ```\n\nDemo webhook with custom certificate\n------------------------------------\n\nAfter you have setup the server with your custom certificate, you may\n[create a webhook resource](/dialogflow/cx/docs/concept/webhook#create)\nwith the following extra instructions to use the custom certificate:\n\n- Set the URL matching the domain signed with the certificate (`https://www.example.com` in previous demo). It is your own responsibility to make sure that your domain will correctly resolve to the IP address of the server.\n- Upload the custom certificate in DER format. This is the `server.der` file in previous self-signed demo or the custom root certificate.\n- For webhooks integrated with [Service Directory private network access](/dialogflow/cx/docs/concept/webhook#sd), Setup your [Service Directory Endpoint](/service-directory/docs/configuring-service-directory#configure_an_endpoint) with the IP address and port of your server, and provide the [Service Directory Service](/service-directory/docs/configuring-service-directory#configure_a_service) when creating webhook."]]