Spawn Access Control Library
A comprehensive and extensible Access Control Management System written in Rust, supporting WebAssembly for cross-platform compatibility. This library provides advanced features such as role-based access control (RBAC), resource-based permissions, audit logging, session management, rate limiting, and more.
Features
- Role-Based Access Control (RBAC): Assign roles to users and create role hierarchies.
- Permission Management: Grant users permissions on specific resources with condition-based access control.
- Resource-Based Access Control: Manage resources and define which roles have access.
- Audit Logging: Track every access attempt with detailed logs including timestamps and IP addresses.
- Session Management: Handle user sessions with expiration and multi-session support.
- Rate Limiting: Prevent abuse by limiting the number of requests a user can make within a time window.
- Multi-Factor Authentication (MFA): Add an additional layer of security by verifying users through a token system.
- Caching: Improve performance by caching user access permissions.
- WebAssembly Support: Compile to WebAssembly for cross-platform compatibility.
Getting Started
To use this library in your Rust project, add the following to your Cargo.toml
:
[]
= "0.1.10"
Example Usage
- Create a Role-Based Access Control System:
use ;
- Use Permission-Based Access Control:
use ;
- Rate Limiting:
use RateLimiter;
WebAssembly Support
To compile this library to WebAssembly, use the following command: