Repository navigation
Released commit: b082846d71d5aaa4c01d58c354e454e81c680b3d
Versioning: This entry contains breaking changes. The project is pre-1.0 (
0.x); per SemVer, breaking changes on the0.xline ship in the next minor (targeting0.5.0), not a major bump.RELEASE_POLICY.md's "major bump for breaking changes" rule takes effect once the project reaches1.0.0.
Added
AuthplaneClient.resource(...),authplane_auth()andauthplane_mcp_auth()acceptresource_metadata_url=, the RFC 9728 §5.1 URL to advertise when the PRM document is AS-hosted; read it back withAuthplaneResource.resource_metadata_url(), which falls back toprm_url().AuthplaneClient.resource(...)logs at INFO when arevocation_checkeris configured with the fail-open default, so the posture shows in startup output.read_dpop_header_from_scope,raw_request_path_from_scopeandget_or_create_verify_cache_from_scopeare exported from the package root: raw-ASGI counterparts of the adapter helpers, for middleware that cannot run under Starlette'sBaseHTTPMiddlewarewith long-livedtext/event-streambodies.validate_prm_resource_identifier,validate_issuer_identifierandvalidate_resource_metadata_urlare exported from the package root, so configuration can be checked before construction without importingauthplane.internal.www_authenticate_challenges(error, *, schemes=None, algs=(), ...)returns oneWWW-Authenticatevalue per scheme, so a resource can advertise bothBearerandDPoP(RFC 9449 §7.1) withalgs.AccessDeniedError(403) andInvalidTargetError(400, RFC 8707 §2.2) for the token-exchange answers authserver 0.2.0 gives; neither counts toward the circuit breaker.AuthplaneClient.resource(...)warns whenIntrospectionRevocationis configured on a client created withoutauth=: authserver ≥ 0.1.2 answersactive: falseto unauthenticated introspection, so every token would be rejected.AuthplaneResourcewarns once per resource when introspection answersactive: falsefor a locally valid token, naming the runtime-client requirement.
Deprecated
VerifiedClaims.may_act— now emitsDeprecationWarning; authserver 0.2.0 no longer issuesmay_act; removed in the next minor.
Security
www_authenticate()no longer copies the exception message intoerror_description; it sends a fixed sentence per RFC 6750 error code. Passverbose_description=Truetowww_authenticate()/response_headers_for()to restore the message in development.
Fixed
- AS metadata is re-read on the verify path, so
metadata_refresh_secondsnow applies to verify-only deployments and a rotatedjwks_uriis followed. The re-read happens after header checks, so malformed tokens trigger no network I/O. jwks_uriis resolved from metadata on every key-set fetch, so a rotation takes effect on the next fetch even without a newkid. Impact: keys left out of the new location stop verifying once the rotation is observed.- A failed JWKS or metadata refresh backs off for
max(1, min(30, refresh_seconds))seconds instead of retrying on the next read. Impact: a blip at a newly rotatedjwks_urican reject the new key for up to that window. - A fetched AS metadata document is validated before it is cached; one that fails the issuer check or names a bad endpoint is discarded and the previous one keeps serving.
InvalidResourceError/InvalidIssuerErrormessages echo only the components the input actually has (still userinfo-redacted), instead of a fixed template that invented the missing parts.authplane-fastmcp,authplane-mcp:authplane_auth(...)/authplane_mcp_auth(...)close the client they created when configuration fails before returning.authplane-fastmcp,authplane-mcp: the path used to build the DPoPhtudrops the query, matching RFC 9449 §4.2. No verification behaviour changes.
Changed
- Docs: introspection now leads with the fail-open consequence and the confidential / runtime-client requirement; token exchange explains
access_deniedvsconsent_required,invalid_targetand the exchange allowlist; the README states authserver compatibility. scripts/manual-e2e-setup.shno longer setsAUTHPLANE_CLIENT_CREDENTIALS_ENABLEDand acceptsAUTHSERVER_REF;scripts/manual-e2e-smoke.shno longer callsPOST /admin/scopes, which authserver 0.2.0 does not serve.- BREAKING (pre-1.0)
ASCredentialsraisesValueErrorwhenclient_idorclient_secretis empty. Migration: pass the real secret, or omitASCredentials. - BREAKING (pre-1.0) A resource identifier must be an absolute URL with a scheme and host, with no userinfo, whitespace or control characters,
"or\in the host, or malformed port; anything else raisesInvalidResourceErrorat construction. Migration: configure the full URL clients use, e.g.https://api.example.com/mcp. - BREAKING (pre-1.0) An issuer must be an absolute URL with a scheme and host, with no userinfo, whitespace or control characters;
AuthplaneClient.create(...),build_metadata_url(...)andbuild_prm(...)raiseInvalidIssuerErrorotherwise. Migration: fix the configured issuer. - BREAKING (pre-1.0)
build_prm(...)applies the same resource-identifier gate asAuthplaneResource. Migration: pass the identifier you configure onAuthplaneClient.resource(...). - Construction-gate messages say
resource identifierinstead ofresource indicator. Code matching on the old text must be updated. - BREAKING (pre-1.0) The
on_changeargument ofDocumentCache/MetadataCacheand theDocumentChangeCallbackalias are removed fromauthplane.internal. Migration: none expected; passingon_change=is now aTypeError.