feat(auth): deny-by-default HTTP layer
A global middleware wraps the router and its fallback: only PUBLIC_ROUTES answer without a credential, and unknown paths look like protected ones. Adds cookie sessions with per-session CSRF, scoped Bearer tokens, the /api/auth and /api/admin handlers, Transport for client IP and Secure, and pending-token enrollment re-checked inside one store update. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a90ff81650
commit
2b1bc63340
11 files changed
+2455
-79
No files matched your search
@@ -16,11 +16,18 @@ path = "src/main.rs"
|
||||
acaua-core = { path = "../acaua-core" }
|
||||
axum = "0.8"
|
||||
clap = { version = "4", features = ["derive"] }
|
||||
ipnet = "2"
|
||||
mime_guess = "2"
|
||||
rust-embed = "8"
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
serde_json = "1"
|
||||
tokio = { version = "1", features = ["macros", "net", "rt-multi-thread", "signal"] }
|
||||
tower-http = { version = "0.6", features = ["compression-gzip", "cors", "trace"] }
|
||||
tokio = { version = "1", features = ["macros", "net", "rt-multi-thread", "signal", "sync"] }
|
||||
tower-http = { version = "0.6", features = ["compression-gzip", "trace"] }
|
||||
tracing = "0.1"
|
||||
tracing-subscriber = "0.3"
|
||||
|
||||
[dev-dependencies]
|
||||
http-body-util = "0.1"
|
||||
tempfile = "3"
|
||||
totp-rs = { version = "6.0.0", features = ["otpauth"] }
|
||||
tower = { version = "0.5", features = ["util"] }
|
||||
Reference in new issue
Block a user