Encrypt Object Storage with the CLI
Use ZCP CLI v1.3.0 and an existing object-storage instance in YUL or YOW. This three-part tutorial creates a private test bucket, verifies SSE-S3 and service-managed SSE-KMS, then cleans up. Existing buckets also support encryption. Changing defaults leaves existing objects unchanged. There are no encryption controls in the portal UI.
1. Prepare Credentials
Section titled “1. Prepare Credentials”Install and authenticate the CLI using your account profile. Also install the AWS CLI for metadata checks. Run the following in a private Bash session without terminal recording or debug logging:
set +xunset ZCP_DEBUGzcp versionzcp project listexport ZCP_REGION=os-yul # Use os-yow for Ottawa.read -r -p 'Project slug: ' ZCP_PROJECTexport ZCP_PROJECTzcp object-storage listread -r -p 'Existing storage slug: ' storagezcp object-storage keys list "$storage"The account bearer token authorizes control-plane requests. A separate S3 access-key/secret-key pair authorizes object requests. An SSE-KMS key ID selects a service-managed encryption key.
Before creating anything, obtain the approved regional service-managed KMS key ID from ZSoftly support. It is not your S3 access key or secret, and this tutorial does not create or import encryption keys. If you cannot obtain the key ID, stop here: do not create the additional S3 key or the test bucket.
read -r -p 'Approved service-managed KMS key ID: ' kms_key_id2. Create One Additional S3 Key
Section titled “2. Create One Additional S3 Key”Each store allows at most two active keys. Continue only if one slot is free. Never revoke an existing application key to make room. The new secret is visible for five minutes only.
zcp object-storage keys create "$storage"read -r -p 'New key ID (for cleanup): ' temporary_key_idread -r -s -p 'New S3 access key: ' ZCP_S3_ACCESS_KEYprintf '\n'read -r -s -p 'New S3 secret key: ' ZCP_S3_SECRET_KEYprintf '\n'export ZCP_S3_ACCESS_KEY ZCP_S3_SECRET_KEYexport AWS_ACCESS_KEY_ID="$ZCP_S3_ACCESS_KEY"export AWS_SECRET_ACCESS_KEY="$ZCP_S3_SECRET_KEY"export AWS_DEFAULT_REGION="$ZCP_REGION"unset AWS_SESSION_TOKEN AWS_SECURITY_TOKENEnter the new values without saving them in history or files. Keep this session open. The CLI checks store/key metadata. Direct S3 uses endpoint credentials and a literal bucket name, regardless of bucket origin. See Access Keys for rotation.
Continue to Create the Bucket and Set Encryption Defaults.