8000 Has minio supported sse-c for getObject and presignedUrl? · Issue #1019 · minio/minio-js · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Has minio supported sse-c for getObject and presignedUrl? #1019

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
philling opened this issue Apr 11, 2022 · 4 comments
Open

Has minio supported sse-c for getObject and presignedUrl? #1019

philling opened this issue Apr 11, 2022 · 4 comments

Comments

@philling
Copy link
philling commented Apr 11, 2022

Minio has supported sse-c for putObject,but not yet for getObject or presignedUrl?

@prakashsvmx
Copy link
Member
prakashsvmx commented Apr 11, 2022

@philling
could you please try:

s3Client.getObject('my-versioned-bucket', 'my-versioned-object', {versionId:"my-versionId", /*add other params/headers here*/}, function(err, dataStream) {

similarly:

s3Client.presignedGetObject('my-bucketname', 'my-objectname', 1000, {versionId:"10fa9946-3f64-4137-a58f-888065c0732e",/*Add other params/headers here*/},requestDate, function(e, presignedUrl) {

@prakashsvmx
Copy link
Member

Also please share the versions minio,minio-js used.

@philling
Copy link
Author

Also please share the versions minio,minio-js used.

"minio": "^7.0.25"

@philling
Copy link
Author
philling commented Apr 11, 2022

@philling could you please try:

s3Client.getObject('my-versioned-bucket', 'my-versioned-object', {versionId:"my-versionId", /*add other params/headers here*/}, function(err, dataStream) {

similarly:

s3Client.presignedGetObject('my-bucketname', 'my-objectname', 1000, {versionId:"10fa9946-3f64-4137-a58f-888065c0732e",/*Add other params/headers here*/},requestDate, function(e, presignedUrl) {

@prakashsvmx I Had tried getObject, but The following error is still prompted:

error: S3Error: The Signature you specified is invalid. code: 'SignatureDoesNotMatch'

@prakashsvmx Here is the codes

     s3Client.putObject(
          os.bucket,
          finalFileName,
          file,
          {
            'Content-Type': mimetype,
            'X-Amz-Server-Side-Encryption-Customer-Algorithm': 'AES256',
            'X-Amz-Server-Side-Encryption-Customer-Key': xKey,
            'X-Amz-Server-Side-Encryption-Customer-Key-MD5': xKeyMd5
          },
          (error, result) => {
            if (error) {
              return reject(error)
            }
            const { etag, versionId } = result
            return resolve({etag, versionId})
          }
        )
      s3Client.getObject(
        this.bucket,
        finalFileName,
        {
          etag,
          versionId,
          'X-Amz-Server-Side-Encryption-Customer-Algorithm': 'AES256',
          'X-Amz-Server-Side-Encryption-Customer-Key': xKey,
          'X-Amz-Server-Side-Encryption-Customer-Key-MD5': xKeyMd5
        },
        (error, readerStream) => {
          if (error) {
            return reject(error)
          }
          return resolve(readerStream)
        }
      )

@philling philling reopened this Apr 12, 2022
@philling philling changed the title Has minio-js supported sse-c for getObject and presignedUrl? Has minio supported sse-c for getObject and presignedUrl? Apr 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
0