mc encrypt 命令用来管理存储桶加密配置,语法如下:
C:\>mc encrypt -h NAME: mc encrypt - manage bucket encryption config USAGE: mc encrypt COMMAND [COMMAND FLAGS | -h] [ARGUMENTS...] COMMANDS: set set encryption config clear clear encryption config info show bucket encryption status FLAGS: --config-dir value, -C value path to configuration folder (default: "C:\\Users\\Administrator\\mc") --quiet, -q disable progress bar display --no-color disable color theme --json enable JSON lines formatted output --debug enable debug output --insecure disable SSL certificate verification --help, -h show help
为存储桶设置加密配置,语法如下:
C:\>mc encrypt set -h NAME: mc encrypt set - set encryption config USAGE: mc encrypt set TARGET FLAGS: --config-dir value, -C value path to configuration folder (default: "C:\\Users\\Administrator\\mc") --quiet, -q disable progress bar display --no-color disable color theme --json enable JSON lines formatted output --debug enable debug output --insecure disable SSL certificate verification --help, -h show help
(1)在存储桶“mybucket”上为别名“myminio”启用 SSE-S3 自动加密。
C:\> mc encrypt set sse-s3 myminio/mybucket
(2)使用存储桶“mybucket”上的 kms 密钥为别名“s3”启用 SSE-KMS 自动加密。
C:\> mc encrypt set sse-kms arn:aws:kms:us-east-1:xxx:key/xxx s3/mybucket
显示存储桶加密状态,语法如下:
C:\>mc encrypt info -h NAME: mc encrypt info - show bucket encryption status USAGE: mc encrypt info TARGET FLAGS: --config-dir value, -C value path to configuration folder (default: "C:\\Users\\Administrator\\mc") --quiet, -q disable progress bar display --no-color disable color theme --json enable JSON lines formatted output --debug enable debug output --insecure disable SSL certificate verification --help, -h show help
(1)显示存储桶“mybucket”的存储桶加密状态。
C:\> mc encrypt info myminio/mybucket
清除存储桶的加密配置,语法如下:
D:\server\minio>mc encrypt clear -h NAME: mc encrypt clear - clear encryption config USAGE: mc encrypt clear TARGET FLAGS: --config-dir value, -C value path to configuration folder (default: "C:\\Users\\Administrator\\mc") --quiet, -q disable progress bar display --no-color disable color theme --json enable JSON lines formatted output --debug enable debug output --insecure disable SSL certificate verification --help, -h show help
(1)删除存储桶“mybucket”上别名“myminio”的自动加密配置。
C:\> mc encrypt clear myminio/mybucket