aboutsummaryrefslogtreecommitdiff
path: root/script/test-smoke.sh
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2024-02-28 14:09:41 +0100
committerAlex Auvolat <alex@adnab.me>2024-03-07 15:43:48 +0100
commitfa4878bad6434f33ab9e0f663d8529e0db66d7e6 (patch)
tree5ff4de280dca3ac1dd9a178e14a84dca8cd1ab87 /script/test-smoke.sh
parent57acc60082089e1a24fd47588f6ff3cb20ed4eef (diff)
downloadgarage-fa4878bad6434f33ab9e0f663d8529e0db66d7e6.tar.gz
garage-fa4878bad6434f33ab9e0f663d8529e0db66d7e6.zip
[sse-c] Testing for SSE-C encryption
Diffstat (limited to 'script/test-smoke.sh')
-rwxr-xr-xscript/test-smoke.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/script/test-smoke.sh b/script/test-smoke.sh
index 9f9ea50c..acf56a90 100755
--- a/script/test-smoke.sh
+++ b/script/test-smoke.sh
@@ -82,6 +82,19 @@ if [ -z "$SKIP_AWS" ]; then
exit 1
fi
aws s3api delete-object --bucket eprouvette --key upload
+
+ echo "🛠️ Test SSE-C with awscli (aws s3)"
+ SSEC_KEY="u8zCfnEyt5Imo/krN+sxA1DQXxLWtPJavU6T6gOVj1Y="
+ SSEC_KEY_MD5="jMGbs3GyZkYjJUP6q5jA7g=="
+ echo "$SSEC_KEY" | base64 -d > /tmp/garage.ssec-key
+ for idx in {1,2}.rnd; do
+ aws s3 cp --sse-c AES256 --sse-c-key fileb:///tmp/garage.ssec-key \
+ "/tmp/garage.$idx" "s3://eprouvette/garage.$idx.aws.sse-c"
+ aws s3 cp --sse-c AES256 --sse-c-key fileb:///tmp/garage.ssec-key \
+ "s3://eprouvette/garage.$idx.aws.sse-c" "/tmp/garage.$idx.dl.sse-c"
+ diff "/tmp/garage.$idx" "/tmp/garage.$idx.dl.sse-c"
+ aws s3api delete-object --bucket eprouvette --key "garage.$idx.aws.sse-c"
+ done
fi
# S3CMD