PutObjectRetention: policy conditions read the request header, the handler applies the request body
概要
Summary
For a standalone PutObjectRetention request, the policy engine evaluates s3:object-lock-retain-until-date and s3:object-lock-mode from the x-amz-object-lock-* request headers. The handler then applies the mode and date from the XML request body. Nothing compares the two. A princ...
影響パッケージ
| 種類 | パッケージ | 影響を受ける版 | 直った版 |
|---|---|---|---|
| rust | rustfs |
<= 1.0.1 |
1.0.2 |
原文の説明 取得元が公開している説明をそのまま載せています (多くは英語)。
Summary
For a standalone PutObjectRetention request, the policy engine evaluates s3:object-lock-retain-until-date and s3:object-lock-mode from the x-amz-object-lock-* request headers. The handler then applies the mode and date from the XML request body. Nothing compares the two. A principal whose policy allows s3:PutObjectRetention only under a date condition can send a header that satisfies the condition and a body that does not, and the handler applies the body. In COMPLIANCE mode nobody can shorten or remove the resulting lock before the chosen date, the operator included.
Details
Line numbers below are from tag 1.0.0, where we measured it. Tag 1.0.1 and main at db2abcf0, checked on 2026-10-07, have the same logic at shifted lines.
rustfs/src/auth.rsfills the object-lock condition keysobject-lock-retain-until-date,object-lock-modeandobject-lock-legal-holdonly from thex-amz-object-lock-*request headers, lines 729-743.authorization_conditionsinrustfs/src/storage/access.rs, line 827, builds the condition map fromreq.headersandreq.uri.query()only. Its merge helpers add list-bucket query values andx-amz-tagging. Nothing adds values from a request body.put_object_retentionin the same file, line 3209, authorizesPutObjectRetentionActionwith those conditions. It never consultsreq.input.retentionfor the policy decision, and then it appliesreq.input.retention.
AWS documents `s3:object-lock-retain-…
出典: GitHub Repository Security Advisories (Game のスタック) GitHub Advisory OSV
参照URL
- GITHUB_REPO_ADVISORY rustfs/rustfs