Audit failure in batch job key rotate (#20073)

This commit is contained in:
Allan Roger Reid 2024-07-11 16:13:15 -07:00 committed by GitHub
parent a8c6465f22
commit e139673969
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -389,6 +389,17 @@ func (r *BatchJobKeyRotateV1) Start(ctx context.Context, api ObjectLayer, job Ba
stopFn(result, err)
batchLogIf(ctx, err)
success = false
if attempts >= retryAttempts {
auditOptions := AuditLogOptions{
Event: "KeyRotate",
APIName: "StartBatchJob",
Bucket: result.Bucket,
Object: result.Name,
VersionID: result.VersionID,
Error: err.Error(),
}
auditLogInternal(ctx, auditOptions)
}
} else {
stopFn(result, nil)
}