Agent-side ES256 key enrollment and DPoP proof-of-possession (RFC 9449) for MCP broker authentication.
Project description
dpop-broker-auth
Agent-side ES256 key enrollment and DPoP proof-of-possession (RFC 9449) for MCP broker authentication.
Endpoints are discovered automatically from the broker's discovery document — no hardcoded paths.
Install
pip install dpop-broker-auth
Usage
from broker_auth import BrokerAuthClient
client = BrokerAuthClient(
"https://your-broker.example.com",
"<gateway-token>",
keystore_path="broker_keypair.json",
)
# One-time enrollment (discovers endpoints, generates keypair, registers with broker)
if not client.is_enrolled:
client.enroll()
# All requests include DPoP proof automatically
response = client.make_request(
"POST",
"https://your-broker.example.com/your/endpoint",
json={...},
)
How it works
- On first run,
enroll()discovers registration endpoints from the broker - Generates an ES256 keypair and registers the public key
- Confirms ownership via challenge-response
- Saves the keypair to disk so the agent only enrolls once
make_request()attaches a signed DPoP proof JWT to every request and handles nonce retry
Project details
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 dpop_broker_auth-0.3.0.tar.gz.
File metadata
- Download URL: dpop_broker_auth-0.3.0.tar.gz
- Upload date:
- Size: 6.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5d352d16a692d85d739ee8183d0dbfd08ff72c0282c38c499dedb6b5f51d267f
|
|
| MD5 |
5b2aaf25085c53a8573db350d78d7faa
|
|
| BLAKE2b-256 |
68f12ad0fc26e547e9f78f068d6aa23d1a79626c7f5ddc96231fb4995503486c
|
File details
Details for the file dpop_broker_auth-0.3.0-py3-none-any.whl.
File metadata
- Download URL: dpop_broker_auth-0.3.0-py3-none-any.whl
- Upload date:
- Size: 8.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0a74f4bfa85b6341882613326165b2f70afde3e72daed1e4e9d621cc3d99ea70
|
|
| MD5 |
2358f34264cf75d46cefc5c8e4fa023a
|
|
| BLAKE2b-256 |
ba16e0a99eed74def04b946d0e630a67d3b6ba352618841f9b010c60e423d762
|