P3: Bucket Policy implementation complete
Some checks failed
Test / build (push) Has been cancelled
Test / test (push) Has been cancelled

- BucketPolicy struct with Version + Statement array
- PolicyStatement: Effect, Principal, Action, Resource, Condition
- Principal matching (wildcard + user-specific)
- Action/Resource pattern matching with wildcards
- GetBucketPolicy: GET /s3/policy/:bucket
- PutBucketPolicy: PUT /s3/policy/:bucket
- DeleteBucketPolicy: DELETE /s3/policy/:bucket
- Policy persistence to data/s3_policies/:bucket/policy.json
- check_bucket_policy() for authorization
- 6 unit tests

Tests: 299 passed, 0 failed
This commit is contained in:
Warren
2026-06-21 22:50:53 +08:00
parent ca0f541a79
commit 02d98419e1
4 changed files with 346 additions and 0 deletions

View File

@@ -16,6 +16,7 @@ pub mod rsync;
pub mod s3;
pub mod s3_auth;
pub mod s3_config;
pub mod s3_policy;
pub mod s3_xml;
pub mod scan;
pub mod server;