Repository navigation
[#1221] Characterize token endpoint errors and cache headers - #1240
maximthomas wants to merge 2 commits into
Conversation
vharseko
left a comment
There was a problem hiding this comment.
[P3] Scope client provisioning to the tests that use it
The file-level beforeAll now writes test_client_oauth2_b4b even when only an existing authorization-code or consent test is selected. With a local HTTP stub returning 403 for just that PUT, the base revision completed the authorization-code exchange and the PR revision stopped before reaching /authorize. Move the write into setup for the tests that use the new client. Fixture setup
[P3] Assert the realm value in the Basic challenge
/^Basic realm=/ accepts both a missing value (Basic realm=) and an unexpected realm. Restlet’s recorded response for this request is Basic realm="/". Checking the realm value would catch either regression during the CHF migration. Assertion · Restlet capture · RFC 7617 §2
Both changed files passed node --check, and git diff --check passed. Playwright discovered 16 tests in the changed spec and 143 across OAuth2, UMA, and XACML. CI skipped build-docker after the macOS/JDK 27 job was cancelled. My local run with the CI WAR timed out during deployment, before Playwright ran against the server. CI run
Part of #1221.
Ports six Restlet characterization tests from pre-flip commit
59a89d07cc(e2e/oauth2/oauth2-test.spec.mjs, lines 393–526). The tests pin the HTTP contract before those OAuth2 endpoints move to CHF.POST /access_tokenwith an unknown grant returns400 unsupported_grant_type.POST /access_tokenwith the wrong secret for an existing confidential client returns401 invalid_clientand a Basic challenge.GET /access_tokenreturns405 method_not_allowedand currently omitsAllow. The target response includesAllow: POST(RFC 9110 §15.5.6). All three token endpoint errors carryCache-Control: no-storeandPragma: no-cache.GET /tokeninforeturns the issued token's JSON withCache-Control: no-cache, no-storeand noPragma.POST /introspectconfirms the token is active and belongs to the test client, with neither cache header.GET /userinfowith the same client credentials token returns400 unauthorized_clientwith neither cache header.The cache tests mint a token for a dedicated confidential client through the shared
ensureClientfixture. The setup verifies the access token response and its cache headers. The dedicated client keeps this setup independent of other specs.Changes to the source expectations:
method_not_allowederror code. Restlet and CHF use differenterror_descriptionwording.application/jsonmedia type and accepts parameters such ascharset.active: trueand client identity checks to introspection so a 200 response for an inactive token or the wrong client cannot pass.invalid_tokenchallenge. See OpenID Connect Core §5.3.3 and RFC 6750 §3.Validation used one OpenAM container with embedded OpenDJ, default file parallelism and
retries: 0. The WAR came from CI run 43852682205, artifact14222035312, built at097005086e3113fcd81c382f4aa080ec2f823cf4. The SHA256 verified as39599c6caf586b5e31b4971a76548b135eaaa20b9c99ec57e148f55cf0718cde, and the build source differs from the PR base only undere2e.git diff --checkpassed. Playwright discovered 16 tests in the updated spec and 143 inoauth2 uma xacml.--grepruns. A temporary copy with one deliberately incorrect assertion per test produced six expected assertion failures, then the restored tests passed together.