Skip to main content

Agent Auth resource-server SDK

Python 3.10+ access-token verification for resource servers. Apache-2.0.

Install a qualified wheel or source distribution into an independent virtual environment:

python -m venv .venv
.venv/bin/python -m pip install /absolute/path/to/agent_auth_rs-1.0.1-py3-none-any.whl

The fixed registry command is python -m pip install agent_auth_rs==1.0.1. See the release guide below for verified registry availability and receipts. The distribution name is agent_auth_rs; the existing Python import remains agent_auth_rs.

from agent_auth_rs import RsSdk, RsSdkConfig, RoutePolicy

sdk = RsSdk(RsSdkConfig(
    issuer="https://auth.example.com",
    resource_id="https://mcp.example.com",
))

def protected_resource(authorization_header):
    result = sdk.authenticate(
        authorization_header,
        RoutePolicy(require_sub_type="user", require_scopes=["read"]),
    )
    if not result.ok:
        return result.status, result.headers, None
    return 200, {}, {"subject": result.token.sub}

Configure the exact issuer and resource identifier of your deployment. The SDK obtains public JWKS and rejects wrong issuer, audience, signature, expiry, subject type and required scopes. It consumes the issued pairwise subject.

verify_dpop_proof is a separate helper: call it for a verified cnf.jkt token with the actual method/URL/access token and maintain a replay cache using the returned jti. authenticate does not automatically enforce DPoP. RAR helpers and route policy evaluators only narrow access. Grant-backed RAR requires authenticated introspection; offline JWT verification cannot promise immediate revocation or cancel an operation already running.

Version 1.x preserves the existing public verification API. Pin versions, run the installed-artifact qualification on upgrades, and review release notes. This package does not obtain, store, refresh or exchange OAuth credentials.

Release and compatibility evidence: RS SDK release guide.

Metadata

Release files for agent-auth-rs 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for agent-auth-rs 1.0.1
File Size Uploaded Provenance
agent_auth_rs-1.0.1.tar.gz 34.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for agent-auth-rs 1.0.1
File Interpreter ABI Platform
agent_auth_rs-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 72.0 kB

Release files / agent_auth_rs-1.0.1.tar.gz

Download URL agent_auth_rs-1.0.1.tar.gz
Size 34.2 kB
Tags Source
SHA-256 checksum
How to use checksums
d19ea020c2168ac6a1f4b3c2bfc37efc60e2de11bf4e8db385dabbcbc28c11df
BLAKE2b-256 checksum
How to use checksums
66cce62eac01d48057dd7805480e9511ae753f106d3077d29105d4cde2c4c283
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / agent_auth_rs-1.0.1-py3-none-any.whl

Download URL agent_auth_rs-1.0.1-py3-none-any.whl
Size 37.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e2e969ad8a62728d91075f650bcb1eb4d282a525bbc2f5f482ea809b3b198848
BLAKE2b-256 checksum
How to use checksums
7bb61454468400470f600a6f404f7cc83fb17d84f08b83f3b5d91b0b41413cd1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Security for agent-auth-rs 1.0.1

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page