mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-05 12:57:42 +00:00
27 lines
783 B
Markdown
27 lines
783 B
Markdown
# Policy Crate Instructions
|
|
|
|
Applies to `crates/policy/`.
|
|
|
|
## Policy Semantics
|
|
|
|
- Keep action/resource/condition evaluation semantics stable unless compatibility changes are explicitly requested.
|
|
- Avoid introducing permissive fallbacks that may expand access unexpectedly.
|
|
- Any semantic change must include focused regression tests.
|
|
|
|
## Integration Awareness
|
|
|
|
- Validate compatibility with IAM and request-auth call sites:
|
|
- `crates/iam/`
|
|
- `rustfs/src/auth.rs`
|
|
- `rustfs/src/storage/access.rs`
|
|
|
|
## Error and Observability
|
|
|
|
- Prefer explicit, typed errors over implicit fallback behavior.
|
|
- Log policy evaluation diagnostics without exposing sensitive credential content.
|
|
|
|
## Suggested Validation
|
|
|
|
- `cargo test -p rustfs-policy`
|
|
- Full gate before commit: `make pre-commit`
|