vaid-spiffe
Mint a VAID over a verified SPIFFE X.509-SVID. SPIFFE answers who is calling - a workload identity rooted in an X.509 chain of trust, typically issued by SPIRE. VAID carries the delegation - scope- and capability-attenuated authority, chained across hops. This package is the bridge between the two.
from vaid_mint import InMemoryAudit, MintService, ReferenceIssuer, VaidSeed, prefix_entry
from vaid_spiffe import SpiffeMint, SvidPresentation
issuer = ReferenceIssuer.ephemeral(1, "vaid.example").assuming_nothing_revoked()
audit = InMemoryAudit()
mint = SpiffeMint(
MintService(issuer, audit),
audit,
trust_bundle=[root_ca_der], # the SPIFFE trust domain's CA cert(s), DER
expected_trust_domain="example.org",
)
seed = VaidSeed(
agent_class="runner", version="1.0.0", tenant_id="acme",
scope_boundary=[prefix_entry("data.acme")], capability_set=["read"],
public_key_der=operating_public_key, # the VAID's OWN Ed25519 key - see "Scope" below
)
result = mint.mint_root_with_svid(seed, SvidPresentation(leaf_der, [], possession), pop)
assert issuer.verify_vaid(result.vaid)
assert result.spiffe_id == "spiffe://example.org/agent/researcher"
Install
pip install vaid-spiffe
Local dev only - from a repo checkout:
pip install -e python/vaid-mint
pip install -e python/vaid-spiffe[test]
How it mints: bind by reference, not by key reuse
An SVID's key is whatever its issuer chose - SPIRE defaults to ECDSA P-256,
and RSA and Ed25519 SVIDs both exist too. VAID's holder-supplied ("BYO-key")
mint path is Ed25519-only, so an ECDSA or RSA SVID's key cannot sit in the
VAID's public_key_der field directly. mint_root_with_svid therefore binds
the two by reference, in this fail-closed order:
- The presented SVID chain is verified against a supplied trust bundle:
RFC 5280 path validation to a trusted root, every certificate within its
validity window, exactly one
spiffe://URI SAN on the leaf, and that SPIFFE ID's trust domain matches the one you configured the mint with. - The caller proves it holds the SVID's private key - a one-time, replay-protected challenge signed in the SVID's own algorithm (ECDSA, RSA, or Ed25519), binding the VAID operating key being registered. A certificate chain alone is not proof of possession: the same bytes that cross a TLS handshake could be observed and replayed by someone who never held the key.
- The caller's separate Ed25519 operating key - the key the VAID
actually operates under - goes through the unmodified
vaid_mintBYO-key proof-of-possession and root-mint path. Nothing about this step is specific to SPIFFE. - The result carries the VAID document (byte-identical to what
MintService.mint_rootwould have produced on its own) plus thespiffe://ID it was bound to, and a second audit event records that binding through the sameAuditSinkthe mint itself writes to.
Every check before step 3 fails closed: a bad SVID or a failed possession proof never reaches the mint, so no PoP nonce is consumed and no VAID is issued.
Scope - read this before relying on it
- SPIFFE → VAID only. This package lets a SPIFFE/SPIRE deployment mint a VAID. The reverse - a SPIFFE-only system accepting a VAID as if it were an SVID - is not built and is not what "bind by reference" means.
- The spiffe:// ID is not inside the signed VAID document. The open VAID
document format (
vaid_mint) has no field for it, and this package does not add one - changing the open spec or the mint's document shape is out of scope for an adapter. The binding is recorded next to the signed VAID (SpiffeMintResult.spiffe_id, and a second audit event), not inside the bytesissuer.verify_vaidchecks. Practically: a verifier that only holds the VAID bytes can confirm the VAID is valid, but cannot itself recover or confirm which SPIFFE identity it was minted for - that requires trusting whoever ran the mint (and its audit trail), not the document alone. Seedocs/SPEC-GAP.mdfor the open-spec change that would close this, and why it is a proposal rather than something this package does unilaterally. - Revocation is the issuing platform's job, not this package's.
vaid_mint's standalone chain verification does not check revocation (vaid#76); SVID revocation (e.g. via SPIRE re-attestation) is likewise outside what a presented certificate chain can tell a standalone verifier. The VAID's short lifetime, not a revocation check, is the outer bound an outside verifier gets for free. - No live SPIRE client. There is no Workload API fetch here - the trust
bundle and the presented SVID chain are both supplied by the caller. Get
them from your own SPIRE agent (or
spiffe.workloadapi) however you already do. - No claim beyond what the tests prove. The test suite covers: a valid
SVID mints and the result verifies under
vaid_mintand carries the correctspiffe://ID; an expired SVID, a chain that does not anchor to the trust bundle, a leaf with zero or more than one URI SAN, and a SPIFFE ID in the wrong trust domain are all refused; and that an ordinarymint_childdelegation from an SVID-rooted VAID still attenuates scope and capabilities exactly as it would from any other root.
Related
Metadata
Release files for vaid-spiffe 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 | Provenance | Actions |
|---|---|---|---|---|
| vaid_spiffe-0.1.0.tar.gz | 16.7 kB | With provenance | Details for vaid_spiffe-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| vaid_spiffe-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for vaid_spiffe-0.1.0-py3-none-any.whl |
Total release size: 32.5 kB
Release files / vaid_spiffe-0.1.0.tar.gz
| Download URL | vaid_spiffe-0.1.0.tar.gz |
|---|---|
| Size | 16.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6be796b01d77bc4a163b2d2e0aea2d98624eee2fb8c21e6f0496f153bfb6ad48
|
|
BLAKE2b-256 checksum How to use checksums |
9754d378b73fd852d5c23c23d98be23cb7492f998de0f5e636e736e14f086a4a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.12.15
|
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 29, 2026.
Transparency logRelease files / vaid_spiffe-0.1.0-py3-none-any.whl
| Download URL | vaid_spiffe-0.1.0-py3-none-any.whl |
|---|---|
| Size | 15.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
139de0c5f7ce7a7027ceb6e869434a8a7ed3506d8fa1af96fb740f7af169f04f
|
|
BLAKE2b-256 checksum How to use checksums |
bd2d8efb8c5e85fbdeefcfd883f8fa066f8ff76de6c66e472c97f044fe6165a6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.12.15
|
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 29, 2026.
Transparency logSecurity for vaid-spiffe 0.1.0
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for vaid_spiffe-0.1.0.tar.gz
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 29, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.