OrchardCore icon indicating copy to clipboard operation
OrchardCore copied to clipboard

Fix: OpenIdClientSettingsStep does not protect the client secret and throws null reference exceptions #18313

Open mroskamp opened this issue 4 months ago • 3 comments

Fix issue where client secret was not being protected when set from OpenIdClientSettings recipe step. Fix null reference exception when Scope isn't specified in the recipe step. Fixes #18313

mroskamp avatar Sep 04 '25 18:09 mroskamp

Just to confirm: this PR is in draft, indicating that you aren't waiting for a review. Let us know once you're ready for review.

Piedone avatar Sep 11 '25 16:09 Piedone

Could you add a new property to the viewmodel named ClientSecretPlainText that can contain the plaintext secret you would then protect like you did. This way we can reserve the ClientSecret property to use an actually protected value using custom recipe providers (js:, uuid, ...) named unprotect (out of scope for this PR). This ClientSecret could also be created during export then and would include a payload like "ClientSecret": "unprotect('super protected payload')"

One we have a secure solution we'll then be able to obsolete this "Plaintext" field.

sebastienros avatar Sep 11 '25 18:09 sebastienros

Also since it's for setting up a new site, there is no really existing thing to export or protect, hence in this case a decrypt action that is independent from the data protector but uses a private key configured with the app would make more sense. Or we could have some utility to protect a payload from the app itself.

sebastienros avatar Sep 11 '25 18:09 sebastienros