Fix gitlab intergation #125

Merged
alexvanin merged 4 commits from dkirillov/frostfs-s3-gw:bugfix/content-length-presigned-url into master 2023-06-02 14:16:21 +00:00
Collaborator
  • Fix trailing whitespaces

  • Handle negative Content-Length on put
    Add computing actual object size during calculating hash on put.
    Use this actual value to save in tree and cache

  • api/auth: DisableURIPathEscaping for presign
    Don't use escaping when presign url.
    Escape manually before.

* Fix trailing whitespaces * Handle negative Content-Length on put Add computing actual object size during calculating hash on put. Use this actual value to save in tree and cache * api/auth: DisableURIPathEscaping for presign Don't use escaping when presign url. Escape manually before.
dkirillov self-assigned this 2023-06-01 13:51:21 +00:00
dkirillov force-pushed bugfix/content-length-presigned-url from 65cb6d7e07 to 1381020300 2023-06-01 13:55:17 +00:00 Compare
dkirillov changed title from WIP: Fix gitlag intergation to WIP: Fix gitlab intergation 2023-06-01 13:55:40 +00:00
dkirillov requested review from storage-services-committers 2023-06-01 14:08:42 +00:00
dkirillov requested review from storage-services-developers 2023-06-01 14:08:42 +00:00
dkirillov changed title from WIP: Fix gitlab intergation to Fix gitlab intergation 2023-06-01 14:08:47 +00:00
dkirillov added 1 commit 2023-06-01 14:11:16 +00:00
DCO Details
Lint Details
Builds (1.19) Details
Builds (1.20) Details
Tests (1.19) Details
Tests (1.20) Details
0b82bd51d3
[#125] Update CHANGELOG.md
Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
alexvanin reviewed 2023-06-01 14:39:58 +00:00
@ -291,6 +291,7 @@ func cloneRequest(r *http.Request, authHeader *authHeader) *http.Request {
func (c *center) checkSign(authHeader *authHeader, box *accessbox.Box, request *http.Request, signatureDateTime time.Time) error {
awsCreds := credentials.NewStaticCredentials(authHeader.AccessKeyID, box.Gate.AccessKey, "")
signer := v4.NewSigner(awsCreds)
signer.DisableURIPathEscaping = true

Is it compatible with aws s3 presign?

Is it compatible with `aws s3 presign`?
Poster
Collaborator

Yes, aws presign generates a url like one that we couldn't handle in gitlab integration

Yes, `aws presign` generates a url like one that we couldn't handle in gitlab integration
alexvanin marked this conversation as resolved
@ -229,2 +229,4 @@
return nil, err
}
if p.Info.Encryption.Enabled() {
size = decSize

Can you provide some examples why size depends on p.Info.Encryption.Enabled()?
Can't we just always use size from the line above?

Can you provide some examples why `size` depends on `p.Info.Encryption.Enabled()`? Can't we just always use `size` from the line above?
Poster
Collaborator

Encrypted payload can be different from plain one. So we want to know the real size in HEAD requests for example, so we store real size in object attributes and tree node attribute

Encrypted payload can be different from plain one. So we want to know the real size in HEAD requests for example, so we store real size in object attributes and tree node attribute

Makes sense, thanks.

Makes sense, thanks.
alexvanin marked this conversation as resolved
alexvanin approved these changes 2023-06-02 09:41:41 +00:00
alexvanin merged commit bd898ad59e into master 2023-06-02 14:16:21 +00:00
alexvanin deleted branch bugfix/content-length-presigned-url 2023-06-02 14:16:22 +00:00
alexvanin added this to the v0.28.0 milestone 2023-07-12 09:37:02 +00:00
Sign in to join this conversation.
No reviewers
TrueCloudLab/storage-services-developers
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-s3-gw#125
There is no content yet.