Re-vendor the gateway-config schema artifact and validator bundle - #41
Closed
pareilly wants to merge 1 commit into
Closed
Re-vendor the gateway-config schema artifact and validator bundle#41pareilly wants to merge 1 commit into
pareilly wants to merge 1 commit into
Conversation
The vendored schema artifact predated the session-control changes in the product repo, so the config skill documented `client_id` as required and knew nothing of `redirect_uri`. On a gateway that authenticates against Dtwo's own IdP that is backwards: the platform provisions the ceremony application per organization and the deploy renders its client id, so the field should be left unset, and only a gateway trusting a customer-run IdP needs to set one. Both vendored files are refreshed from the same product-repo revision, per the resolution of the bundle/artifact drift defect — refreshing the artifact alone would have reintroduced it, with `session_control.redirect_uri` strict-rejected by the older bundle and `SESSION_CONTROL_REDIRECT_URI` accepted inside `gateway.advanced`. - schema artifact and validator bundle re-vendored together; all three pins bumped (artifact sha, bundle sha, bundle version 2.0.0 -> 3.0.0). The bundle's type surface is unchanged, so the harness's shape assumptions still hold. - digest regenerated: `client_id` now optional with the Dtwo-authentication guidance, `redirect_uri` documented, `SESSION_CONTROL_REDIRECT_URI` listed as reserved, and two new cross-field constraints. - `generate-schema-digest.mjs` renders two upstream OAuth fields the artifact gained, `token_endpoint_auth_method` and `omit_resource`. Both are user-audience, so the coverage gate failed until they were added. - incidental catch-up carried by the refresh: the CGNAT note on `allowed_networks`, and five newly platform-managed reserved keys. Verified: digest --check in sync, 177 harness tests pass, biome clean. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The vendored schema artifact predated the session-control work in the product repo, so
dtwo-gateway-configdocumentedclient_idas required and knew nothing ofredirect_uri.That is backwards for the common case. On a gateway authenticating against Dtwo's own IdP the platform provisions the ceremony application per organization and the deploy renders its client id, so the field should be left unset; only a gateway trusting a customer-run IdP needs to set one. The skill was telling every user to go register an application and paste an id — the one thing a Dtwo-authenticated gateway should not do.
Both files, one revision
The artifact and
skill-harness/vendor/config-validator.bundle.mjsare refreshed together from the same product-repo revision. Refreshing the artifact alone would have reintroduced the bundle/artifact drift defect closed in #34:session_control.redirect_uriwould be strict-rejected by the older bundle while documented in the artifact, andSESSION_CONTROL_REDIRECT_URIwould be newly reserved in the artifact but accepted insidegateway.advancedby the bundle — the same shape as the original divergences.All three pins are bumped: artifact sha, bundle sha, and bundle version
2.0.0→3.0.0. The version move is a content/behaviour bump, not a structural one — the bundle's.d.mtssurface is byte-identical, so the harness's shape assumptions still hold.What the digest now says
client_id— requiredyes→no, with guidance to leave it unset under Dtwo authentication and set it only for a customer-run IdP.redirect_uri— new field, with the derivation it overrides and the root-path constraint.SESSION_CONTROL_REDIRECT_URI— now listed among the keys reserved fromgateway.advanced.client_id(the deploy fails rather than arming a ceremony with no application), andredirect_urireplaces the callback otherwise derived from the firstjwt_audienceentry.Generator change
scripts/generate-schema-digest.mjsgains two fields in the OAuth variant'sfieldOrder:token_endpoint_auth_methodandomit_resource. Both are user-audience in the artifact, soassertDigestCoveragefailed the regeneration until they were rendered — the gate working as intended.Incidental catch-up
Carried by the refresh rather than authored here: the CGNAT /
100.64.0.0/10note ongateway.ssrf.allowed_networks, and five newly platform-managed reserved keys.Verification
node scripts/generate-schema-digest.mjs --check— in syncpnpm testinskill-harness— 177 pass, 0 failpnpm biome:check— clean🤖 Generated with Claude Code