Skip to content

About

Sender-constrained authorization and proof-of-possession for OAuth, MCP, and agentic systems.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Keylix

Public community repository. This repository is the public development, review, and distribution surface for Keylix. Canonical internal development occurs in the private hackelia-micrantha/keylix repository. Security semantics, public APIs, conformance behavior, and releasable implementation remain inspectable here.

Sender-constrained authorization and proof-of-possession primitives for OAuth, DPoP, MCP, and agentic workloads.

Keylix is a security-focused Rust project for building and verifying cryptographic sender constraints. Its first target is OAuth 2.0 Demonstrating Proof of Possession (DPoP), RFC 9449, with MCP integration kept as a thin adapter over a protocol-independent core.

Status: the v0.1 implementation and conformance baseline is complete, but Keylix remains pre-release. APIs and security properties are not yet stable. Do not use Keylix to protect production credentials until a tagged release explicitly states otherwise.

Current public source surface

The protected publication path now commits the reviewed public Nix flake, the packaged keylix-verifier reference host, and the public client contract/design documentation in this repository. These are available for source review, reproducible development, and pre-release qualification from the committed public tree.

That does not make main a supported release. Supported downstream use must bind to an immutable public release tag/revision or release artifact that explicitly establishes support.

Why Keylix?

Bearer credentials can be replayed by anyone who obtains them. DPoP binds OAuth tokens to a key pair and requires a fresh signed proof when the token is used, reducing the value of a stolen token without the corresponding private key.

The name combines key with calyx, the protective botanical structure surrounding a flower bud: cryptographic key binding as a protective boundary around authorization.

Design

Security behavior is specified before implementation:

The accepted v0.1 design includes ES256/P-256 only, explicit effective-request-target trust, two-stage DPoP/OAuth sender binding, atomic replay state, AS/RS nonce support, a capability-based signer API, aws-lc-rs as the default native crypto backend, and safe telemetry/evidence boundaries.

Scope

Keylix provides or defines:

  • RFC 9449 DPoP proof generation and strict verification
  • JWK handling and RFC 7638 thumbprints
  • access-token ath verification and trusted OAuth key-binding composition
  • nonce handling and replay protection interfaces and reference stores
  • trusted HTTP request-target/proxy adapters
  • OAuth client and resource-server integration points
  • an experimental MCP HTTP adapter for the current SEP-1932 draft profile
  • a packaged keylix-verifier reference host for bounded local verification over a hardened Unix-socket boundary
  • bounded operational telemetry and explicit sender-binding security evidence
  • conformance vectors, property tests, fuzzing, and adversarial test cases

Keylix does not treat proof-of-possession as authentication or authorization by itself. Policy, identity, token validity, scopes, audience restrictions, TLS, and other authorization controls remain separate concerns.

Architecture

keylix-mcp ------> keylix-oauth ------> keylix-dpop ------> keylix-core
                       ^                   ^
                       |                   |
keylix-observe --------+        keylix-http+

keylix-conformance --> black-box/public protocol behavior across the stack

Arrows point toward dependencies. keylix-observe also uses selected protocol-independent types from keylix-core.

Dependency direction is intentional:

  • keylix-core owns public JWK/thumbprint primitives, shared value types, and signing capability abstractions.
  • keylix-dpop owns RFC 9449 proof construction/verification and produces VerifiedDpopProof.
  • keylix-oauth composes that proof with trusted validation of the exact presented token and produces VerifiedSenderBinding.
  • keylix-http reconstructs trusted effective HTTP targets without moving proxy trust into the DPoP core.
  • keylix-mcp adapts the OAuth/DPoP boundary to MCP HTTP transports and remains experimental while SEP-1932 is unstable.
  • keylix-observe exposes bounded telemetry values and explicit sender-binding evidence without introducing a logging stack.
  • keylix-conformance exercises externally observable standards behavior independently of implementation internals.

Security principles

  • Fail closed. Malformed, ambiguous, stale, replayed, downgraded, or unverifiable input is rejected.
  • No custom cryptography. Use reviewed cryptographic primitives and explicit algorithm/key policy.
  • Protocol correctness over convenience. RFC validation rules belong in typed APIs and KX-* requirement tests.
  • Keep private keys opaque. Signing capability is primary; extraction is not required.
  • Treat replay state as a security boundary. Replay prevention has explicit atomicity/topology semantics.
  • No silent downgrade. DPoP-required flows do not fall back to Bearer automatically.
  • Separate proof from token validity. DPoP proof verification and trusted OAuth validation compose only at the VerifiedSenderBinding boundary.
  • Safe observability. Credentials/proofs/nonces/raw identifiers stay out of ordinary logs and metric labels.
  • Keep MCP optional. Sender-constrained OAuth is independently useful beyond MCP.
  • Defense in depth. DPoP complements TLS and authorization policy; it does not replace them.

Roadmap

The v0.1 implementation baseline now includes:

  • design, threat model, ADRs, integrations, and requirement traceability
  • P-256 JWK validation and RFC 7638 thumbprints
  • RFC 9449 proof construction and strict verification
  • nonce and atomic replay reference state
  • OAuth sender-binding composition and client integration
  • trusted HTTP request-target/proxy adaptation
  • RFC/adversarial/property/fuzz conformance and safe evidence boundaries
  • experimental Rust MCP SEP-1932 draft adapter

Next-stage work is API stabilization, release/security gates, interoperability and external review, tracking MCP profile evolution, and only then evaluating additional sender-constraint mechanisms.

Implementation PRs should reference affected IDs in docs/REQUIREMENTS.md and land corresponding positive and negative/adversarial tests.

Development

Keylix is organized as a Cargo workspace with a committed public Nix flake. The baseline quality gate includes locked dependency resolution, formatting, Clippy, tests, documentation checks, dependency/security auditing, Nix flake checks, and bounded fuzz targets for parser/verifier boundaries.

For the reviewed repository toolchain and verifier package/app surface:

nix develop
nix flake check
nix run .#keylix-verifier -- --help

These commands exercise the committed pre-release source surface; they do not substitute for an immutable supported release tag.

cargo fetch --locked
cargo fmt --all --check
cargo clippy --locked --workspace --all-targets --all-features -- -D warnings
cargo test --locked --workspace --all-features
RUSTDOCFLAGS='-D warnings' cargo doc --locked --workspace --no-deps

Standards

License

Licensed under the Apache License, Version 2.0.

About

Sender-constrained authorization and proof-of-possession for OAuth, MCP, and agentic systems.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages