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
Generated
+11
@@ -9,11 +9,16 @@ dependencies = [
|
||||
"acaua-core",
|
||||
"axum",
|
||||
"clap",
|
||||
"http-body-util",
|
||||
"ipnet",
|
||||
"mime_guess",
|
||||
"rust-embed",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"tempfile",
|
||||
"tokio",
|
||||
"totp-rs",
|
||||
"tower",
|
||||
"tower-http",
|
||||
"tracing",
|
||||
"tracing-subscriber",
|
||||
@@ -1312,6 +1317,12 @@ dependencies = [
|
||||
"generic-array",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ipnet"
|
||||
version = "2.12.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "791930b43c0d5973160d90a8f3894509f2b273430f5c5c73b668636d0287c5c0"
|
||||
|
||||
[[package]]
|
||||
name = "is_terminal_polyfill"
|
||||
version = "1.70.2"
|
||||
|
||||
Reference in new issue
Block a user