key-verify-client
Shared central API-key verification client used by ingress services such as
agent-platform and asr-service when central API-key verification is enabled.
Package naming
The three names intentionally differ by responsibility:
- Git repository:
key-verify-client - PyPI project / distribution:
keyverify - Python import package:
keyverify
Do not change [project].name in pyproject.toml to key-verify-client or
key_verify_client. The existing PyPI project is keyverify, and Trusted
Publishing authorizes that project name.
Install from PyPI:
pip install keyverify
Import from Python:
from keyverify import KeyVerifyClient, VerificationResult
Behavior
- Calls
POST /internal/verify-keyover HTTP(S) with a per-deployment service token. - Enforces
CLIENT_SCOPElocally against the authoritativeclientreturned by admin-platform. - Caches successful verification results for
KEY_CACHE_TTL/AUTH_CACHE_TTLseconds. cache_ttl=0disables caching so revocation is immediately visible.fail_open=falserejects when the central service is unreachable and there is no live cache entry.- Plaintext client keys are never used as cache dictionary keys; only SHA-256 digests are retained.
Local development
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
pytest -q
Build and verify release artifacts
Always clean old artifacts first:
rm -rf dist build *.egg-info src/*.egg-info
python -m build
python -m twine check dist/*
python scripts/verify_dist_metadata.py dist
For version 2.0.0, the artifact names must be:
keyverify-2.0.0-py3-none-any.whl
keyverify-2.0.0.tar.gz
The metadata verification command must report:
Name=keyverify Version=2.0.0
Only after those checks pass should CI upload dist/* to PyPI.
Metadata
Release files for keyverify 2.0.2
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 |
|---|---|---|---|---|
| keyverify-2.0.2.tar.gz | 116.0 kB | With provenance | Details for keyverify-2.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| keyverify-2.0.2-py3-none-any.whl | Python 3 | none | any | Details for keyverify-2.0.2-py3-none-any.whl |
Total release size: 120.4 kB
Release files / keyverify-2.0.2.tar.gz
| Download URL | keyverify-2.0.2.tar.gz |
|---|---|
| Size | 116.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8226c9b37ab752bf52f8cebed3906d53e3807b56c1b2ebea6222b7b982b29ab4
|
|
BLAKE2b-256 checksum How to use checksums |
5cce9e01690fc6a19b896f9bd08172c72393cdb780409d0f6abe4889a9756ad2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
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 Jul 24, 2026.
Transparency logRelease files / keyverify-2.0.2-py3-none-any.whl
| Download URL | keyverify-2.0.2-py3-none-any.whl |
|---|---|
| Size | 4.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8ce9b7f02ec4826034f21a184aa89bbabf51143dd09d18bc413215f9a79dfa56
|
|
BLAKE2b-256 checksum How to use checksums |
57b2cc22223f04546681296406af36261dee2c232876611eaca242ad25dcc77a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
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 Jul 24, 2026.
Transparency logSecurity for keyverify 2.0.2
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 keyverify-2.0.2.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 Jul 24, 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.