8000 Correct acl usage of ldap-useradmin by seabres · Pull Request #1150 · webmin/webmin · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Correct acl usage of ldap-useradmin #1150

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

seabres
Copy link
Contributor
@seabres seabres commented Nov 27, 2019

The acl system of module ldap-useradmin include many acl roles not editable. They are in defaultacl and saved in acl_security_save, but never created in the acl form to be changed.

This patch deletes all not editable acl rights and uses them from the underlying useradmin module., instead of setting some of them to always allowed, as for instance udelete.
This is luckily possible due to exact the same names of acl roles between the two modules. Extending the acl roles for ldap-useradmin is easily possible, as only acl values for not present ldap-useradmin acl settings are copied from useradmin.

The list of secondary groups is limited to only allowed group from the access rights instead of showing all.
Edit masks for user and group consult access rights for options instead of display options always, for instance "change user in other modules".
They also consult module config to not display options not possible to execute, for instance create samba group when not group class is specified.

Access rights are also checked during save of user to reject group membership for not allowed groups. This is to prevent backdoor with direct HTTP request.

@jcameron
Copy link
Collaborator
jcameron commented Dec 8, 2019

Thanks for this patch! However, are you also adding or removing new ACL checks? I see some extra checks like "makehome" and "cothers" are referred to in edit_user.cgi

@seabres
Copy link
Contributor Author
seabres commented Dec 10, 2019

True, ldap-useradmin is very inconsistent in this area.
The configuration has many items with option "same as user and group module", but it has no code to check the ACL for that to apply.
One example you mentioned is homedir. If "makehome" ACL is set to No in useradmin, ldap-useradmin will let the user select to create homedir. It does not either bring its own ACL, nor use useradmin ACL. This is very inconsistent. As administrator, i can allow user creation but without homedir as OS user, but for LDAP user it is impossible to forbid homedir creation.

Yes, the patch implements additional ACL checks, but it does not remove any existing.
I try to implement in ldap-useradmin as much as possible of ACL checking from useradmin to it. But there is not enough time at the moment to do all right now. This is why started with the ones needed right now by myself. More will follow (have already two new in the queue).
Also to see if the way of adding ACL is applicable for the community.

In practice, the patch is written to be extendable in future.
Writing additional code to check ACL is independent of ACL existing in ldap-useradmin or useradmin.
Writing additional code for ldap-useradmin ACL will overwrite used useradmin ACL.

@iliaross iliaross force-pushed the master branch 2 times, most recently from 6ec1f01 to 75f0ca4 Compare April 13, 2020 21:56
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.

2 participants
0