Allow SSO authentication to provide a user secret#24837
Allow SSO authentication to provide a user secret#24837immerda wants to merge 1 commit intonextcloud:masterfrom
Conversation
Allow Authentication\IApacheBackend to return a per-user secret. This secret is used in lieu of a passwort to initialize the session. This allows an SSO backend to support per-user encrypted files. Signed-off-by: Peter Meier <admin@immerda.ch>
MorrisJobke
left a comment
There was a problem hiding this comment.
Makes sense to pass it here. 👍
|
moving to 23 since we are in feature freeze. CI is unhappy also. |
|
@immerda Can you rebase and try to make CI happy ? |
Implementing PR #24837 from immerda Signed-off-by: MichaIng <micha@dietpi.com>
Implementing PR #24837 from immerda Signed-off-by: MichaIng <micha@dietpi.com>
| * Optionally returns a stable per-user secret. This secret is for | ||
| * instance used to secure file encryption keys. | ||
| * @return string|null | ||
| * @since 21.0.0 |
There was a problem hiding this comment.
| * @since 21.0.0 | |
| * @since 23.0.0 |
There was a problem hiding this comment.
Actually we could move this to a separate interface like IProvideUserSecretBackend to avoid breaking existing implementations on new Nextcloud releases. With that we could also avoid the null return value and check in OC_User and do a check there if the interface is implemented by the backend.
There was a problem hiding this comment.
To avoid confusion, the PR has been redone here as immerda seems to be not maintaining it here. The version string has been adjusted already, I'll do the same with pw => password. About the new interface, you need to tell me more in detail how to do that, over there, I guess this means a new script?
There was a problem hiding this comment.
Ah indeed, I already wondered, because I though I already reviewed something similar but was not seeing my comments on this one 👍
| $userSession->createSessionToken($request, $uid, $uid); | ||
| $secret = $backend->getCurrentUserSecret(); | ||
| $userSession->createSessionToken($request, $uid, $uid, $secret); | ||
| $pw = $secret === null ? '' : $secret; |
There was a problem hiding this comment.
| $pw = $secret === null ? '' : $secret; | |
| $password = $secret === null ? '' : $secret; |
| [ | ||
| 'uid' => $uid, | ||
| 'password' => '', | ||
| 'password' => $pw, |
There was a problem hiding this comment.
| 'password' => $pw, | |
| 'password' => $password, |
Implementing PR #24837 from immerda Signed-off-by: MichaIng <micha@dietpi.com>
|
Thanks @juliushaertl for the review and @MichaIng for pushing this further. The train is moving, so let's all move with it to #27929 |
Implementing PR #24837 from immerda Signed-off-by: MichaIng <micha@dietpi.com>
Implementing PR #24837 from immerda Signed-off-by: MichaIng <micha@dietpi.com>
Implementing PR #24837 from immerda Signed-off-by: MichaIng <micha@dietpi.com>
Implementing PR #24837 from immerda Signed-off-by: MichaIng <micha@dietpi.com>
Implementing PR #24837 from immerda Signed-off-by: MichaIng <micha@dietpi.com>
Implementing PR #24837 from immerda Signed-off-by: MichaIng <micha@dietpi.com>
Implementing PR #24837 from immerda Signed-off-by: MichaIng <micha@dietpi.com>
Implementing PR #24837 from immerda Signed-off-by: MichaIng <micha@dietpi.com>
Implementing PR #24837 from immerda Signed-off-by: MichaIng <micha@dietpi.com>
Implementing PR #24837 from immerda Signed-off-by: MichaIng <micha@dietpi.com>
Implementing PR #24837 from immerda Signed-off-by: MichaIng <micha@dietpi.com>
Implementing PR #24837 from immerda Signed-off-by: MichaIng <micha@dietpi.com>
Implementing PR #24837 from immerda Signed-off-by: MichaIng <micha@dietpi.com>
Implementing PR #24837 from immerda Signed-off-by: MichaIng <micha@dietpi.com>
Implementing PR #24837 from immerda Signed-off-by: MichaIng <micha@dietpi.com>
Implementing PR #24837 from immerda Signed-off-by: MichaIng <micha@dietpi.com>
Implementing PR #24837 from immerda Signed-off-by: MichaIng <micha@dietpi.com>
Implementing PR #24837 from immerda Signed-off-by: MichaIng <micha@dietpi.com>
Allow Authentication\IApacheBackend to return a per-user secret. This
secret is used in lieu of a passwort to initialize the session.
This allows an SSO backend to support per-user encrypted files.