AWSAPIGatewayMTLS
创始人
2024-11-19 05:30:12
0

AWS API Gateway 支持使用 Mutual TLS (MTLS),通过在客户端和 API Gateway 之间启用 SSL/TLS 客户端身份验证,来增强 API 的安全性。以下是在 AWS CLI 中创建 MTLS 配置的示例代码:

1.手动创建 MTLS 证书

aws acm-pca create-certificate-authority --certificate-authority-configuration "KeyAlgorithm=RSASSA_PSS_2048_SHA256,SigningAlgorithm=SHA256WITHRSA,Purpose=TLS_SERVER" aws acm-pca get-certificate-authority-csr --certificate-authority-arn {certificate-authority-arn} --query Csr --output text > api-gateway-server.csr aws acm-pca issue-certificate --certificate-authority-arn {certificate-authority-arn} --csr file://api-gateway-server.csr --signing-algorithm SHA256WITHRSA --validity Value=365,Type="DAYS" --idempotency-token {idempotency-token} --query CertificateArn --output text > certificate-arn.txt aws acm-pca get-certificate --certificate-authority-arn {certificate-authority-arn} --certificate-arn $(cat certificate-arn.txt) --query Certificate --output text > api-gateway-server.crt

  1. 使用 MTLS 配置启用 API Gateway mTLS

aws apigateway update-rest-api --rest-api-id {rest-api-id} --patch-operations op="replace",path="/endpointConfiguration/types/EDGE/mtlsConfig/mode",value="REQUIRED" aws apigateway create-stage --rest-api-id {rest-api-id} --stage-name {stage-name} --deployment-id {deployment-id} --description {description} --access-log-settings '{"destinationArn": "{access-logs-ARN}","format": "{access-logs-format}"}' --client-certificate-id $(aws acm-pca get-certificate-authority-certificate --certificate-authority-arn {certificate-authority-arn} --query Certificate --output text | openssl x509 -outform der | openssl base64 -A) --no-certificate-verification aws apigateway update-stage --rest-api-id {rest-api-id} --stage-name {stage

相关内容

热门资讯

做出回应!wepoker辅助器... 做出回应!wepoker辅助器官方,wepoker脚本下载,模块教程(揭秘有挂)wepoker辅助器...
日前!菠萝辅助器免费版的特点,... 日前!菠萝辅助器免费版的特点,红龙poker辅助器免费观看,练习教程(有挂透视)1、全新机制【菠萝辅...
黑科技技巧!wepokerpl... 黑科技技巧!wepokerplus外挂,wepoker辅助软件视频,步骤教程(有挂规律)1、这是跨平...
在玩家背景下!wepoker一... 在玩家背景下!wepoker一直输的号能继续打吗,wepoker祈福有用吗,资料教程(发现有挂)在玩...
黑科技教程!wepoker有辅... 黑科技教程!wepoker有辅助吗,wepokerh5破解,项目教程(有挂规律)亲,关键说明,wep...
2026版软件!we poke... 2026版软件!we poker辅助器,wpk免费辅助,手册教程(有挂详情)1、每一步都需要思考,不...
插件辅助挂!红龙poker有辅... 插件辅助挂!红龙poker有辅助吗,hhpoker辅助软件下载,大纲教程(的确有挂)1、hhpoke...
不少玩家反映!aapoker万... 不少玩家反映!aapoker万能辅助器,wepokerplus到底是挂了吗,课程教程(真的有挂)一、...
迎来新发展!aapoker插件... 迎来新发展!aapoker插件,wepoker手机助手,教程书教程(果真有挂)暗藏猫腻,小编详细说明...
据相关数据显示!wepoker... 据相关数据显示!wepoker有人用过吗,We poker辅助器下载,办法教程(有挂方略)1、We ...