carryall-baton-backend
A Carryall backend that reads ConductorOne Baton .c1z files.
Plugs a Baton sync (produced by any baton-* connector — baton-github, baton-okta, baton-snowflake, …) into Authority Runtime as an identity-graph source of truth for Carryall's runtime authorization layer.
| Layer | Who owns it | What it does |
|---|---|---|
| Entitlement graph | ConductorOne Baton | baton-github → sync.c1z (a gzipped SQLite) |
| Adapter (this package) | you | Projects the .c1z into Carryall's Backend Protocol |
| Runtime authorization | Authority Runtime / Carryall | Intent → compiled scopes → signed envelope → enforced action |
Install
pip install carryall-baton-backend
Requires authority-runtime>=0.4.0 (the release that introduced the
Backend Protocol and entry-point-driven backend loading).
Quick start
from carryall_baton import BatonBackend
backend = BatonBackend(
c1z_path="./sync.c1z",
agent_to_principal={"release-agent": "alice"}, # Carryall agent_id → GitHub username
)
Or load it the Carryall-idiomatic way via CARRYALL_SLOS_CONFIG:
{
"backend": "baton",
"init": {
"c1z_path": "./sync.c1z",
"agent_to_principal": { "release-agent": "alice" }
}
}
export CARRYALL_SLOS_CONFIG=./backend.json
carryall shell # or any other CLI subcommand
Under the hood, Authority Runtime's load_backend() resolves the "baton" name via the authority_runtime.backends entry-point group that this package registers.
Producing a .c1z
You need a baton sync to point this backend at. Example for GitHub:
# https://github.com/ConductorOne/baton-github
BATON_TOKEN=<github-pat> baton-github
# produces sync.c1z in the current directory
The adapter works against any .c1z that follows the baton-sdk v1 schema (v1_resources, v1_entitlements, v1_grants).
Access decision model
BatonBackend.check_access(envelope, action, uri) tries three things, in order:
- Envelope scope match. If the envelope's
authority.scopesalready containsvault:{vault}:{action}orvault:{vault}:*, allow. This is the same short-circuitMemoryBackenduses. - Baton grant match. If
agent_to_principalmapsenvelope.agent_idto a baton principal that has a grant matchingactionon the target resource, allow.adminandmaintainentitlements grant any action;writegrants implyread. - Default deny. With a clear
reason+metadataon the returnedPolicyResult.
URI shape
slos://vaults/{org}/{repo}
The slos:// scheme is reused from Authority Runtime's existing convention so the same Carryall tools/tests can target either a SLOS, Memory, or Baton backend without re-plumbing. The {vault} and {resource} are derived from Baton's external_id by splitting on the first / (the baton-github convention).
Override by subclassing BatonBackend and replacing any of the helpers in carryall_baton.mapping.
What v0.1 does not do
- No protobuf decoding. The
.c1z'sdatablobs (containing display names, descriptions, and connector-specific metadata) are untouched; everything the adapter surfaces comes from indexed columns. That means display names fall back toexternal_id. A future version may addprotobufas an optional dependency. - No write path.
write_documentraisesNotImplementedError. Baton syncs are produced by connectors — not written to by agents. - Single-org scope. Grants across multiple orgs work fine, but the convention of "vault = org" assumes one primary org per sync. For multi-org syncs, subclass and override
split_external_id.
Testing & development
The test suite uses a programmatically-generated synthetic .c1z (see tests/conftest.py) — no external dependencies, no live baton sync required. The fixture models a small GitHub-ish organization (3 users, 2 teams, 3 repos, 9 grants) and exercises both the envelope-scope and baton-grant decision paths.
pip install -e ".[dev]"
pytest
License
MIT. See LICENSE.
The upstream authority-runtime library is under BSL 1.1; this adapter is intentionally MIT so that integration work done here is maximally reusable.
Release files for carryall-baton-backend 0.1.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 | |
|---|---|---|---|
| carryall_baton_backend-0.1.0.tar.gz | 13.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| carryall_baton_backend-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 25.1 kB
Release files / carryall_baton_backend-0.1.0.tar.gz
| Download URL | carryall_baton_backend-0.1.0.tar.gz |
|---|---|
| Size | 13.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ccbb41771d7a153540feb6ca387774e41e874103ee4a56ec6dfc74e0e39921e7
|
|
BLAKE2b-256 checksum How to use checksums |
c02b499323bf7d04352984a0a83bd1adb623382a96fec11bb6880cc13335c063
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Apr 19, 2026.
Transparency logRelease files / carryall_baton_backend-0.1.0-py3-none-any.whl
| Download URL | carryall_baton_backend-0.1.0-py3-none-any.whl |
|---|---|
| Size | 11.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
091eaf257895976b67f709177271847ed3b0f0d4fb75660bfca6de53c40e2a21
|
|
BLAKE2b-256 checksum How to use checksums |
316618d4ff3005c4a63d5475d47d795de98ba3779a663ffae238782f704152ac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Apr 19, 2026.
Transparency log