Files
inbuxa-server/crates/jmap/Cargo.toml
jcoffey-dev 85d49280f1
ci / fork-checks (pull_request) Skipped
ci / build (pull_request) Skipped
github/ci (branch) GitHub Actions
ci / github (pull_request) Successful in 11m6s
Passkeys: device flow, settings and off switches (#334)
Last server part of passkeys (docs/spec/features/passkeys.md, PK-3,
PK-5, PK-9, PK-12, PK-13, PK-18).

The device flow (/device) takes a passkey like the authorization-code
flow: the login request's authDevice carries the assertion in place of
the name and password, and the page offers the button and autofill there
too once the device code is filled in.

New settings on x:Authentication: passkeysAllowed (default on),
passkeyRpId (null: the host of the public URL) and maxPasskeys (default
10, 1 to 100). x:Domain and x:Tenant get passkeysAllowed (default on)
as off switches: passkeys work for an account only when the server, its
tenant and its domain all allow them. An account whose domain, or the
server, signs in against an external directory gets none (PK-13). Off
for an account, adding one is forbidden and signing in with one fails;
off server-wide, POST /api/auth/passkey answers 404 and the login page
doesn't offer passkeys. A new or changed passkeyRpId must be the host of
the public URL or a parent of it, never a public suffix; otherwise
invalidProperties names it. The settings are on the Authentication,
domain and tenant forms of the served schema.

Stored formats: x:Authentication version 1, x:Domain version 3 and
x:Tenant version 2, with the new fields after every existing one;
records stored before read back with passkeys allowed and the limit at
10.

A passkey counter that didn't go up now raises auth.passkey-counter
(id 664, warn); failed passkey sign-ins carry type passkey.

Test: registry tests for the stored versions; unit tests for the
relying-party id check; the passkeys system test now signs in through
the device flow, hits maxPasskeys, the domain off switch (refused, then
working again), the server-wide switch (no challenge), and refused and
accepted passkeyRpId values.
2026-11-18 20:45:45 -07:00

60 lines
1.8 KiB
TOML

[package]
name = "jmap"
version.workspace = true
edition = "2024"
[dependencies]
store = { path = "../store" }
nlp = { path = "../nlp" }
http_proto = { path = "../http-proto" }
jmap_proto = { path = "../jmap-proto" }
types = { path = "../types" }
smtp = { path = "../smtp" }
utils = { path = "../utils" }
common = { path = "../common" }
services = { path = "../services" }
directory = { path = "../directory" }
trc = { path = "../trc" }
spam-filter = { path = "../spam-filter" }
email = { path = "../email" }
groupware = { path = "../groupware" }
registry = { path = "../registry" }
inbuxa-features = { path = "../features" }
inbuxa-relay-proto = { path = "../relay-proto" }
calcard = { version = "0.3" }
smtp-proto = { version = "0.2" }
mail-parser = { version = "0.11", features = ["full_encoding", "rkyv"] }
mail-builder = { version = "1.0" }
mail-auth = { version = "0.13", features = ["generate", "arc"] }
sieve-rs = { version = "0.7", features = ["rkyv"] }
jmap-tools = { version = "0.1", features = ["rkyv"] }
serde = { version = "1.0", features = ["derive"]}
serde_json = "1.0"
hyper = { version = "1.11.1", features = ["server", "http1", "http2"] }
hyper-util = { version = "0.1.20", features = ["tokio"] }
http-body-util = "0.1.5"
tokio = { version = "1.53", features = ["rt", "sync"] }
futures-util = "0.3.34"
async-stream = "0.3.6"
base64 = "0.23"
p256 = { version = "0.13", features = ["ecdh"] }
sha1 = "0.11"
sha2 = "0.11"
zip = "8.6" # inbuxa: legal hold exports (LH-12)
reqwest = { version = "0.13", default-features = false, features = ["rustls", "http2"]}
tokio-tungstenite = "0.30"
tungstenite = "0.30"
chrono = "0.4"
rand = "0.10.2"
psl = "2" # inbuxa: passkeys, the relying-party id check
rkyv = { version = "0.8.18", features = ["little_endian"] }
hashify = "0.2"
[features]
test_mode = []
dev_mode = []
enterprise = []
[lints]
workspace = true