Batch Key Rotation
在 MinIO 版本加入: RELEASE.2023-04-07T05-28-58Z
MinIO Batch Framework 允许你使用 YAML 格式的作业定义文件(即 “批处理文件”)来创建、管理、监控和执行作业。 批处理作业直接在 MinIO 部署上运行,以利用服务器端的处理能力,而不受运行 MinIO Client 的本地机器的限制。
keyrotate 批处理作业类型用于在 MinIO 部署上循环更替 SSE-S3 或 SSE-KMS 密钥,以便对加密对象进行密钥轮换。
YAML 配置支持过滤器,可以通过创建日期、标签、元数据或 KMS 密钥来限制密钥轮换到特定的一组对象。 你还可以定义重试尝试或设置通知端点和令牌。
键轮换批处理作业参考
在 MinIO 版本加入: RELEASE.2023-04-07T05-28-58Z
使用 keyrotate 作业类型来创建一个批处理作业,该作业将循环更替 SSE-S3 或 SSE-KMS 密钥,以便对加密对象进行密钥轮换。
必填字段
type:
sse-s3o或rsse-kms.
key:仅适用于
sse-kms类型。 用于解封密钥保管库的密钥。
可选字段
对于 基于标志的过滤器
| 
 | 表示时间长度的字符串,格式为  密钥仅对比指定时间长度更新的对象进行轮换。
例如,  | 
| 
 | 表示时间长度的字符串,格式为  密钥仅对于比指定时间长度旧的的对象进行轮换。 | 
| 
 | 格式为 THH:MM:SSZ`` RFC3339 日期和时间。 密钥仅对于在指定日期之后创建的对象进行轮换。 | 
| 
 | 格式为 THH:MM:SSZ`` RFC3339 日期和时间。 密钥仅对于在指定日期之前创建的对象进行轮换。 | 
| 
 | Only for use with the  | 
| 
 | 仅对具有与指定  | 
| 
 | 仅对具有与指定  | 
| 
 | 仅对具有与指定值相匹配的KMS(密钥管理服务)密钥ID的对象进行密钥轮换。
这仅适用于  | 
对于 notifications
| 
 | 用于发送通知事件的预定义端点。 | 
| 
 | 访问  | 
对于 retry attempts
如果任务被打断,您可以定义最大的重试次数。 对于每次重试,您还可以定义每次尝试之间等待的时间。
| 
 | 在放弃之前完成批处理作业的尝试次数。 | 
| 
 | 每次尝试之间等待的时间长度。 | 
keyrotate 作业类型的示例 YAML 描述文件
使用 mc batch generate 创建一个基本的  keyrotate 批处理作业以进行进一步的自定义:
keyrotate:
  apiVersion: v1
  bucket: bucket
  prefix: 
  encryption:
    type: sse-kms # valid values are sse-s3 and sse-kms
    
    # The following encryption values only apply for sse-kms type.
    # For sse-s3 key types, MinIO uses the key provided by the MINIO_KMS_KES_KEY_FILE environment variable.
    # The following two values are ignored if type is set to sse-s3.
    key: my-new-keys2 # valid only for sse-kms
    context: <new-kms-key-context> # valid only for sse-kms
  # optional flags based filtering criteria
  flags:
    filter:
      newerThan: "84h" # match objects newer than this value (e.g. 7d10h31s)
      olderThan: "80h" # match objects older than this value (e.g. 7d10h31s)
      createdAfter: "2023-03-02T15:04:05Z07:00" # match objects created after "date"
      createdBefore: "2023-03-02T15:04:05Z07:00" # 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)
  
  # optional entries to add notifications for the job
  notify:
    endpoint: "https://notify.endpoint" # notification endpoint to receive job status events
    token: "Bearer xxxxx" # optional authentication token for the notification endpoint
  
  # optional entries to add retry attempts if the job is interrupted
  retry:
    attempts: 10 # number of retries for the job before giving up
    delay: "500ms" # least amount of delay between each retry
