docs: developing against a mock identity provider - #81
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #81 +/- ##
==========================================
Coverage 99.52% 99.52%
Complexity 205 205
==========================================
Files 15 15
Lines 834 834
==========================================
Hits 830 830
Misses 4 4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Documentation only. Shows how a consuming application can run the whole authorization code flow locally against a mock identity provider, and says why that beats switching the firewall off in
dev.Changes
Why
Pointing a development environment at the real provider is usually impractical — it will not have your local hostname among its registered redirect URIs. The tempting shortcut is
when@dev: security: false, and the cost only shows up later: no OIDC path is exercised until the code reaches a server, so a broken callback path, a renamed claim or a login loop all stay invisible locally. It is also easy to forget, and then someone loses an afternoon debugging authentication against a firewall that was never running.Written to be useful to anyone: it links only to public repositories —
oidc-provider-mockand the worked two-provider example in deltag.aarhus.dk — and points ITK Dev developers at the internal documentation for the fuller setup without linking to it.The two things that bite
allow_http: trueis mandatory, because container-to-container traffic is http. Worth flagging now: sinceitk-dev/openid-connect5.1 the scheme check covers every endpoint the discovery document announces, not justmetadata_url, so a mock setup that worked on 5.0 fails on 5.1 without it. The section says to keep it in development-only configuration rather than drive it from an environment variable that could be set wrong elsewhere.PKCE against this mock — verified
Not asserted from documentation; I ran the flow. Against
ghcr.io/geigerzaehler/oidc-provider-mock:authorizewithcode_challenge+code_challenge_method=S256authorizewithout themtokenexchange withcode_verifieraccess_token,id_token,refresh_token, no errorSo a login completes with the bundle's default and no
pkce: falseis needed.The README also records what this does not prove: the mock omits
code_challenge_methods_supportedfrom its discovery document, so it is not verifying the challenge. The round trip is exercised; the protection is not. Worth knowing before anyone treats a green local login as evidence that PKCE works against the real provider.Note
An earlier draft of this used
Soluto/oidc-server-mock, which our internal documentation still describes. That image is amd64-only and aborts under emulation on arm64, and the current tool is the one used here.