authkestra-devsig
Device-bound signature authentication for the authkestra framework: per-request proof of
possession of a device-bound private key, plus an Issuer-attested key binding, so that
verification needs no session store, no token introspection, and no per-request network call.
Proposed in authkestra#137. See the crate
docs (cargo doc -p authkestra-devsig --open) for the full algorithm, the two credentials
(X-Signature and X-Attestation), and why the key-thumbprint binding check is the
security-critical step.
Status
The verification core (verify()) is complete and covered by conformance tests. This crate is
deliberately framework-agnostic (per the workspace AGENTS.md's "Framework Agnostic" rule) —
it does not depend on axum, actix, or any other web framework. Which authkestra-engine trait
(if any) framework integrations should eventually implement against is an open question for the
maintainer — see authkestra#137.
Usage
use ;
let identity = verify.await?;
Framework integration
Framework wiring lives in the adapter crates, not here:
- Axum: enable the
devsigfeature onauthkestra-axumand useauthkestra_axum::devsig::DeviceSignatureLayer(atower::Layer) plus theauthkestra_axum::devsig::AuthDeviceSignatureextractor. Seeauthkestra-axum's README andcrates/authkestra-axum/examples/devsig/. - Actix Web: enable the
devsigfeature onauthkestra-actixand useauthkestra_actix::devsig::DeviceSignatureAuth(anactix_web::dev::Transformmiddleware) plus theauthkestra_actix::devsig::AuthDeviceSignatureextractor. Seeauthkestra-actix's README andcrates/authkestra-actix/examples/devsig/.
Both adapters buffer the request body ahead of their framework's own extraction (needed for the
bdh check) and call this crate's plain [verify] function underneath — see their devsig
module docs for why neither implements an authkestra-engine AuthenticationStrategy<I> today.