minio / mc

Unix like utilities for object store
https://min.io/download
GNU Affero General Public License v3.0
2.88k stars 550 forks source link

`mc put` options vs `mc get` flags for encryption with kms. #5051

Closed prakashsvmx closed 1 month ago

prakashsvmx commented 1 month ago

Expected behavior

mc put and mc get should have similar flags for enc-kms

Actual behavior

mc get is missing enc-kms option for example

Steps to reproduce the behavior

➜ mc get -h      

NAME:                                                                                                                                              
  mc get - get s3 object to local                                                                                                                  

USAGE:                                                                                                                                             
  mc get [FLAGS] SOURCE TARGET                                                                                                                     

FLAGS:                                                                                                                                             
...       
  --enc-c value                    encrypt/decrypt objects using client provided keys. (multiple keys can be provided) Formats: RawBase64 or Hex.  
  --version-id value, --vid value  get a specific version of an object                                                                             
  --help, -h                       show help                                                                                                       

EXAMPLES:                                                                                                                                          
  1. Get an object from MinIO storage to local file system                                                                                         
     $ mc get play/mybucket/object path-to/object                                                                                                  

  2. Get an object from MinIO storage using encryption                                                                                             
     $ mc get --enc-c "play/mybucket/object=MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTIzNDU2Nzg5MDA" play/mybucket/object path-to/object                       
NAME:                                                                                                                                                                                                         
  mc put - upload an object to a bucket                                                                                                                                                                       

USAGE:                                                                                                                                                                                                        
  mc put [FLAGS] SOURCE TARGET                                                                                                                                                                                

FLAGS:                                                                                                                                                                                                        
  --enc-c value                 encrypt/decrypt objects using client provided keys. (multiple keys can be provided) Formats: RawBase64 or Hex.                                                                
  --enc-kms value               encrypt/decrypt objects using specific server-side encryption keys. (multiple keys can be provided) [$MC_ENC_KMS]                                                             
  --enc-s3 value                encrypt/decrypt objects using server-side default keys and configurations. (multiple keys can be provided). [$MC_ENC_S3]                                                      
 ....                                                                                                              
  --help, -h                    show help                                                                                                                                                                     

ENVIRONMENT VARIABLES:                                                                                                                                                                                        
  MC_ENC_KMS: KMS encryption key in the form of (alias/prefix=key).                                                                                                                                           
  MC_ENC_S3: S3 encryption key in the form of (alias/prefix=key).                                                                                                                                             

EXAMPLES:                                                                                                                                                                                                     
....                                                                                                                                                                                       
  4. Put an object to MinIO storage using sse-c encryption                                                                                                                                                    
     $ mc put --enc-c "play/mybucket/object=MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTIzNDU2Nzg5MDA" path-to/object play/mybucket/object                                                                                  

  5. Put an object to MinIO storage using sse-kms encryption                                                                                                                                                  
     $ mc put --enc-kms path-to/object play/mybucket/object          

mc --version

mc --version mc version RELEASE.2024-09-16T17-43-14Z (commit-id=11ebe952ea30e426e564f66e78d178465ae7c432) Runtime: go1.22.6 linux/amd64 Copyright (c) 2015-2024 MinIO, Inc. License GNU AGPLv3 https://www.gnu.org/licenses/agpl-3.0.html

System information