feature/impersonator: handles additional groups, optionally reject system users #361
Open
leo9800 wants to merge 2 commits into
Open
feature/impersonator: handles additional groups, optionally reject system users #361leo9800 wants to merge 2 commits into
leo9800 wants to merge 2 commits into
Conversation
Signed-off-by: Leo <i@hardrain980.com>
… system users (uid <= 999) sample_wsgidav.yaml: configuration entry for the feature above Signed-off-by: Leo <i@hardrain980.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #361 +/- ##
=======================================
Coverage 43.66% 43.66%
=======================================
Files 31 31
Lines 4967 4967
=======================================
Hits 2169 2169
Misses 2798 2798 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
+1 for 2, this is necessary for LDAP as sssd backend as well. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
summary
this patch adds 2 major features for the impersonator middleware plus refactoring:
initgroups()to initialize supplementary groups for the impersonated user, without this feature, the server may not correctly handle unix filesystem permission in some cases (explained below)passwdstructs (classes) insteadthe case that wsgidav with impersonator could not handle without
initgroups():in unix context, both
janeandjohnshould have access to/path/to/davroot/department_1_rootbecause they are member of groupdept1and the mode of this directory is0770but if
initgroups()is not called in wsgidav context andjaneorjohnis impersonated, none of them would become member of groupdept1, rendering them having no access to/path/to/davroot/department_1_root.