ConductorOne Baton adapter for Authority Runtime — plug a baton-github .c1z file into Carryall as an identity-graph backend
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file carryall_baton_backend-0.1.0.tar.gz.
File metadata
- Download URL: carryall_baton_backend-0.1.0.tar.gz
- Upload date:
- Size: 13.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ccbb41771d7a153540feb6ca387774e41e874103ee4a56ec6dfc74e0e39921e7
|
|
| MD5 |
5d9e6dd1a859c5c8599668123b97ef74
|
|
| BLAKE2b-256 |
c02b499323bf7d04352984a0a83bd1adb623382a96fec11bb6880cc13335c063
|
Provenance
The following attestation bundles were made for carryall_baton_backend-0.1.0.tar.gz:
Publisher:
publish.yml on tronmongoose/carryall-baton-backend
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
carryall_baton_backend-0.1.0.tar.gz -
Subject digest:
ccbb41771d7a153540feb6ca387774e41e874103ee4a56ec6dfc74e0e39921e7 - Sigstore transparency entry: 1340606034
- Sigstore integration time:
-
Permalink:
tronmongoose/carryall-baton-backend@88c1349324a4b5d95546b8efc4d4df543f469d1f -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/tronmongoose
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@88c1349324a4b5d95546b8efc4d4df543f469d1f -
Trigger Event:
release
-
Statement type:
File details
Details for the file carryall_baton_backend-0.1.0-py3-none-any.whl.
File metadata
- Download URL: carryall_baton_backend-0.1.0-py3-none-any.whl
- Upload date:
- Size: 11.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
091eaf257895976b67f709177271847ed3b0f0d4fb75660bfca6de53c40e2a21
|
|
| MD5 |
d07c00a2241c1b0a611579199968996c
|
|
| BLAKE2b-256 |
316618d4ff3005c4a63d5475d47d795de98ba3779a663ffae238782f704152ac
|
Provenance
The following attestation bundles were made for carryall_baton_backend-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on tronmongoose/carryall-baton-backend
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
carryall_baton_backend-0.1.0-py3-none-any.whl -
Subject digest:
091eaf257895976b67f709177271847ed3b0f0d4fb75660bfca6de53c40e2a21 - Sigstore transparency entry: 1340606050
- Sigstore integration time:
-
Permalink:
tronmongoose/carryall-baton-backend@88c1349324a4b5d95546b8efc4d4df543f469d1f -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/tronmongoose
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@88c1349324a4b5d95546b8efc4d4df543f469d1f -
Trigger Event:
release
-
Statement type: