aauth-rs
Rust implementation of the AAuth authorization protocol.
This workspace provides the aauth crate with protocol primitives, a client module for signed requests and token exchange, and a server module for token verification and interaction management.
⚠️ WARNING: LLM usage & pre-alpha ⚠️
This library is currently in pre-alpha and can't in any way be described as satisfactory. It's mainly a LLM translation of the Javascript implementation of the aauth draft and a start for us to work from. We currently discourage using this, and won't be accepting contributions because our internal plans will make any external contributions moot, but if you check back in a few weeks, we're hopefully in a more acceptable state.
Workspace layout
aauth-rs/
├── Cargo.toml # workspace root
└── aauth/
├── src/
│ ├── client/ # signed fetch, token exchange, protocol-aware fetch
│ ├── server/ # verify_token, resource tokens, InteractionManager
│ └── … # shared headers, JWT helpers, metadata cache
└── tests/ # protocol integration tests (TypeScript e2e parity)
Features
| Feature | Default | Description |
|---|---|---|
client |
yes | create_signed_fetch, create_aauth_fetch, exchange_token, poll_deferred |
server |
yes | verify_token, create_resource_token, InteractionManager |
Disable defaults to depend on only one side:
= { = "0.1", = false, = ["client"] }
Quick example
use Arc;
use ;
use ;
use KeyMaterial;
async
Key material is injected via KeyMaterialProvider (equivalent to the TypeScript @aauth/local-keys package, which is not included here). For development and tests, use the public aauth::keys module — it provides Ed25519 key generation, JWT minting, and static metadata/key providers.
Examples
# Verify an agent JWT (server only)
# Signed fetch against an in-process mock resource (client + server)
Build all examples in CI:
Spec and reference
- Protocol spec: draft-hardt-oauth-aauth-protocol.md
- Reference implementation:
aauth-dev/packages-js
Out of scope (initial release)
aauth-local-keyscrate (OS keychain, hardware keys, bootstrap CLI)- MCP bridges and CLI tools
- AS federation / four-party
claimsexchange - Production HTTP signature verification middleware for axum/actix
Development