Expand description
§Citadel User Management System
A comprehensive user and account management system for the Citadel Protocol, handling both network nodes and client accounts within the VPN architecture. This crate provides the foundational user management layer for the entire Citadel Protocol ecosystem.
§Features
-
Account System:
- Network Accounts: Core network identity
- Client Accounts: Per-connection user accounts
-
Backend Support:
- File System Storage: Persistent local storage
- Redis Database: High-performance caching
- SQL Database: Relational data storage
- In-Memory Storage: Fast temporary storage
-
Authentication:
- Secure Credential Management: Password and key handling
- Google Authentication: OAuth and service account support
- Custom Authentication: Extensible provider system
-
External Services:
- Google Services: Cloud service integration
- Firebase RTDB: Real-time data synchronization
- Service Interface: Common communication layer
-
Account Management:
- Account Creation: Secure account initialization
- Credential Updates: Safe password and key rotation
- State Management: Account lifecycle handling
- Account Recovery: Backup and restore features
§Architecture
The system is built on a network-client account structure:
Network Account (NAC)
└── Client Account (CNAC)
├── Connection Metadata
├── Credentials
└── External Services§Security Features
- Zero-trust architecture
- Post-quantum cryptography support
- Secure credential storage
- Safe account recovery
- Encrypted data transmission
§Important Notes
- Multiple ClientAccounts can exist per node
- All operations are safe and secure by default
- File system operations are feature-gated, enabled by default
- External services require appropriate feature flags
§Related Components
citadel_crypt: Cryptographic operations- [
citadel_wire]: Network communication citadel_types: Common type definitions- [
citadel_pqcrypto]: Post-quantum cryptography
§Feature Flags
filesystem: Enable file system storagegoogle-services: Enable Google service integrationredis: Enable Redis database supportsql: Enable SQL database support
Modules§
- account_
loader - This provides methods to load all locally-stored files Account Loading and File Management
- account_
manager - The server in legacy_citadel_proto requires a means of handling the user database. This module contains the means of achieving this
- auth
- For authentication Authentication Mode Management
- backend
- For handling different I/O operations Backend Storage and Persistence Layer
- client_
account - Each client within a VPN has a unique ClientAccount. Multiple CAC’s are possible per node.
- connection_
metadata - Each node must necessarily have a NetworkAccount that is invariant to any ClientAccounts. See the description for client_account below for more information.
- credentials
- Credential Management
- directory_
store - Environmental constants and subroutines for pre-checking the system
- external_
services - For services
- hypernode_
account - The general trait for creating account types
- misc
- For errors Miscellaneous Utilities and Error Handling
- prelude
- Standard imports for this library
- re_
exports - Serde and others
- serialization
- Contains basic subroutines for serialization
- server_
misc_ settings - Server Miscellaneous Settings Management