feat(verify): cover the OAuth migration cutover path - #217
Merged
Merged
Conversation
Import a directory user, link them through an OIDC provider on the ID token's oid, enroll a passkey from nextStep, then retire the provider for their organization and roll it back. The mock OIDC provider now issues signed ID tokens from a fixed key and can sign in as a named user. Part of fells-code/seamless-auth-api#337.
5 tasks done
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.
Part of fells-code/seamless-auth-api#337 (its last checklist item: conformance coverage for the link-then-enroll path).
What the new spec covers
verify/harness/api/oauthCutover.spec.ts, API layer, runs end to end against a real stack:issuer/jwksUri,externalIdSource+externalIdJsonPath: 'oid'andpromptPasskeyEnrollment: true. Create an organization and import a user into it with a directory id.oid. Assertsubis the imported user andnextStepisenroll_passkey.fmt: 'none') and the API's register start/finish.nextStep.oauth_provider_retired.Harness changes
mock-oidc.ts:kid, so a quick local re-run doesn't hit the API's JWKS refetch cooldown./jwks.nonceand uses theclient_idasaud./authorizetakesmock_sub/mock_email/mock_oidto sign in as a named user.mockprovider has noissuer, so it ignores the ID token and is unchanged.lib/softwareAuthenticator.ts: a minimal ES256 authenticator with a small CBOR encoder, so the harness gains no dependency.lib/cutoverFlows.ts: owner admin sign-in, provider creation, sign-in as a named directory user, passkey enrollment.Merge order
Merge after fells-code/seamless-auth-api#348. Step 5's session revocation assertions need it.
Checks
apiproject passed (22 specs).npm testpasses (1054).tsc --noEmitpasses for the CLI and the new harness files.POST /admin/organizationsmakes the creating admin a member, so retiring a provider for that organization also signs the admin out. The spec asserts this and signs in again before restoring.