x-amazon-apigateway-integration。 tlsConfig 物件 - Amazon API 网关

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

x-amazon-apigateway-integration。 tlsConfig 物件

指TLS定整合的組態。

屬性名稱 類型 描述
insecureSkipVerification Boolean

僅支援 RESTAPIs. 指定API閘道是否略過由支援的憑證授權單位核發整合端點憑證的驗證。不建議您這樣做,但這可讓您使用由私人憑證授權單位簽署的憑證,或是自我簽署的憑證。如果啟用,APIGateway 仍會執行基本憑證驗證,包括檢查憑證的到期日、主機名稱以及根憑證授權單位是否存在。屬於私人授權單位的根憑證必須滿足下列限制:

  • x509 延伸 keyUsage 必須有 keyCertSign

  • x509 延伸 basicConstraints 必須有 CA:TRUE

僅支援 HTTPHTTP_PROXY 整合。

警告

insecureSkipVerification不建議啟用,特別是對於與公共HTTPS端點的整合。如果啟用insecureSkipVerification,就會增加 man-in-the-middle 攻擊的風險。

serverNameToVerify string

僅支援HTTPAPI私人整合。如果您指定伺服器名稱,APIGateway 會使用它來驗證整合憑證上的主機名稱。TLS握手中也包含伺服器名稱,以支援伺服器名稱指示 (SNI) 或虛擬主機。

x-amazon-apigateway-integration。 tlsConfig 例子

下列 Open API 3.0 範例會啟insecureSkipVerification用RESTAPIHTTP代理伺服器整合。

"x-amazon-apigateway-integration": { "uri": "http://petstore-demo-endpoint.execute-api.com/petstore/pets", "responses": { default": { "statusCode": "200" } }, "passthroughBehavior": "when_no_match", "httpMethod": "ANY", "tlsConfig" : { "insecureSkipVerification" : true } "type": "http_proxy", }

下列 Open API 3.0 範例會指serverNameToVerify定HTTPAPI私有整合的。

"x-amazon-apigateway-integration" : { "payloadFormatVersion" : "1.0", "connectionId" : "abc123", "type" : "http_proxy", "httpMethod" : "ANY", "uri" : "arn:aws:elasticloadbalancing:us-west-2:123456789012:listener/app/my-load-balancer/50dc6c495c0c9188/0467ef3c8400ae65", "connectionType" : "VPC_LINK", "tlsConfig" : { "serverNameToVerify" : "example.com" } }