Skip to content

Conversation

@immerda
Copy link

@immerda immerda commented Dec 24, 2020

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.

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 <[email protected]>
Copy link
Member

@MorrisJobke MorrisJobke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to pass it here. 👍

@MorrisJobke MorrisJobke added this to the Nextcloud 22 milestone May 26, 2021
@blizzz blizzz mentioned this pull request Jun 2, 2021
57 tasks
@blizzz
Copy link
Member

blizzz commented Jun 2, 2021

moving to 23 since we are in feature freeze. CI is unhappy also.

@blizzz blizzz modified the milestones: Nextcloud 22, Nextcloud 23 Jun 2, 2021
@artonge
Copy link
Contributor

artonge commented Jul 1, 2021

@immerda Can you rebase and try to make CI happy ?

MichaIng added a commit that referenced this pull request Jul 12, 2021
Implementing PR #24837 from immerda

Signed-off-by: MichaIng <[email protected]>
MichaIng added a commit that referenced this pull request Jul 13, 2021
Implementing PR #24837 from immerda

Signed-off-by: MichaIng <[email protected]>
* 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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @since 21.0.0
* @since 23.0.0

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$pw = $secret === null ? '' : $secret;
$password = $secret === null ? '' : $secret;

[
'uid' => $uid,
'password' => '',
'password' => $pw,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
'password' => $pw,
'password' => $password,

MichaIng added a commit that referenced this pull request Jul 21, 2021
Implementing PR #24837 from immerda

Signed-off-by: MichaIng <[email protected]>
@immerda
Copy link
Author

immerda commented Jul 22, 2021

Thanks @juliushaertl for the review and @MichaIng for pushing this further. The train is moving, so let's all move with it to #27929

@immerda immerda closed this Jul 22, 2021
MichaIng added a commit that referenced this pull request Jul 23, 2021
Implementing PR #24837 from immerda

Signed-off-by: MichaIng <[email protected]>
MichaIng added a commit that referenced this pull request Jul 23, 2021
Implementing PR #24837 from immerda

Signed-off-by: MichaIng <[email protected]>
MichaIng added a commit that referenced this pull request Jul 23, 2021
Implementing PR #24837 from immerda

Signed-off-by: MichaIng <[email protected]>
MichaIng added a commit that referenced this pull request Aug 11, 2021
Implementing PR #24837 from immerda

Signed-off-by: MichaIng <[email protected]>
MichaIng added a commit that referenced this pull request Aug 17, 2021
Implementing PR #24837 from immerda

Signed-off-by: MichaIng <[email protected]>
MichaIng added a commit that referenced this pull request Aug 18, 2021
Implementing PR #24837 from immerda

Signed-off-by: MichaIng <[email protected]>
MichaIng added a commit that referenced this pull request Sep 10, 2021
Implementing PR #24837 from immerda

Signed-off-by: MichaIng <[email protected]>
MichaIng added a commit that referenced this pull request Sep 22, 2021
Implementing PR #24837 from immerda

Signed-off-by: MichaIng <[email protected]>
MichaIng added a commit that referenced this pull request Oct 17, 2021
Implementing PR #24837 from immerda

Signed-off-by: MichaIng <[email protected]>
MichaIng added a commit that referenced this pull request Nov 27, 2021
Implementing PR #24837 from immerda

Signed-off-by: MichaIng <[email protected]>
MichaIng added a commit that referenced this pull request Nov 27, 2021
Implementing PR #24837 from immerda

Signed-off-by: MichaIng <[email protected]>
MichaIng added a commit that referenced this pull request Dec 20, 2021
Implementing PR #24837 from immerda

Signed-off-by: MichaIng <[email protected]>
MichaIng added a commit that referenced this pull request Jan 3, 2022
Implementing PR #24837 from immerda

Signed-off-by: MichaIng <[email protected]>
MichaIng added a commit that referenced this pull request Jan 20, 2022
Implementing PR #24837 from immerda

Signed-off-by: MichaIng <[email protected]>
MichaIng added a commit that referenced this pull request Feb 4, 2022
Implementing PR #24837 from immerda

Signed-off-by: MichaIng <[email protected]>
MichaIng added a commit that referenced this pull request Apr 12, 2022
Implementing PR #24837 from immerda

Signed-off-by: MichaIng <[email protected]>
MichaIng added a commit that referenced this pull request Jun 1, 2022
Implementing PR #24837 from immerda

Signed-off-by: MichaIng <[email protected]>
MichaIng added a commit that referenced this pull request Jul 12, 2022
Implementing PR #24837 from immerda

Signed-off-by: MichaIng <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants