minio-js
minio-js copied to clipboard
Encryption for single files
AWS S3 offers to provide a customer encryption key for every file. Will this feature be supported in the future? IMHO it would make sense to also make it optional to provide an encryption/decription key for single files and also buckets.
MinIO supports SSE-C
just like AWS S3, just that minio-js
does not support it yet. We will be adding this to our minio-js
SDK soon.
Thank you for your response. I would really appreciate it.
any news about this ?
I think they're already developing this feature, at least it's in their milestone plan.
@xMarkusSpringerx @roonie007
Please setup a KMS as described https://docs.min.io/docs/minio-kms-quickstart-guide.html and try the below code. It will upload successfully
Please verify and update the behaviour.
function putObject (buckName, objName, cb) {
var metaData = {
'Content-Type': 'application/octet-stream',
'x-amz-server-side-encryption':"AES256"
}
// Using fPutObject API upload your file to the bucket europetrip.
minioClient.putObject(buckName, objName, file, metaData, function (err, info) {
if (err) return console.log(err)
console.log('File uploaded successfully.',info)
cb && cb(info)
})
}
putObject("my-bucket","my-enc-obj")
Running mc stat local/my-bucket/
would give the following output
Name : my-enc-obj
Date : 2021-03-12 16:05:30 IST
Size : 52 B
ETag : 8cc20226bdc37dedb09a322d69e63895
VersionID : 2ddfa367-5095-4a21-a136-66e0ad8a1c21
Type : file
Metadata :
Content-Type: application/octet-stream
Encrypted :
X-Amz-Server-Side-Encryption: AES256
@kannappanr