[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-08-21 (世界標準時間)。"],[[["\u003cp\u003eThis guide outlines how to configure TLS for traffic between an Apigee proxy and its target, which can apply to both Apigee and Apigee hybrid.\u003c/p\u003e\n"],["\u003cp\u003eApigee does not support TLS versions 1.0 or 1.1, and using these versions will result in an \u003ccode\u003eSslHandshakeFailed\u003c/code\u003e error.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003e<SSLInfo>\u003c/code\u003e tag is used to configure TLS settings in a target endpoint or target server, with options to enable, enforce, and customize various TLS behaviors like client authentication and certificate validation.\u003c/p\u003e\n"],["\u003cp\u003eWhen updating an expired certificate, it is highly recommended to use references to the keystore and truststore, allowing for certificate updates without modifying the target endpoint or server.\u003c/p\u003e\n"],["\u003cp\u003eDepending on whether references, direct names, or flow variables are used to define the keystore and truststore, the process of updating an expired certificate varies in complexity and may require contacting Google Cloud Customer Care.\u003c/p\u003e\n"]]],[],null,["# Options for configuring TLS\n\n*This page\napplies to **Apigee** and **Apigee hybrid**.*\n\n\n*View [Apigee Edge](https://docs.apigee.com/api-platform/get-started/what-apigee-edge) documentation.*\n\nThis section shows how to configure TLS for traffic from a proxy to a target.\n| **Unsupported TLS versions:** Apigee does not support the use of TLS 1.0 or TLS1.1. If you use these protocols in your target endpoint configuration, the Apigee target endpoint throws the error `messaging.adaptors.http.flow.SslHandshakeFailed`.\n\nAbout\nsetting TLS options in a target endpoint or target server\n---------------------------------------------------------------\n\nA target can be represented by an XML object like the one below: \n\n```xml\n\u003cHTTPTargetConnection\u003e\n \u003cProperties/\u003e\n \u003cURL\u003ehttps:myTargetAddress\u003c/URL\u003e\n \u003cSSLInfo\u003e\n \u003cEnabled\u003etrue\u003c/Enabled\u003e\n \u003cEnforce\u003etrue\u003c/Enforce\u003e\n \u003cClientAuthEnabled\u003etrue\u003c/ClientAuthEnabled\u003e\n \u003cKeyStore\u003eref://myKeystoreRef\u003c/KeyStore\u003e\n \u003cKeyAlias\u003emyKeyAlias\u003c/KeyAlias\u003e\n \u003cTrustStore\u003eref://myTruststoreRef\u003c/TrustStore\u003e\n \u003cIgnoreValidationErrors\u003efalse\u003c/IgnoreValidationErrors\u003e\n \u003cProtocols\u003emyProtocols\u003c/Protocols\u003e\n \u003cCiphers\u003emyCipher\u003c/Ciphers\u003e\n \u003c/SSLInfo\u003e\n\u003c/HTTPTargetConnection\u003e\n```\n\nThe area of the target endpoint configuration that you modify to configure TLS is defined by the\n`\u003cSSLInfo\u003e` tag. You use the same `\u003cSSLInfo\u003e` tag to configure a\ntarget endpoint or target server.\n\nFor information about the child elements of `\u003cSSLInfo\u003e`, see\n[TLS/SSL TargetEndpoint configuration](/apigee/docs/api-platform/reference/api-proxy-configuration-reference#tlsssltargetendpointconfiguration).\n\nThe following table describes the TLS configuration elements used by the\n`\u003cSSLInfo\u003e` tag:\n\nAbout setting the\n\\\u003cKeyStore\\\u003e and \\\u003cTrustStore\\\u003e elements\n----------------------------------------------------------\n\nIn the example above, the keystore and truststore are specified by using\n**references**, in the form: \n\n```xml\n\u003cKeyStore\u003eref://myKeystoreRef\u003c/KeyStore\u003e\n\u003cTrustStore\u003eref://myTruststoreRef\u003c/TrustStore\u003e\n```\n\nApigee strongly recommends that you always use references to the keystore and truststore. A\nreference is a variable that contains the name of the keystore or truststore, rather than\nspecifying the keystore name directly. In this example:\n\n- **`myKeystoreRef`** is a reference that contains the name of the keystore. In this example, the name of the keystore is **myKeystore**.\n- **`myTruststoreRef`** is a reference that contains the name of the truststore. In this example, the name of the truststore is **myTruststore**.\n\nWhen a cert expires, you have to update the target endpoint/target server to\nspecify the keystore or truststore containing the new cert. The advantage of a reference is that\nyou can modify the value of the reference to change the keystore or truststore without having to\nmodify the target endpoint/target server itself:\n\nChanging the value of the reference does not require you to contact [Google Cloud Customer Care](https://cloud.google.com/support-hub/).\n\nAlternatively, you can specify the keystore name and truststore name directly: \n\n```xml\n\u003cKeyStore\u003emyKeystore\u003c/KeyStore\u003e\n\u003cTrustStore\u003emyTruststore\u003c/TrustStore\u003e\n```\n\nIf you directly specify the name of the keystore or truststore, then you must\ncontact [Google Cloud Customer Care](https://cloud.google.com/support-hub/).\n\nA third option is to use flow variables: \n\n```xml\n\u003cKeyStore\u003e{ssl.keystore}\u003c/KeyStore\u003e\n\u003cTrustStore\u003e{ssl.truststore}\u003c/TrustStore\u003e\n```\n\nYou can use flow variables to dynamically specify a keystore or\ntruststore, with an effect similar to using a reference. For more\ninformation, see\n[Using flow variables to set TLS/SSL values dynamically](/apigee/docs/api-platform/reference/api-proxy-configuration-reference#tlsssltargetendpointconfiguration-usingflowvariablestosettlssslvaluesdynamically).\n\nAbout configuring TLS\n---------------------\n\nAll Apigee customers, both paid and evaluation, have complete control over the configuration of\ntarget endpoints/target servers. In addition, paid Apigee customers have complete control over\nTLS properties.\n\n### Handling expired certificates\n\nIf a TLS certificate expires, or if your system configuration changes such that the\ncertificate is no longer valid, then you need to update the certificate. When configuring TLS for\na target endpoint/target server, you should decide how you are going to perform\nthat update before you perform any configuration.\n| **Note:** You cannot update an existing keystore or truststore to add a new certificate. You must create a new keystore/truststore when updating a certificate. Typically, you create the new keystore/truststore and upload the new cert before the cert in the old keystore/truststore expires. This lets you test the new keystore/truststore and rollback to the old keystore/truststore if there are any issues.\n\n### When a cert expires\n\nOn Apigee, you store certs in one of two places:\n\n- **Keystore** - Contains the TLS certificate and private key used to identify the entity during TLS handshaking.\n- **Truststore** - Contains trusted certificates on a TLS client used to validate a TLS server's certificate presented to the client. These certificates are typically self-signed certificates, certificates signed by a trusted CA, or certs used as part of two-way TLS (also known as mutual TLS or mTLS).\n\n**When a cert in a keystore expires, and you are using a reference to the\nkeystore**, you cannot upload a new cert to the keystore. Instead, you:\n\n1. Create a new keystore.\n2. Upload the new cert to the new keystore **using the same alias name** as in the old keystore.\n3. Update the reference in the target server/target endpoint to use the new keystore.\n\n**When a cert in a truststore expires, and you are using a reference to the\ntruststore**, you:\n\n1. Create a new truststore.\n2. Upload the new cert to the new truststore. The alias name does not matter for truststores. **Note**: If a cert is part of a chain, then you must either create a single file containing all the certs and upload that file to a single alias, or upload all certs in the chain separately to the truststore using a different alias for each cert.\n3. Update the reference in your target server/target endpoint to use the new truststore.\n\n### Summary of methods for updating an expired\ncert\n\nThe method that you use to specify the name of the keystore and truststore in\nthe target endpoint/target server determines how you perform the cert update. You can use:\n\n- References\n- Direct names\n- Flow variables\n\nEach of these methods has different repercussions on the update process, as described in the\nfollowing table:"]]