Skip to content
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

Implementation of Groupbackend #545

Closed
wants to merge 58 commits into from

Conversation

JonathanTreffler
Copy link
Contributor

@JonathanTreffler JonathanTreffler commented Sep 7, 2021

continuation of #536

  • Rebase to keep up with master
  • migration strategy
  • gid collision handling
  • automatically delete groups without members
  • ensure admins cannot (un)assign members, create or delete saml groups
  • tests
  • Migrations for groups on existing installations

Since this is a long-running feature implementation with many PRs here's the timeline:

@JonathanTreffler
Copy link
Contributor Author

  • Migrations for groups on existing installations

For this step we need input/advice from the maintainers because we are currently not sure which implementation for that would be the best.

@melegiul melegiul force-pushed the groupbackend branch 5 times, most recently from 8467038 to aae3530 Compare September 16, 2021 17:06
@melegiul
Copy link
Contributor

@blizzz Beneath the main parts of this PR, which already worked like a charm, we finished now the last open issues on this PR:

  1. gid collision handling
  2. tests
  3. ensure admins cannot delete SAML groups
  4. delete SAML groups without members

Can you please review our changes?

Copy link
Member

@CarlSchwan CarlSchwan left a comment

Choose a reason for hiding this comment

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

Just a bit more type hinting there possible

lib/GroupDuplicateChecker.php Outdated Show resolved Hide resolved
lib/GroupManager.php Outdated Show resolved Hide resolved
lib/GroupManager.php Outdated Show resolved Hide resolved
lib/GroupManager.php Outdated Show resolved Hide resolved
lib/GroupManager.php Outdated Show resolved Hide resolved
lib/GroupManager.php Outdated Show resolved Hide resolved
lib/GroupManager.php Outdated Show resolved Hide resolved
lib/Jobs/MigrateGroups.php Outdated Show resolved Hide resolved
lib/Jobs/MigrateGroups.php Outdated Show resolved Hide resolved
lib/Jobs/MigrateGroups.php Outdated Show resolved Hide resolved
@JonathanTreffler JonathanTreffler force-pushed the groupbackend branch 2 times, most recently from 5752099 to b0f45cd Compare September 29, 2021 09:51
@svenseeberg
Copy link

svenseeberg commented Feb 11, 2022

Is there a chance that this will get merged at some point? Can we do anything to help with that? Otherwise we would start searching for a solution outside of the user_saml app.

@svenseeberg
Copy link

svenseeberg commented Apr 26, 2022

We're already using the changes introduced with this PR in production and it works quite well. Migrating the groups into a dedicated back end also went smoothly. I think merging this PR adds more flexibility to the group management with this app. However we're able to implement other mechanisms and migrate back to the normal group back end if there is no chance that this PR is going to be merged.

appinfo/app.php Outdated Show resolved Hide resolved
appinfo/app.php Outdated Show resolved Hide resolved
lib/GroupBackend.php Show resolved Hide resolved
lib/GroupDuplicateChecker.php Show resolved Hide resolved
lib/GroupDuplicateChecker.php Outdated Show resolved Hide resolved
lib/GroupDuplicateChecker.php Outdated Show resolved Hide resolved
lib/Jobs/MigrateGroups.php Outdated Show resolved Hide resolved
lib/Jobs/MigrateGroups.php Outdated Show resolved Hide resolved
lib/Migration/Version2500Date20191008134400.php Outdated Show resolved Hide resolved
lib/UserBackend.php Outdated Show resolved Hide resolved
lib/GroupBackend.php Outdated Show resolved Hide resolved
appinfo/app.php Outdated Show resolved Hide resolved
lib/GroupManager.php Outdated Show resolved Hide resolved
appinfo/app.php Outdated Show resolved Hide resolved
appinfo/app.php Outdated Show resolved Hide resolved
lib/GroupBackend.php Outdated Show resolved Hide resolved
$this->logger = $logger;
}

public function checkForDuplicates(string $group): void {
Copy link
Member

Choose a reason for hiding this comment

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

seems to be unused?

lib/GroupManager.php Outdated Show resolved Hide resolved
JonathanTreffler and others added 20 commits September 23, 2022 21:47
Signed-off-by: Jonathan Treffler <[email protected]>

Co-authored-by: Carl Schwan <[email protected]>
Signed-off-by: Jonathan Treffler <[email protected]>

Co-authored-by: Carl Schwan <[email protected]>
Signed-off-by: Giuliano Mele <[email protected]>
This reverts commit 48f331f.

Signed-off-by: Giuliano Mele <[email protected]>
Co-authored-by: Carl Schwan <[email protected]>
Signed-off-by: Giuliano Mele <[email protected]>
Co-authored-by: Carl Schwan <[email protected]>
Signed-off-by: Giuliano Mele <[email protected]>
Co-authored-by: Carl Schwan <[email protected]>
Signed-off-by: Giuliano Mele <[email protected]>
Co-authored-by: Carl Schwan <[email protected]>
Signed-off-by: Giuliano Mele <[email protected]>
Co-authored-by: Carl Schwan <[email protected]>
Signed-off-by: Giuliano Mele <[email protected]>
Co-authored-by: Carl Schwan <[email protected]>
Signed-off-by: Giuliano Mele <[email protected]>
Co-authored-by: Carl Schwan <[email protected]>
Signed-off-by: Giuliano Mele <[email protected]>
Co-authored-by: Carl Schwan <[email protected]>
Signed-off-by: Giuliano Mele <[email protected]>
Signed-off-by: Giuliano Mele <[email protected]>
Co-authored-by: Carl Schwan <[email protected]>
Signed-off-by: Giuliano Mele <[email protected]>
Signed-off-by: Giuliano Mele <[email protected]>
- Switch to new configuration setup, see nextcloud#558

Signed-off-by: Giuliano Mele <[email protected]>
Signed-off-by: Giuliano Mele <[email protected]>
Signed-off-by: Giuliano Mele <[email protected]>
- also fixes some logic errors and deprecations
- GroupBackend can now implement INamedBackend

Signed-off-by: Arthur Schiwon <[email protected]>
@blizzz
Copy link
Member

blizzz commented Sep 26, 2022

@JonathanTreffler I think this commit got lost: netzbegruenung@f5173a9

@blizzz
Copy link
Member

blizzz commented Sep 26, 2022

My own smoke-testing otherwise went fine. Also the migration bits. Still would tend to add the IdP-identifiert to the default SAML-Prefix. Also with regard to #355 (comment) occ commands as migration utilities (removing groups from migration, and reverting migrations) should be added, but I would add this in a seperate PR and not blow up this PR more than further necessary. I consider adding integration tests, does not need to be a blocker either.

@kevinmccurdybrd
Copy link

Hi guys! Thanks for spending some time to resolve this. I'm not sure which is the better solution between this and #659, but if we could get one of these reviewed and merged, that would be fantastic.

Selfishly, I'm about to deploy 5 azure instances of NC, and this would completely eliminate LDAP out of my design. This is a game changer, and I deeply appreciate all of the development that has gone into this solution and as well what @Ma27 did in 659. Thanks in advance!

@blizzz blizzz mentioned this pull request Oct 10, 2022
3 tasks
@blizzz
Copy link
Member

blizzz commented Nov 8, 2022

Closing as work is continued in #662, where it can also being pushed to. Currently I am looking into integration tests and would like then to conclude the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants