beyondstorage / go-storage

A vendor-neutral storage library for Golang: Write once, run on every storage service.

Home Page:https://beyondstorage.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

services/s3: Migrate to aws-sdk-go-v2: Authenticating requests using query parameters

JinnyYi opened this issue · comments

Authenticating Requests: Using Query Parameters

Comparison

  • aws-sdk-go: It provides xxxRequest() to generate a "aws/request.Request" representing the client's request for almost all the operations. Then for query string authentication, we can use Presign to get the request's signed URL.
  • aws-sdk-go-v2: PresignClient represents the presign url client. And only PresignGetObject/PresignPutObject/PresignHeadObject/PresignUploadPart are provided.

When migrating to aws-sdk-go-v2, is it possible to provide services equivalent to the current version on authenticating requests? More specifically, how to implement MultipartHTTPSigner and QuerySignHTTPDelete?

Steps

  • New s3.PresignClient with s3.PresignOptions
  • Figure out whether more interfaces can support authentication with query parameters.

Maybe we need support from upstream: aws/aws-sdk-go-v2#1469