feat: Implement audit logging and rate limiting middleware with SurrealDB integration
- Added audit logging middleware to track admin actions and save logs to SurrealDB. - Introduced rate limiting middleware for public endpoints and authentication endpoints. - Enhanced security headers middleware with nonce generation for CSP in development. - Created utility functions for extracting real client IP addresses from headers. - Updated Cargo.toml and Cargo.lock to include new dependencies. - Added new schemas for audit logs and rate limiting in the entities module. - Refactored permissions middleware to support new permission checks.
This commit is contained in:
@@ -6,6 +6,7 @@ edition = "2024"
|
||||
[dependencies]
|
||||
axum.workspace = true
|
||||
serde.workspace = true
|
||||
serde_json.workspace = true
|
||||
utoipa.workspace = true
|
||||
surrealdb.workspace = true
|
||||
anyhow.workspace = true
|
||||
@@ -13,3 +14,4 @@ thiserror.workspace = true
|
||||
uuid.workspace = true
|
||||
strum.workspace = true
|
||||
strum_macros.workspace = true
|
||||
chrono.workspace = true
|
||||
|
||||
Reference in New Issue
Block a user