-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor OIDC integration for DigiD/eHerkenning - init flow #4265
Conversation
f199e3a
to
f1cf127
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #4265 +/- ##
==========================================
- Coverage 96.13% 96.13% -0.01%
==========================================
Files 733 731 -2
Lines 23538 23529 -9
Branches 2760 2762 +2
==========================================
- Hits 22629 22620 -9
+ Misses 642 641 -1
- Partials 267 268 +1 ☔ View full report in Codecov by Sentry. |
55792fa
to
ac49266
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall, just a few questions/remarks
Simplified the entire authentication request flow where the user gets redirect to the relevant identity provider. There is now a single 'view' implementation that takes a config class/model to use which can be used to directly obtain the redirect target instead of having to go through multiple redirects on our own URLs. The view takes care of input sanitation and managing the authentication state. This substantially cleans up the inheritance/mixin chains for the OIDC flows and makes the code easier to follow.
The plugin is now able to figure out the final redirect target to the identity provider in one pass rather than having to perform multiple redirects. This also removes the ability of users to tamper with URLs in the
The tests were testing the implementation details way too much, so they've been updated by removing the fluff and asserting the functional aspects instead.
This is a temporary fix, the next steps will refactor the callback view so there's a single URL/entrypoint and that view will load the config to use from the session. But for now, the test suite must pass while we refactor the init phase.
These separate modules serve no shared purpose anymore, instead we can move the configuration directly into the model classes.
* Moved the eHerkenning tests to the proper module * Restructured the auth flow tests similarly to the remaining tests
ac49266
to
232c866
Compare
Closes #4246 partly
Changes
Checklist
Check off the items that are completed or not relevant.
Impact on features
Release management
I have updated the translations assets (you do NOT need to provide translations)
./bin/makemessages.sh
./bin/compilemessages_js.sh
Commit hygiene