-
Notifications
You must be signed in to change notification settings - Fork 259
sdap: include sub-domain memberships in updates #7922
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
base: master
Are you sure you want to change the base?
sdap: include sub-domain memberships in updates #7922
Conversation
While looking up group memberships from the cache only groups from the user's domain were taken into account because of the cache search base. As a result memberships in other domains were not updated. With this patch the whole cache is searched and hence memberships from all domains will be updated. Resolves: SSSD#7921
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removal of 'ad_admins' POSIX group works with this PR.
[root@master /]# rpm -q sssd-client
sssd-client-9.pr7922-06510.fc42.x86_64
[root@master /]# id [email protected]
uid=1157400500([email protected]) gid=1157400500([email protected]) groups=1157400500([email protected]),1157400520(group policy creator [email protected]),1157400519(enterprise [email protected]),1157400512(domain [email protected]),1157400518(schema [email protected]),1572600006(ad_admins),1157400513(domain [email protected])
[root@master /]# ipa group-remove-member ad_admins_external --external [email protected]
[member user]:
[member group]:
[member service]:
[member User ID override]:
Group name: ad_admins_external
External member:
Member of groups: ad_admins
---------------------------
Number of members removed 1
---------------------------
[root@master /]# sssctl cache-expire -u [email protected]
[root@master /]# id [email protected]
uid=1157400500([email protected]) gid=1157400500([email protected]) groups=1157400500([email protected]),1157400520(group policy creator [email protected]),1157400519(enterprise [email protected]),1157400512(domain [email protected]),1157400518(schema [email protected]),1157400513(domain [email protected])
Hi, thanks for testing, did you use bye, |
Yes, I tested only on the IPA server, and with these options. |
Thanks |
Is it needed to replace the domain by |
Hi, I agree that it is hard to follow what is going on here, but the current code is ok imo. The whole surrounding tevent req is to check for membership of users from other domains in "domain local" groups of the local domain, i.e. the domain the client is joined to and which is configured in sssd.conf. Since "domain local" groups are only valid in the domain they are define they are e.g. not returned in the tokenGroups for users from other domains because we are sending this request to a DC of the remote domain the user is coming from. So we have to add membership in "domain local" groups from the local domain in an additional run and here we are only interested in the groups from the local domain. HTH bye, |
Thanks for the explanation. ACK. |
While looking up group memberships from the cache only groups from the
user's domain were taken into account because of the cache search base.
As a result memberships in other domains were not updated.
With this patch the whole cache is searched and hence memberships from
all domains will be updated.
Resolves: #7921