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

sdap: add search_bases option to groups_by_user_send() #7145

Closed

Conversation

sumit-bose
Copy link
Contributor

@sumit-bose sumit-bose commented Jan 24, 2024

AD handles users and computer objects very similar and so does SSSD's
GPO code when lookup up the host's group-memberships. But users and
computers might be stored in different sub-tree of the AD LDAP tree and
if a dedicated user search base is given with the ldap_user_search_base
option in sssd.conf the host object might be in a different sub-tree. To
make sure the host can still be found this patch uses the base DN of
the LDAP tree when searching for hosts in the GPO code.

Resolves: #5708

@sumit-bose sumit-bose changed the title pam: fix SC auth with multiple certs and missing login name sdap: add search_bases option to groups_by_user_send() Jan 24, 2024
@alexey-tikhonov
Copy link
Member

IIUC, this is an addition to #7107

@thalman thalman self-assigned this Jan 24, 2024
@sumit-bose sumit-bose force-pushed the gpo_host_groups_search_base_fix branch 2 times, most recently from 9dc9c38 to 2352d02 Compare January 25, 2024 13:19
@andreboscatto andreboscatto assigned pbrezina and aplopez and unassigned pbrezina Jan 25, 2024
src/providers/ldap/sdap.c Outdated Show resolved Hide resolved
@alexey-tikhonov alexey-tikhonov removed the request for review from justin-stephenson January 29, 2024 10:57
src/providers/ldap/sdap.c Outdated Show resolved Hide resolved
AD handles users and computer objects very similar and so does SSSD's
GPO code when lookup up the host's group-memberships. But users and
computers might be stored in different sub-tree of the AD LDAP tree and
if a dedicated user search base is given with the ldap_user_search_base
option in sssd.conf the host object might be in a different sub-tree. To
make sure the host can still be found this patch uses the base DN of
the LDAP tree when searching for hosts in the GPO code.

Resolves: SSSD#5708
@aplopez
Copy link
Contributor

aplopez commented Feb 9, 2024

Looks good to me. Thank you the changes.

src/providers/ad/ad_gpo.c Outdated Show resolved Hide resolved
The naming_context could be a more reliable source than basedn for the
actual base DN because basedn is set very early from the domain name
given in sssd.conf. Although it is recommended to use the fully
qualified DNS domain name here it is not required. As a result basedn
might not reflect the actual based DN of the LDAP server. Also pure LDAP
server (i.e. not AD or FreeIPA) might use different schemes to set the
base DN which will not be based on the DNS domain of the LDAP server.

Resolves: SSSD#5708
@sumit-bose sumit-bose force-pushed the gpo_host_groups_search_base_fix branch from a7502fc to d7576f0 Compare February 9, 2024 14:01
Copy link
Contributor

@thalman thalman left a comment

Choose a reason for hiding this comment

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

Thanks for the update, ACK

@alexey-tikhonov
Copy link
Member

Pushed PR: #7145

  • master
    • a153f13 - sdap: add naming_context as new member of struct sdap_domain
    • 29a77c6 - sdap: add search_bases option to groups_by_user_send()
  • sssd-2-8
    • 04c0279 - sdap: add naming_context as new member of struct sdap_domain
    • 151ba69 - sdap: add search_bases option to groups_by_user_send()
  • sssd-2-9
    • 6a8e60d - sdap: add naming_context as new member of struct sdap_domain
    • a7621a5 - sdap: add search_bases option to groups_by_user_send()

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

Successfully merging this pull request may close these issues.

SSSD incorrectly works with AD GPO during user login
6 participants