是否有基本身份验证的Amazon S3支持HTTP请求身份验证、基本、Amazon、HTTP

2023-09-11 08:32:33 作者:人潮拥挤我抱紧你

我想建立一个Amazon S3账号,创建一个水桶,上传一些数据,而这些数据将可使用HTTP GET 基本认证

I would like to set up an Amazon S3 account, create a bucket, upload some data, and that this data will be available using HTTP GET with basic authentication.

我知道,有几种方法可以得到验证的S3数据(查询字符串等等),但我希望能够提供一个简单的用户名/密码方式进行身份验证。

I know that there are several ways to get the S3 data authenticated (query string and such), but I would like to be able to provide a simple username/password scheme for authentication.

这可能吗?

推荐答案

您可以自己开发它作为一个Web应用程序或现有应用程序的一部分。它会消耗HTTP请求,取回自己的URI组件,将其转换为S3对象名称和使用的的getObject(),以获取其内容(使用可用S3的SDK中的一个,例如 AWS的Java SDK )。

You can develop it yourself as a web app or a part of your existing application. It will consume HTTP requests, retrieve their URI component, convert it to S3 object name and use getObject() to get its content (using one of available S3 SDKs, for example AWS Java SDK).

否则,你可以尝试一个托管解决方案 - s3auth.com (我是一个开发者)。它是一个开源项目,你可以看到这种机制是如何在核心类之一。 HTTP请求由服务处理,然后重新编译到Amazon S3内部认证方案:

Otherwise, you can try a hosted solution - s3auth.com (I'm a developer). It's an open source project, and you can see how this mechanism is implemented internally at one of its core classes. HTTP request is processed by the service and then re-translated to Amazon S3 internal authentication scheme:

该体系结构图解释了项目实施。巴新图片来自Amazon S3存储 maven.s3auth.com ,这是不匿名读取加载。这个图片的完整网址为

This architecture diagram explains how the project is implemented. The PNG picture is loaded from Amazon S3 bucket maven.s3auth.com, which is not readable anonymously. Full URL of this image is

http://s3auth:s3auth@maven.s3auth.com/texry/packages.png

检查还这篇文章:基本HTTP验证的S3桶