- pm-auth::password: Argon2id (m=65536,t=3,p=1) hashing + verification - pm-auth::jwt: EdDSA/Ed25519 JWT issuance + validation (15-min TTL) - pm-auth::refresh: Opaque 256-bit refresh tokens, SHA-256 hashed, 1-hour sliding inactivity timeout, rotation on use, revocable - pm-auth::mfa_totp: TOTP setup/verify (HMAC-SHA1, 6-digit, 30s) with otpauth:// URI generation (Google Authenticator compatible) - pm-auth::mfa_webauthn: Stub (full implementation deferred) - pm-auth::rbac: Axum middleware for JWT auth + IP whitelist + admin/operator role enforcement + FromRequestParts extractor - pm-auth::session: Full login flow (password → MFA → tokens), token refresh, logout, force-logout - pm-web auth routes: POST /api/v1/auth/login|refresh|logout, GET /api/v1/auth/mfa/setup, POST /api/v1/auth/mfa/verify - IP whitelist middleware on all protected connection points - migrations/002_seed_admin.sql: Default admin account seed - Frontend: Auth store (Zustand with persistence), login page with MFA prompt, MFA setup page (stepper), JWT auto-refresh interceptor, route guards (RequireAuth), updated App.tsx routing - cargo check --workspace: zero errors, 1 minor warning Closes M2.
75 lines
1.8 KiB
TOML
75 lines
1.8 KiB
TOML
[workspace]
|
|
resolver = "2"
|
|
members = [
|
|
"crates/pm-web",
|
|
"crates/pm-worker",
|
|
"crates/pm-core",
|
|
"crates/pm-agent-client",
|
|
"crates/pm-auth",
|
|
"crates/pm-ca",
|
|
"crates/pm-reports",
|
|
]
|
|
|
|
[workspace.package]
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
authors = ["Echo <echo@moon-dragon.us>"]
|
|
license = "MIT"
|
|
|
|
[workspace.dependencies]
|
|
# Async runtime
|
|
tokio = { version = "1", features = ["full"] }
|
|
|
|
# Web framework
|
|
axum = { version = "0.8", features = ["ws", "macros"] }
|
|
axum-extra = { version = "0.10", features = ["typed-header"] }
|
|
tower = { version = "0.5" }
|
|
tower-http = { version = "0.6", features = ["fs", "trace", "cors", "request-id"] }
|
|
|
|
# Database
|
|
sqlx = { version = "0.8", features = ["runtime-tokio-rustls", "postgres", "macros", "migrate", "uuid", "chrono", "json"] }
|
|
|
|
# Serialization
|
|
serde = { version = "1", features = ["derive"] }
|
|
serde_json = { version = "1" }
|
|
toml = { version = "0.8" }
|
|
|
|
# Error handling
|
|
thiserror = { version = "2" }
|
|
anyhow = { version = "1" }
|
|
|
|
# Logging / Tracing
|
|
tracing = { version = "0.1" }
|
|
tracing-subscriber = { version = "0.3", features = ["env-filter", "json"] }
|
|
|
|
# UUID / ULID
|
|
uuid = { version = "1", features = ["v4", "serde"] }
|
|
ulid = { version = "1", features = ["serde"] }
|
|
|
|
# Time
|
|
chrono = { version = "0.4", features = ["serde"] }
|
|
|
|
# HTTP client
|
|
reqwest = { version = "0.12", features = ["rustls-tls", "json"] }
|
|
|
|
# TLS
|
|
rustls = { version = "0.23" }
|
|
|
|
# Config
|
|
config = { version = "0.15" }
|
|
|
|
# Misc
|
|
bytes = { version = "1" }
|
|
futures = { version = "0.3" }
|
|
|
|
# Authentication & Security
|
|
argon2 = { version = "0.5", features = ["std"] }
|
|
jsonwebtoken = { version = "9" }
|
|
rand = { version = "0.8", features = ["std"] }
|
|
totp-rs = { version = "5", features = ["gen_secret", "otpauth"] }
|
|
base64 = { version = "0.22" }
|
|
hex = { version = "0.4" }
|
|
sha2 = { version = "0.10" }
|
|
ipnet = { version = "2" }
|
|
url = { version = "2" }
|