From 3180e09750ee2f0907cfbd4edb989b1e70b3c837 Mon Sep 17 00:00:00 2001 From: Paul Willoughby Date: Thu, 22 Jun 2023 10:10:29 -0600 Subject: [PATCH] satellite/metainfo: increase default MaxEncryptedObjectKeyLength Allow a longer encrypted key length to reduce 'key length is too big' errors in gateway-mt. Gateway is enforcing an unencrypted key length of 1024 bytes but when encrypted some keys are exceeding the current limit. Updates https://github.com/storj/gateway-mt/issues/335 Change-Id: Ib02e2064c42e96b9d59936905832d8dd6068d2c7 --- satellite/metainfo/config.go | 2 +- scripts/testdata/satellite-config.yaml.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/satellite/metainfo/config.go b/satellite/metainfo/config.go index a7b782832..0fc6c9a2a 100644 --- a/satellite/metainfo/config.go +++ b/satellite/metainfo/config.go @@ -130,7 +130,7 @@ type Config struct { MaxInlineSegmentSize memory.Size `default:"4KiB" help:"maximum inline segment size"` // we have such default value because max value for ObjectKey is 1024(1 Kib) but EncryptedObjectKey // has encryption overhead 16 bytes. So overall size is 1024 + 16 * 16. - MaxEncryptedObjectKeyLength int `default:"1750" help:"maximum encrypted object key length"` + MaxEncryptedObjectKeyLength int `default:"2000" help:"maximum encrypted object key length"` MaxSegmentSize memory.Size `default:"64MiB" help:"maximum segment size"` MaxMetadataSize memory.Size `default:"2KiB" help:"maximum segment metadata size"` MaxCommitInterval time.Duration `default:"48h" testDefault:"1h" help:"maximum time allowed to pass between creating and committing a segment"` diff --git a/scripts/testdata/satellite-config.yaml.lock b/scripts/testdata/satellite-config.yaml.lock index c9e53a914..475f6c9d1 100755 --- a/scripts/testdata/satellite-config.yaml.lock +++ b/scripts/testdata/satellite-config.yaml.lock @@ -629,7 +629,7 @@ identity.key-path: /root/.local/share/storj/identity/satellite/identity.key # metainfo.max-commit-interval: 48h0m0s # maximum encrypted object key length -# metainfo.max-encrypted-object-key-length: 1750 +# metainfo.max-encrypted-object-key-length: 2000 # maximum inline segment size # metainfo.max-inline-segment-size: 4.0 KiB