Skip to main content

kx-auth-core

The lean, deliberately fastmcp-free auth core shared by the KX MCP composition container (kx-mcp-core), the backend bundles, and the client-side kx auth CLI (kx-auth-cli). It holds the auth mechanisms so every consumer binds to one implementation:

  • Inbound config + verification — AuthSettings (the KX_MCP_AUTH* contract) and a joserfc verify_token returning a categorised verdict (ok / error / auth_required / denied). joserfc is the same JOSE library FastMCP's JWTVerifier uses, so server and CLI verification cannot drift.
  • Outbound identity — exchange(config, subject_token) over the register_outbound_strategy registry (passthrough / rfc_8693 / service_account / custom), with the OutboundConfig / OutboundCredential shapes. Pure token→credential; no fastmcp.
  • Authorization contract — AuthzRequest / AuthzDecision (boolean-first, with an obligations slot for scope-down), the AuthzAdapter protocol, and the register_authz_adapter / decide registry behind the container's @authorize seam.
  • Identity assertion projection — project_principal / project_from_claims, the fastmcp-free (and pykx-free) claims→dict projection the kdb-x identity-assertion path ferries to q.

Who should depend on it

Backend bundles (for exchange and the authz contract) and client-side tooling (the kx auth CLI). If you are assembling a server, depend on kx-mcp-core instead — it re-exports these seams. Two invariants to respect when contributing: this package never imports fastmcp (it ships where the agent/client runs), and verify_token must stay in agreement with the container's JWTVerifier (pinned by contract tests in the parent repo).

Documentation

Full reference in the kx-mcp-server-container repository: the auth guide (inbound modes, outbound strategies, authorization) and the design specs (token-exchange, identity-assertion, authorization). All workspace packages version in lockstep from release tags.

Metadata

Release files for kx-auth-core 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for kx-auth-core 0.5.0
File Interpreter ABI Platform
kx_auth_core-0.5.0-py3-none-any.whl Python 3 none any Details

Release files / kx_auth_core-0.5.0-py3-none-any.whl

Download URL kx_auth_core-0.5.0-py3-none-any.whl
Size 21.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
26cbd10edecf7b8cd0c92edd133fe377b881cd49eedd7b1895d5651566d16bbc
BLAKE2b-256 checksum
How to use checksums
5bac89bf0fa3d6bec00dc3d63b34108b1abed3a854e42a694034602a26710466
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.21 {"installer":{"name":"uv","version":"0.12.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

0.5.0 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page