minio-js icon indicating copy to clipboard operation
minio-js copied to clipboard

Encryption for single files

Open xMarkusSpringerx opened this issue 4 years ago • 5 comments

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.

xMarkusSpringerx avatar May 08 '20 13:05 xMarkusSpringerx

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.

kannappanr avatar May 10 '20 06:05 kannappanr

Thank you for your response. I would really appreciate it.

xMarkusSpringerx avatar May 14 '20 17:05 xMarkusSpringerx

any news about this ?

roonie007 avatar Aug 10 '20 00:08 roonie007

I think they're already developing this feature, at least it's in their milestone plan.

xMarkusSpringerx avatar Aug 10 '20 11:08 xMarkusSpringerx

@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

prakashsvmx avatar Mar 12 '21 10:03 prakashsvmx