Skip to content

Issuer and resource gates, retry floors, and authserver 0.2.0 alignment - #58

Merged
RobertoIskandarani merged 1 commit into
mainfrom
port/labs-sync
Oct 1, 2026
Merged

RobertoIskandarani merged 1 commit into
mainfrom
port/labs-sync

Conversation

@RobertoIskandarani

Copy link
Copy Markdown
Contributor

Brings main up to the current development line ahead of the 0.5.0 cut. The [Unreleased] section of CHANGELOG.md is the authoritative list of what changed for a caller; this body covers the mechanics a reviewer needs.

What is in it

  • Retry floor. A failed metadata or JWKS fetch opens a floor of fetchFailureBackoffSeconds (new AuthplaneClient.create() option, default 30, clamped to [1s, the cache’s refresh interval]). An unreachable authorization server used to turn every wave of verification traffic into a fresh stalling fetch.
  • Freshness. AS metadata is re-read on the verification path, and a jwks_uri rotation is followed under a stable kid.
  • Identifier gating. Resource and issuer identifiers are gated wherever they are consumed — absolute URL with a scheme and a host, no fragment, whitespace refused — and a non-future server expiry is ignored rather than trusted.
  • Disclosure. Internal error messages and the DPoP nonce no longer reach the WWW-Authenticate challenge or the JSON body, across sdk, mcp, hono and nestjs.
  • AS-hosted PRM. resource_metadata can point at a document the authorization server hosts.
  • SSRF guard under Node ESM. ipaddr.js is loaded through a default import; the named import resolved to undefined under ESM interop, which disabled the guard silently.
  • authserver 0.2.0. access_denied and invalid_target are typed and excluded from the circuit breaker shared with introspection. VerifiedClaims.mayAct is deprecated — the AS no longer issues may_act.
  • Conformance catalog pin moves to 583a6d9.

Two deliberate carry-forwards

Both are places where this branch keeps what main already had rather than taking the development line’s copy:

  1. Package versions stay on 0.4.1-dev.0, the line main was bumped to after 0.4.0. The development line is still on 0.4.0-dev.0; taking it would have walked the published dev version backwards across all six package.json files and the lockfile’s workspace snapshots.
  2. One [Unreleased] bullet is condensed to a single line, matching the shape the rest of the family writes. Nothing a caller needs was dropped.

Verification

lint, typecheck and test green locally, with the conformance suites driven against the pinned catalog 583a6d9, which is what CI reads.

Brings main up to the current development line. The CHANGELOG's
[Unreleased] section is the authoritative list; the themes are:

- A failed metadata or JWKS fetch opens a retry floor
  (fetchFailureBackoffSeconds) instead of turning every wave of
  verification traffic into a fresh stalling fetch.
- AS metadata is re-read on the verification path, and a jwks_uri
  rotation is followed under a stable kid.
- Resource and issuer identifiers are gated wherever they are consumed:
  absolute URL with a scheme and a host, no fragment, whitespace refused,
  and a non-future server expiry ignored.
- Internal error messages and the DPoP nonce no longer reach the
  WWW-Authenticate challenge or the JSON body.
- resource_metadata can point at an AS-hosted PRM document.
- ipaddr.js is loaded through a default import so the SSRF guard works
  under Node ESM.
- authserver 0.2.0: access_denied and invalid_target are typed and kept
  out of the circuit breaker; VerifiedClaims.mayAct is deprecated.
- The conformance catalog pin moves to 583a6d9.

Two things keep what main already had rather than taking the development
line's copy: the package versions stay on the 0.4.1-dev.0 line main was
bumped to, and one CHANGELOG bullet is condensed to a single line to
match the family's shape.
@RobertoIskandarani
RobertoIskandarani requested a review from a team as a code owner September 28, 2026 22:07
Comment thread packages/sdk/src/core/fetching/documentCache.ts
@RobertoIskandarani
RobertoIskandarani merged commit 4f7ceea into main Oct 1, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants