You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(client): warn on fail_closed without a checker; pin outage edge cases
- AuthplaneClient.resource() logs a warning when fail_closed=True is
combined with revocation_checker=None. The flag is a security-relevant
no-op in that combination, and the misconfiguration should be
observable in production, not only documented. The warning lives in
the core factory rather than the adapters so direct resource() users
get it too.
- New core tests pin two fail-closed failure modes that were emergent:
AS metadata without introspection_endpoint rejects every token
(permanently, since it is a configuration property rather than an
outage), and an open circuit breaker rejects all traffic without
further HTTP calls (TokenRevokedError with CircuitOpenError as cause).
- Both user guides gain the metadata trade-off bullet and note the new
warning.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
8
8
## [Unreleased]
9
9
10
10
### Added
11
-
-`authplane-fastmcp`, `authplane-mcp`: `authplane_auth()` and `authplane_mcp_auth()` accept `fail_closed: bool = False` and forward it to `AuthplaneClient.resource(...)`, so factory users can opt into rejecting tokens (`TokenRevokedError`) when the configured `revocation_checker` itself fails — e.g. an unreachable introspection endpoint — instead of the default fail-open acceptance. The flag is only consulted when a `revocation_checker` is configured. Both user guides document the availability/security trade-off, the authenticated-introspection credential requirement, and the circuit-breaker interaction.
11
+
-`authplane-fastmcp`, `authplane-mcp`: `authplane_auth()` and `authplane_mcp_auth()` accept `fail_closed: bool = False` and forward it to `AuthplaneClient.resource(...)`, so factory users can opt into rejecting tokens (`TokenRevokedError`) when the configured `revocation_checker` itself fails — e.g. an unreachable introspection endpoint — instead of the default fail-open acceptance. The flag is only consulted when a `revocation_checker` is configured; `AuthplaneClient.resource(...)` now logs a warning when `fail_closed=True` is set without one, since that combination runs no revocation check at all. Both user guides document the availability/security trade-off, the authenticated-introspection credential requirement, the circuit-breaker interaction, and the permanent rejection that results from AS metadata lacking `introspection_endpoint`.
Copy file name to clipboardExpand all lines: authplane-fastmcp/docs/user-guide.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -244,7 +244,8 @@ Trade-offs to understand before enabling `fail_closed=True`:
244
244
245
245
-**Availability**: an authorization server or introspection outage makes every request fail with 401 until the outage resolves. Once the client's circuit breaker opens, checks fail fast and all tokens are rejected until the cooldown elapses.
246
246
-**Credentials**: authorization servers commonly require authenticated introspection; without valid `as_credentials` the introspection call fails, which under `fail_closed=True` means every token is rejected. Verify credentials as part of deployment, not just at rollout.
247
-
-`fail_closed` has no effect when `revocation_checker` is `None` — the flag is only consulted when a revocation check actually runs.
247
+
-**Metadata**: an AS whose metadata document does not advertise `introspection_endpoint` fails every introspection attempt. Under the default that check is silently skipped; under `fail_closed=True` every token is rejected — and unlike an outage this never self-recovers, because the missing endpoint is a permanent property of the AS configuration. Confirm the endpoint is present in AS metadata before enabling.
248
+
-`fail_closed` has no effect when `revocation_checker` is `None` — the flag is only consulted when a revocation check actually runs. The SDK logs a warning at resource construction when it detects this misconfiguration.
Copy file name to clipboardExpand all lines: authplane-mcp/docs/user-guide.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -232,7 +232,8 @@ Trade-offs to understand before enabling `fail_closed=True`:
232
232
233
233
-**Availability**: an authorization server or introspection outage makes every request fail with 401 until the outage resolves. Once the client's circuit breaker opens, checks fail fast and all tokens are rejected until the cooldown elapses.
234
234
-**Credentials**: authorization servers commonly require authenticated introspection; without valid `as_credentials` the introspection call fails, which under `fail_closed=True` means every token is rejected. Verify credentials as part of deployment, not just at rollout.
235
-
-`fail_closed` has no effect when `revocation_checker` is `None` — the flag is only consulted when a revocation check actually runs.
235
+
-**Metadata**: an AS whose metadata document does not advertise `introspection_endpoint` fails every introspection attempt. Under the default that check is silently skipped; under `fail_closed=True` every token is rejected — and unlike an outage this never self-recovers, because the missing endpoint is a permanent property of the AS configuration. Confirm the endpoint is present in AS metadata before enabling.
236
+
-`fail_closed` has no effect when `revocation_checker` is `None` — the flag is only consulted when a revocation check actually runs. The SDK logs a warning at resource construction when it detects this misconfiguration.
0 commit comments