简体   繁体   English

AWS REST Api 作为 S3 代理并访问客户端特定的存储桶

[英]AWS REST Api as S3 proxy and accessing client specific bucket

I have created AWS API Gateway as S3 proxy as per guidelines here .我按照此处的指南创建了 AWS API 网关作为 S3 代理。 So final url looks something like所以最终的 url 看起来像

http://api.exmaple.com/v1/ {clientbucketname}/{key} http://api.exmaple.com/v1/ {clientbucketname}/{key}

client will use their pre-assigned bucket name in the url.客户端将在 url 中使用他们预先分配的存储桶名称。 I understand that if API is authenticated using IAM user then API will have access to the bucket belongs to authenticated IAM user and can perform actions only on a particular client's bucket.我了解,如果 API 使用 IAM 用户进行身份验证,则 API 将有权访问属于经过身份验证的 IAM 用户的存储桶,并且只能对特定客户端的存储桶执行操作。
However my API is authenticated using API-KEY.但是我的 API 使用 API-KEY 进行了身份验证。 Each client has their own API-KEY how do i tie API-KEY to S3 bucket so client A cannot access client B's bucket simply by changing the bucket name in the URL.每个客户端都有自己的 API-KEY 我如何将 API-KEY 绑定到 S3 存储桶,因此客户端 A 无法通过更改 URL 中的存储桶名称来访问客户端 B 的存储桶。

It is not possible without AWS_IAM authorization.没有 AWS_IAM 授权是不可能的。

API Gateway uses the result of that authorization to locate the account, role and bucket. API 网关使用该授权的结果来定位帐户、角色和存储桶。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM