goofys
goofys copied to clipboard
Signature Version 2, x-amz-date: is Goofys using the wrong format?
I had a funny problem with Goofys not working with a specific cloud provider (the Italian Aruba Cloud Storage) from day 1 to 9 of the month. Aruba Cloud still uses Signature Version 2. Digging down, I discovered they have problems interpreting the x-amz-date header if it has a one-digit day number, like "Thu, 1 Sep 2022 09:01:44 +0000" today. If I replace it with "Thu, 01 Sep 2022 09:01:44 +0000" it works correctly.
So I changed timeFormat
to "Mon, 02 Jan 2006 15:04:05 +0000"
in internal/v2signer.go
and I got it working. RFC 7231 actually wants this two-digit format, so I guess that's the right thing to do and I'll open a PR for that.
However I see that S3FS uses ISO 8601 dates (20220901T093311Z), so I'm a little confused about what should the correct approach be. I can only find clear documentation about Signature Version 4, which requires ISO 8601, but not about Signature Version 2.
PR created, I didn't set it to fix this issue directly because, imho, we should also ensure that it's correct to use RFC 7231 instead of ISO 8601.