Releases: AuthPlane/python-sdk
Releases · AuthPlane/python-sdk
v0.2.0
Released commit: 26c28ed5eec94ac83f853a69ecca137f65d50a0e
Security
www_authenticate()now sanitizes CR, LF, double-quote, and backslash from every value it interpolates (realm,error_description,scope,resource_metadata), closing a header-injection path through attacker-influenced error messages.
Fixed
DPoPNotSupportedErrornow emitsWWW-Authenticate: Bearerinstead ofDPoP. The resource is bearer-only by configuration, so advertising the DPoP scheme misled clients into retries that would fail the same way.http_status(CircuitOpenError)now returns503(was500). The circuit breaker is structurally identical to other temporary-AS-unavailability errors and should be retryable, not surfaced as an internal error.- Outbound
Hostheader now preserves non-default ports and brackets IPv6 hostnames, fixing DPoPhtuvalidation against authservers on non-standard ports. - Packaging issues discovered after the first release.
- Documentation links and demo references.
authplane-fastmcpdependency range now correctly requiresfastmcp>=3.2,<4(was>=2.0, which could resolve to a version the adapter can't import).
Added
www_authenticate()acceptsresource_metadata_url=(RFC 9728 §5.1) andscope=(RFC 6750 §3) keyword arguments. When the caller does not passscope=, the helper auto-populates it fromInsufficientScopeError.required_scopes.InsufficientScopeErrornow carries a structuredrequired_scopesattribute, populated automatically byVerifiedClaims.require_scope()so the wire challenge can advertise the missing scope.response_headers_for(error, *, realm, resource_metadata_url, scope)— bundled helper returning(status, {"WWW-Authenticate": challenge})in one call.- Both adapter verifiers (
authplane-mcp,authplane-fastmcp) now emit alogging.DEBUGeventauthplane.token_verification_failedwith structurederror_classanderrorfields before returningNone. Wire behaviour is unchanged; operators can now distinguish expired tokens from JWKS outages and DPoP replays in logs.
Changed
- CI and release workflow improvements from first-release learnings.