批次金鑰輪換
版本新增: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 金鑰。
必要欄位
類型
sse-s3
或sse-kms
。
金鑰
僅適用於
sse-kms
類型。用於解鎖金鑰保存庫的金鑰。
內容
僅適用於
sse-kms
類型。執行動作的內容。
選用欄位
對於基於旗標的篩選器
|
一個字串,表示 金鑰僅針對比指定時間長度更新的物件進行輪換。例如, |
|
一個字串,表示 金鑰僅針對比指定時間長度更舊的物件進行輪換。 |
|
格式為 金鑰僅針對在此日期之後建立的物件進行輪換。 |
|
格式為 金鑰僅針對在此日期之前建立的物件進行輪換。 |
|
金鑰僅針對標籤符合指定的 |
|
金鑰僅針對元數據符合指定的 |
|
金鑰僅針對 KMS 金鑰 ID 符合指定值的物件進行輪換。這僅適用於 |
針對通知
|
用於傳送通知事件的預定義端點。 |
|
用於存取 |
針對重試嘗試
如果任務中斷,您可以定義最大重試嘗試次數。每次重試,您也可以定義每次嘗試之間的等待時間。
|
在放棄之前完成批次作業的嘗試次數。 |
|
每次嘗試之間等待的時間量。 |
用於 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