Problem/Motivation
Easy to use key module for "Client ID" and "Client Secret Key"
| Comment | File | Size | Author |
|---|---|---|---|
| #15 | 3373168--integration-key-module--14.patch | 14.07 KB | neilnz |
| #14 | 3373168--integration-key-module--13.patch | 13.82 KB | neilnz |
| #10 | 3373168--integration-key-module--10.patch | 14.27 KB | svendecabooter |
| #2 | integrate_with_the_key_module-3373168-2.patch | 7.64 KB | anton4uk |
Issue fork openid_connect-3373168
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
anton4uk commentedComment #3
anton4uk commentedComment #4
afi13 commentedLooks ok
Comment #5
jcnventuraThis needs to be made a lot more robust.. Imagine you have a running site using this module just fine, and then decide to enable the key module.. Suddenly your keys no longer work, as the code in #2 suddenly expects that the configuration values refer to keys with the same name managed by the key module.
The way this should work is to refactor the client id and secret configuration to add a "provider" attribute that indicates the use of the key module. Naturally, the module should then be blocked if the key module is disabled.
Comment #8
svendecabooterI have created a merge request that reworks this concept, as suggested by jcnventura.
It adds a "credentials_provider" to the plugin configuration, that defaults to "config", which will just keep on storing the client_id and client_secret in the plugin configuration, as is the case currently.
If the "Key" module is installed, an optional second credentials provider gets added to the dropdown list, and users are able to optionally select a multivalue key for retrieving the appropriate credentials.
If the Key module is not installed, nothing changes. If the key module is installed, nothing changes by default, but you can opt-in to use a Key rather than providing the credentials inline.
Thanks for reviewing this MR and considering whether this could be added to the module.
Comment #9
svendecabooterComment #10
svendecabooterPatch version of the current MR state, for Composer based patching workflows.
Comment #11
svendecabooterComment #12
svendecabooterUpdated the MR to fix a merge conflict with hook_update_x numbering.
Comment #13
svendecabooterRebasing / fixing of merge conflict causes a new issue in test
Drupal\Tests\openid_connect\Functional\Update\IssAllowedSchemaUpdate30004Test::testUpdateHook30003Not sure how this is related, except that earlier hook also updated plugin config. Maybe it now fails because in our update hook we also update the plugin config further.
Any insights from maintainers as to how to solve this would be appreciated.
Comment #14
neilnz commentedWithout commenting on the failing test, I've attached a re-rolled Composer patch that works against current 3.x-dev for anyone relying on this functionality (like me!)
Comment #15
neilnz commentedRerolled against latest update to fix conflict with prompt update hook.
Comment #16
svendecabooterRebased MR. All tests pass now.
Comment #17
hilly510 commentedJust tested this out on one of my sites and it works great - I would love to see this merged into the next release!
Comment #18
socialnicheguru commentedChanged because of MR comment. If it is not relevant please change back
Comment #20
neclimdulAddressed my feedback. Definitely could not submit the form after selecting a key because of the missing values.
Comment #22
pfrillingI re-worked the key integration to only require the client_secret. Client ID's are public.
I also added tests to
- Validate the Key integration
- Validate that the downstream openid_connect_windows_aad didn't break (they already have Key integration).
- Reworked the update hook to _not_ rely on plugins, but just edited the configuration directly.
- [ ] We need to followup with the windows_aad to have their schema updated.
Comment #23
neclimdulMerged latest changes and resolved conflicts.
This is a bug I'm not sure how to handle. Since it doesn't extend the base schema it doesn't get the updated schema definition. Is the expectation that sub modules should update their schema definition to include this?