简体   繁体   English

如何保护Java应用程序将调用的AWS API Gateway端点?

[英]How can I protect an AWS API Gateway endpoint that will be called by a Java application?

Here is what I've got: 这是我所拥有的:

  • A Java application that lives outside of AWS. 驻留在AWS之外的Java应用程序。
  • An AWS API Gateway endpoint that triggers a Node.js Lambda function. 触发Node.js Lambda函数的AWS API Gateway端点。

Here is my question: 这是我的问题:

How can I protect the endpoint so that only my Java application can be authorized to call the AWS API Gateway endpoint? 如何保护终端节点,以便仅授权我的Java应用程序调用AWS API Gateway终端节点?

You can protect your API from unauthorized access by Turning on the API authentication in your API Gateway & Granting the user access for your API to you IAM users. 通过在API网关中打开API身份验证并向您的IAM用户授予对 API 的用户访问权限 ,可以保护API免受未经授权的访问。

AWS API GATEWAY RESOURCE EXPLAINING THE SAME 相同的AWS API网关资源

There are a number of ways to protect the API from unauthorized access, eg AWS Cognito, IAM roles, custom authorizers, resource policies. 有多种方法可以保护API免受未经授权的访问,例如AWS Cognito,IAM角色,自定义授权者,资源策略。 But they may appear an overkill for a simple use case (when just one application is authorized to access). 但是对于一个简单的用例(仅授权一个应用程序访问),它们可能显得有些矫kill过正。

Consider API Keys granting access to your API endpoint - a simple way to control access to your API. 考虑使用API密钥来授予对API端点的访问权限-一种控制对API的访问的简单方法。 Here is how to set it up. 是设置方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 部署在ELB后面的Java应用程序中AWS API网关的实际URL - Actual URL of AWS API gateway in Java Application deployed behind ELB 如何将 Java Lambda 从 AWS API Gateway 转换为负载均衡器 - How To Convert Java Lambda from AWS API Gateway to Load Balancer 如何使用我自己的自定义令牌系统保护我的 Java Spring 启动 API? - How can I protect my Java Spring Boot API with my own Custom Token System? 如何通过SDK Java在AWS API Gateway中启用CORS - How to enable CORS in AWS API Gateway via SDK Java 通过 Api Gateway 和 Java 在 AWS SNS 中换行 - Linebreak in AWS SNS through Api Gateway and Java 如何通过 Amazon API 网关 (JAVA) 检索用户的公共 IP 地址 - How can I retrieve a user's public IP address via Amazon API Gateway (JAVA) 如何使用 lambda 函数 java 使用公共证书调用 api 端点 - How can I call an api endpoint using a public certificate using lambda function java 从Java服务到AWS Lambda和AWS Gateway API - From Java Service to AWS Lambda and AWS Gateway API How to consume API from AWS API Gateway integrated with Lambda function in Java? - How to consume API from AWS API Gateway integrated with Lambda function in Java? 如何在 AWS API 网关中允许响应标头? - How to allow response headers in AWS API Gateway?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM