axm-vault — Credential catalogs, layered resolution and keyring storage
axm-vault separates credential declarations from value resolution and storage. Packages declare their needs; applications resolve values through environment, configuration and keyring layers, with optional prompts and Pydantic binding.
Features
- Value-less catalog — pydantic v2 models (
Sensitivity,CredentialSpec,CredentialGroup) describe credential schema only; defaults and descriptions must contain no real secrets (this is a provider responsibility). - Entry-point discovery —
load_catalog()aggregatesaxm.credentialsgroups contributed by packages (empty-safe, cached). - Layered resolution —
Resolverwalksenv > file > keyring > default > prompt; the file tier is delegated toaxm-config, the keyring tier is consulted only forSECRETspecs. - Typed binding —
bind(model, group)builds a pydantic model from resolved values, wrappingSECRETfields asSecretStrand returning the concrete model type. - Value-free doctor —
doctor_data()/ thevault_doctortool report each credential's{layer, present}provenance without ever returning a secret. - MCP tools —
vault_doctor(provenance),vault_set(keyring/config), andvault_delete(keyring removal) ship asaxm.tools(MCP + CLI + DAG node). - Operator CLI —
axm-vaultexposessetup/get/set/rotate/delete/doctor/path; interactivesetupis TTY-guarded and idempotent,getmasks secrets unless--reveal. - Frozen & strict — immutable models that forbid unknown fields (
frozen=True,extra="forbid").
See the documentation for the full guide, including how to declare your package's credentials.
Installation
Requires Python 3.12 or newer. In a project managed by uv:
uv add axm-vault
Or as a workspace dependency in pyproject.toml:
[project]
dependencies = ["axm-vault"]
[tool.uv.sources]
axm-vault = { workspace = true }
Quick Start
Declare a credential schema and mask a synthetic value without consulting your configuration or keyring:
uv run python - <<'PY'
from axm_vault import CredentialGroup, CredentialSpec, as_secret
group = CredentialGroup(
id="demo",
package="demo-app",
title="Demo service",
specs=(CredentialSpec(name="token", env="DEMO_TOKEN", kind="token"),),
)
print(group.spec("token").env)
print(as_secret("synthetic-example"))
PY
This prints DEMO_TOKEN and **********. The declaration contains no credential
value. Creating a group does not register it with the installed catalog; follow
Declare credentials to contribute a provider.
For actual resolution with isolated stores, use the
synthetic credential tutorial.
Usage
Python API
Use Resolver.resolve(group, name) with an explicit group, or catalog-based
get(group, name) and bind(model, group) after registering a provider.
load_catalog() discovers installed axm.credentials entry points and caches
the catalog. Consumer models used with bind() must accept SecretStr for
SECRET fields.
CLI and AXM tools
uv run axm-vault --help
uv run axm vault_doctor --help
The operator CLI provides setup, get, set, rotate, delete, doctor
and path. Interactive setup requires a TTY; blank input preserves existing
values. Omit the value argument from standalone set or rotate to enter it
through a hidden prompt instead of shell history or process arguments.
The vault_doctor, vault_set and vault_delete tools also support the generic
axm CLI and MCP discovery. vault_set requires a value argument and has no
hidden-input mode. See the CLI reference for parameters.
Security and operational boundaries
Resolver.resolve() and get() return plaintext; bind() wraps SECRET fields in SecretStr when the consumer model accepts that type. Provenance omits resolved values but reads the underlying stores. File resolution applies to all sensitivities, and arbitrary provider/backend errors are not redacted. See the security and I/O boundaries.
The selected keyring backend determines storage protection; SecretStr masks
representations, it does not encrypt data. Deletion removes a keyring slot,
leaving file/environment overrides and the rotation backup intact.
Authentication dependencies are separate from credential provenance:
vault_doctor does not check authentication sessions; axm-doctor consumes
those status descriptors.
Documentation
- Published documentation
- Isolated getting-started tutorial
- Declare package credentials
- Resolver
- Doctor and tools
- Architecture and security boundaries
The README is the repository entry point; docs/index.md is the MkDocs home page.
Development
This package is part of the axm-forge uv workspace.
git clone https://github.com/axm-protocols/axm-forge.git
cd axm-forge
uv sync --all-packages --all-groups
# Run tests for this package
uv run --package axm-vault --directory packages/axm-vault pytest -x -q
# Build this package's documentation
uv run --package axm-vault --directory packages/axm-vault --group docs mkdocs build --strict
License
Licensed under Apache-2.0. See LICENSE.
Metadata
Release files for axm-vault 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| axm_vault-0.2.0.tar.gz | 74.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| axm_vault-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 109.4 kB
Release files / axm_vault-0.2.0.tar.gz
| Download URL | axm_vault-0.2.0.tar.gz |
|---|---|
| Size | 74.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2b657e106030be8e3a6dd876c7c4b55ce4f4187ea8c749c949c080fd623cb720
|
|
BLAKE2b-256 checksum How to use checksums |
4962f9b045cfe102903783cfa793ad8507c43a1c402ce8477e1d4f15b648d8ea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.
Transparency logRelease files / axm_vault-0.2.0-py3-none-any.whl
| Download URL | axm_vault-0.2.0-py3-none-any.whl |
|---|---|
| Size | 35.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d5b50e3fcdb6ce18cfd745136b6eb14fed074fa5e09f6b2c4d3dba1b16db373e
|
|
BLAKE2b-256 checksum How to use checksums |
4f50ac0b3000c929905ec317fc52d7b0434ae6dec22f879f7794fb40de934e01
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.
Transparency log