Add canonicalizer #121

Merged
alexvanin merged 1 commit from alexvanin/frostfs-http-gw:fix/canonicalizing into master 2024-06-27 13:10:58 +00:00
Owner

Some headers might be passed in non-canonical way by proxy servers, such as 'Authorization' header.
Server does not normalize headers, so we can get custom object attributes. Therefore, app has to normalize
all non object attribute headers by itself.

Some headers might be passed in non-canonical way by proxy servers, such as 'Authorization' header. Server does not normalize headers, so we can get custom object attributes. Therefore, app has to normalize all non object attribute headers by itself.
alexvanin added this to the v0.30.0 milestone 2024-06-25 16:13:53 +00:00
alexvanin self-assigned this 2024-06-25 16:13:53 +00:00
alexvanin requested review from realloc 2024-06-25 16:26:01 +00:00
alexvanin requested review from dkirillov 2024-06-25 16:26:02 +00:00
alexvanin requested review from pogpp 2024-06-25 16:26:03 +00:00
alexvanin requested review from r.loginov 2024-06-25 16:26:03 +00:00
alexvanin force-pushed fix/canonicalizing from 65e66f80c4 to 014ce5f393 2024-06-25 16:34:58 +00:00 Compare
alexvanin force-pushed fix/canonicalizing from 014ce5f393 to d9cbd302b1 2024-06-26 08:21:52 +00:00 Compare
alexvanin changed title from WIP: Add canonicalizer to Add canonicalizer 2024-06-26 08:21:59 +00:00
dkirillov reviewed 2024-06-26 09:56:36 +00:00
@ -562,0 +568,4 @@
toAddKeys := make([][]byte, 0, 10)
toAddValues := make([][]byte, 0, 10)
prefix := []byte(utils.UserAttributeHeaderPrefix)
Member

I suppose we also must exclude system attributes

Lines 31 to 34 in 1737f1d
systemAttributePrefix = "__SYSTEM__"
// deprecated: use systemAttributePrefix
systemAttributePrefixNeoFS = "__NEOFS__"

I suppose we also must exclude `system` attributes https://git.frostfs.info/TrueCloudLab/frostfs-http-gw/src/commit/1737f1d95fdc918ef1d7c8a91075fa9f978c37f6/utils/attributes.go#L31-L34
Author
Owner

Those attributes are object attributes. They are used during X-Attribute-* header processing such as X-Attribute-System-Expiration-Epoch. It's all done here: https://git.frostfs.info/TrueCloudLab/frostfs-http-gw/src/branch/master/internal/handler/filter.go#L25-L32

Therefore HTTP headers with system object attributes are also excluded.

Those attributes are object attributes. They are used during `X-Attribute-*` header processing such as `X-Attribute-System-Expiration-Epoch`. It's all done here: https://git.frostfs.info/TrueCloudLab/frostfs-http-gw/src/branch/master/internal/handler/filter.go#L25-L32 Therefore HTTP headers with system object attributes are also excluded.
dkirillov marked this conversation as resolved
dkirillov approved these changes 2024-06-27 06:54:17 +00:00
pogpp approved these changes 2024-06-27 10:34:17 +00:00
alexvanin merged commit d9cbd302b1 into master 2024-06-27 13:10:58 +00:00
alexvanin referenced this pull request from a commit 2024-06-27 13:11:00 +00:00
alexvanin deleted branch fix/canonicalizing 2024-06-27 13:11:03 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
3 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-http-gw#121
No description provided.