v0.15, pre-1.0. Read the security posture

Your Authz system shouldn't be allucinated

The compile-time safe auth engine for Rust. Enforce interactive human passkeys, MCP step-up protocols, and tamper-proof canonical digests - without running a sidecar.

cargo add authkestra
play.authkestra.com - Tier 3 MCP Policy
LIVE RECORDING

Give AI agents tools, not secrets

authkestra-mcp puts every MCP tool call behind one of three security tiers.

Context TapAgentCallerToolPublic

Public

Read-only tools anyone can call. Caller identity is attached when present.

DPoPScope CheckTokenOAuth 2.1ToolScoped

Scoped

Needs an OAuth 2.1 token with the right scopes, sender-bound with DPoP or mTLS.

JCSSHA-256FIDO2PasskeyAgentCallExecVerified

Human-approved

A person approves the exact arguments with a passkey before the tool runs.

  • Arguments can’t drift

    Approval is tied to a hash of the exact arguments. Change one value and the call fails.

  • Secrets never reach the model

    API keys and refresh tokens stay in an encrypted server-side vault.

  • Miswiring fails to compile

    A missing store or validator is a build error, not a production panic.

Anatomy of a guarded tool call

Follow one high-stakes tool call from request to execution.

STEP 1 AI Agent CallMCP JSON-RPCSTEP 2 Policy & JCS HashRFC 8785 SHA-256STEP 3 Passkey Step-UpWebAuthn ProofSTEP 4 Scoped Vault TokenSingle-Use Proof
  • 01AI Agent CallMCP JSON-RPC
  • 02Policy & JCS HashRFC 8785 SHA-256
  • 03Passkey Step-UpWebAuthn Proof
  • 04Scoped Vault TokenSingle-Use Proof
Step 1 of 4

Intercept the call

The request is parsed and tied to the caller’s identity.

Step 2 of 4

Canonicalize and check policy

The arguments are hashed (RFC 8785, SHA-256) and Cedar policy decides if the caller may proceed.

Step 3 of 4

Human approves the exact digest

A person approves exactly those arguments with a passkey.

Step 4 of 4

Run with a short-lived token

The server spends the one-time approval and issues a short-lived token. The model never sees the real credential.

Quickstart

Pick a scenario. Each one is a few lines of Rust.

Model Context Protocol tool security

Every MCP tool call goes through a security tier. High-stakes tools need a human passkey approval over the exact arguments.

Read the AI Agent & MCP guide
features: mcp, axum, memory
use authkestra::core::auth::ReproofRequirement;use authkestra::mcp::{McpRouter, McpSecurityTier, ToolDefinition}; let router = McpRouter::builder(pending_store, execution_store)    .tool(ToolDefinition::new(        "execute_transfer",        schema,        McpSecurityTier::human_approved(            ["payments:write"],            ReproofRequirement::new(300).require_step_up(true),            300,        ),        transfer_handler,    ))    .build();

FIDO2 Passkeys with Re-Proof Gating

Passkeys with re-proof: adding a new authenticator means proving an existing one first, so a stolen session can’t take over the account.

Read the Passkeys guide
features: axum, memory, webauthn
use authkestra::core::auth::ReproofRequirement;use authkestra::webauthn::WebAuthnAuthMethod; let passkeys = WebAuthnAuthMethod::new(webauthn, credential_store); // Re-proof enrolment gating prevents session-hijack escalationlet (challenge, enrolment) = passkeys.start_register(    &caller_identity,    &ReproofRequirement::new(300).require_step_up(true),    "alice",)?;

Stateless OAuth2 login

OAuth state and PKCE live in an encrypted cookie, so there is no session database to run.

Read the OAuth2 guide
features: axum, memory, github
use authkestra::Authkestra;use authkestra::axum::{AxumState, AxumStatelessExt};use authkestra::core::OAuth2Flow;use authkestra::providers::github::GithubProvider;use axum::Router;use tower_cookies::CookieManagerLayer; // requires tower-cookies let github = GithubProvider::new(client_id, client_secret, redirect_uri);let engine = Authkestra::builder()    .provider(OAuth2Flow::new(github))    .jwt_secret(&token_secret)    .build(); let app = Router::new()    .merge(engine.axum_router_stateless())    .layer(CookieManagerLayer::new())    .with_state(AxumState::from(engine));

What’s in the box

One engine, built from modules you can mix.

Where it stands

Version 0.15, so APIs can still change before 1.0. Built on audited crates such as ring, webauthn-rs and cedar-policy. A third-party audit is planned before 1.0. Security policy

Is it for you?

Pick it for Rust APIs, web apps and MCP servers that want auth in-process. Pick Keycloak, Zitadel or Ory if you need an admin console, SAML, or workforce SSO. You can also connect them over OIDC.

Frequently Asked Questions

Short answers. The docs have the rest.

How does it keep AI agents from misusing tools?

Every MCP tool sits in one of three tiers: public, scoped to an OAuth 2.1 token, or human-approved with a passkey. Approval covers a hash of the exact arguments, so a changed value fails the call. Third-party credentials stay in a server-side vault.

Should I use this or Keycloak, Ory or Zitadel?

Use Authkestra when you are building in Rust and want auth in-process with no sidecar. Use a standalone IdP if you need an admin console, SAML, or workforce SSO. You can connect the two over OIDC.

How does stateless OAuth work without a session database?

OAuth state and PKCE verifiers live in an AES-256-GCM encrypted cookie. On callback the engine decrypts it in memory, so you can scale out without Redis or SQL for sessions.

Does it work with my framework and database?

Yes. The core has no framework dependency. There are Axum and Actix-web adapters, and stores for memory, Redis, PostgreSQL, MySQL and SQLite. You can implement the store traits for anything else.