批次金鑰輪換
新版本:RELEASE.2023-04-07T05-28-58Z
MinIO 批次框架允許您使用 YAML 格式的作業定義檔案(「批次檔案」)建立、管理、監控和執行作業。批次作業直接在 MinIO 部署上執行,以利用伺服器端處理能力,而不會受到您執行 MinIO 用戶端 的本機的限制。
keyrotate
批次作業類型會循環 MinIO 部署上加密物件的 sse-s3 或 sse-kms 金鑰。
YAML 配置支援篩選器,可透過建立日期、標籤、中繼資料或 kms 金鑰,將金鑰輪換限制為特定的一組物件。您也可以定義重試次數或設定通知端點和權杖。
金鑰輪換批次作業參考
新版本:RELEASE.2023-04-07T05-28-58Z
使用 keyrotate
作業類型建立一個批次作業,該作業會循環加密物件的 sse-s3 或 sse-kms 金鑰。
必要欄位
type
可以是
sse-s3
或sse-kms
。
key
僅適用於
sse-kms
類型。用於解封金鑰保險庫的金鑰。
context
僅適用於
sse-kms
類型。執行動作的上下文。
選用欄位
針對基於標記的篩選器
|
一個以 僅針對比指定時間長度新的物件輪換金鑰。例如, |
|
一個以 僅針對比指定時間長度舊的物件輪換金鑰。 |
|
以 僅針對在此日期之後建立的物件輪換金鑰。 |
|
以 僅針對在此日期之前建立的物件輪換金鑰。 |
|
僅針對具有符合指定的 |
|
僅針對具有符合指定的 |
|
僅針對具有符合指定值的 KMS 金鑰 ID 的物件輪換金鑰。這僅適用於 |
針對通知
|
用於傳送通知事件的預定義端點。 |
|
一個可選的 JSON Web Token (JWT),用於存取 |
關於重試次數
如果作業被中斷,您可以定義最大重試次數。對於每次重試,您還可以定義每次嘗試之間的等待時間。
|
在放棄批次作業之前,嘗試完成作業的次數。 |
|
每次嘗試之間的等待時間。 |
用於 keyrotate
作業類型的 YAML 描述檔範例
使用 mc batch generate
建立基本的 keyrotate
批次作業以供進一步客製化
keyrotate:
apiVersion: v1
bucket: BUCKET
prefix: PREFIX
encryption:
type: sse-s3 # valid values are sse-s3 and sse-kms
key: <new-kms-key> # valid only for sse-kms
context: <new-kms-key-context> # valid only for sse-kms
# optional flags based filtering criteria
# for all objects
flags:
filter:
newerThan: "7d" # match objects newer than this value (e.g. 7d10h31s)
olderThan: "7d" # match objects older than this value (e.g. 7d10h31s)
createdAfter: "date" # match objects created after "date"
createdBefore: "date" # match objects created before "date"
tags:
- key: "name"
value: "pick*" # match objects with tag 'name', with all values starting with 'pick'
metadata:
- key: "content-type"
value: "image/*" # match objects with 'content-type', with all values starting with 'image/'
kmskey: "key-id" # match objects with KMS key-id (applicable only for sse-kms)
notify:
endpoint: "https://notify.endpoint" # notification endpoint to receive job status events
token: "Bearer xxxxx" # optional authentication token for the notification endpoint
retry:
attempts: 10 # number of retries for the job before giving up
delay: "500ms" # least amount of delay between each retry