I finally found the code snippet:
In /usr/libexec/nethserver/api/system-backup/check-s3
the validation is defined.
The check uploads a file and deletes it afterwards. Both is done with curl
.
Upload line:
curl -s -X PUT -T "${tmp_file}" -H "Host: ${BUCKET}.${HOST}" -H "Date: ${date}" -H "Content-Type: ${content_type}" -H "Authorization: AWS ${ACCESS_KEY}:${put_signature}" "https://${BUCKET}.${HOST}/${file_to_upload}"
Delete:
curl -s --fail -X DELETE -H "Host: ${BUCKET}.${HOST}" -H "Date: ${date}" -H "Authorization: AWS ${ACCESS_KEY}:${delete_signature}" "https://${BUCKET}.${HOST}/${file_to_upload}"
If you like you can PM me a test access to your S3 so I can check…