Crates.io | rustfs-policy |
lib.rs | rustfs-policy |
version | 0.0.3 |
created_at | 2025-07-05 00:13:29.449946+00 |
updated_at | 2025-07-05 00:13:29.449946+00 |
description | Policy management for RustFS, providing a framework for defining and enforcing policies across the system. |
homepage | https://rustfs.com |
repository | https://github.com/rustfs/rustfs |
max_upload_size | |
id | 1738651 |
size | 278,608 |
Advanced policy-based access control engine for RustFS distributed object storage
π Documentation
Β· π Bug Reports
Β· π¬ Discussions
RustFS Policy Engine is a sophisticated access control system for the RustFS distributed object storage platform. It provides fine-grained, attribute-based access control (ABAC) with support for complex policy expressions, dynamic evaluation, and AWS IAM-compatible policy syntax.
Note: This is a core submodule of RustFS that provides essential access control and authorization capabilities for the distributed object storage system. For the complete RustFS experience, please visit the main RustFS repository.
Policy Engine Architecture:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Policy API Layer β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Policy Parser β Policy Validator β Policy Store β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Policy Evaluation Engine β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Condition Functions β Principal Resolver β Resource Mgr β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Authentication Integration β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Policy Decision Flow:
βββββββββββββββ βββββββββββββββ βββββββββββββββ
β Request βββββΆβ Policy βββββΆβ Decision β
β (Subject, β β Evaluation β β (Allow/ β
β Action, β β Engine β β Deny/ β
β Resource) β β β β Not Found) β
βββββββββββββββ βββββββββββββββ βββββββββββββββ
β β β
βΌ βΌ βΌ
βββββββββββββββ βββββββββββββββ βββββββββββββββ
β Context β β Condition β β Audit β
β Information β β Functions β β Log β
βββββββββββββββ βββββββββββββββ βββββββββββββββ
Add this to your Cargo.toml
:
[dependencies]
rustfs-policy = "0.0.3"
The Policy Engine integrates seamlessly with other RustFS components:
Policy Parse Errors:
Policy Evaluation Failures:
Performance Issues:
# Validate policy syntax
rustfs-cli policy validate --file policy.json
# Test policy evaluation
rustfs-cli policy test --policy policy.json --user john --action s3:GetObject --resource arn:aws:s3:::bucket/key
# Show policy evaluation trace
rustfs-cli policy trace --policy policy.json --user john --action s3:GetObject --resource arn:aws:s3:::bucket/key
This module is part of the RustFS ecosystem:
For comprehensive documentation, visit:
We welcome contributions! Please see our Contributing Guide for details on:
# Clone the repository
git clone https://github.com/rustfs/rustfs.git
cd rustfs
# Navigate to Policy module
cd crates/policy
# Install dependencies
cargo build
# Run tests
cargo test
# Run policy validation tests
cargo test policy_validation
# Format code
cargo fmt
# Run linter
cargo clippy
This module is maintained by the RustFS security team and community contributors. Special thanks to all who have contributed to making RustFS access control robust and flexible.
Licensed under the Apache License, Version 2.0. See LICENSE for details.
Copyright 2024 RustFS Team
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
RustFS is a trademark of RustFS, Inc.
All other trademarks are the property of their respective owners.
Made with π‘οΈ by the RustFS Security Team