Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pkg/linksharing/sharing: add support for Signature Version 4-signed URLs
This change adds support for Signature Version 4-signed linksharing URLs (only for signed and not for pre-signed). The code that implements the new feature introduced a new package: pkg/linksharing/sharing/internal/signed, as it's orthogonal to the rest of the existing packages. Signed URLs will allow users to use non-public access grants after signing the URL using Secret Access Key corresponding to non-public access grant. Furthermore, the key reason to implement this feature is to allow satellite UI to use linksharing for object and nodes storing the object-map previews (the reason we can't just use Gateway-MT), but not make the credentials public. Signature Version 4 verification/re-signing is implemented as in https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html, but a few assumptions were made for linksharing only. Specifically: we always assume that the URL is non-pre-signed, we don't escape paths Amazon-style (AWS also doesn't do this for S3), and we always assume an empty request body (we only allow HEAD and GET requests). Hosting requests are currently not supported due to shared cache per custom hostname that successfully verified signed request would update and make non-public access grant public from the linksharing perspective. Closes #113 Change-Id: I18cb4896ae36c48cf62fbabf6813f9aeff56622c
- Loading branch information