在 AWS 中运行 spring boot 应用程序并且只允许通过 AWS API Gateway 访问
Posted
技术标签:
【中文标题】在 AWS 中运行 spring boot 应用程序并且只允许通过 AWS API Gateway 访问【英文标题】:Running spring boot application in AWS and only allowing access via the AWS API Gateway 【发布时间】:2017-07-22 08:42:27 【问题描述】:我想在 aws 中运行一个 spring boot 应用程序(使用 ec2 或 elastic beanstalk);这个应用程序有 REST 端点,我想保护它,以便只有 AWS API Gateway 有权调用端点(即没有公共访问权限,也没有来自其他服务的访问权限)
我该怎么做?
【问题讨论】:
【参考方案1】:您必须将 API 网关配置为使用 Client-Side SSL Certificate。然后,您必须配置后端以拒绝任何不包含该证书的请求。
【讨论】:
以上是关于在 AWS 中运行 spring boot 应用程序并且只允许通过 AWS API Gateway 访问的主要内容,如果未能解决你的问题,请参考以下文章