Bug 1570480

Summary: CUPS cannot authorize users obtained from external identity servers by sssd when ignore_group_member options is on
Product: Red Hat Enterprise Linux 7 Reporter: Masahiro Matsuya <mmatsuya>
Component: cupsAssignee: Zdenek Dohnal <zdohnal>
Status: CLOSED ERRATA QA Contact: Petr Sklenar <psklenar>
Severity: high Docs Contact: Marc Muehlfeld <mmuehlfe>
Priority: high    
Version: 7.4CC: akhomic1, drehak, fkrska, kludhwan, mdolezel, thozza, zdohnal
Target Milestone: rcKeywords: Patch
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: cups-1.6.3-39.el7 Doc Type: Bug Fix
Doc Text:
.CUPS no longer denies access if SSSD running on the same server is configured with `ignore_group_members = true` When System Security Services Daemon (SSSD) uses the `ignore_group_members = true` setting in the `/etc/sssd/sssd.conf` file, the `getgrnam()` function returns the group structure without group members of groups retrieved by SSSD. This is expected behavior. Previously, CUPS used only `getgrnam()` to verify if a user is a member of a group. As a consequence, if SSSD was configured with the mentioned setting on a CUPS server that used groups to allow access to the server for members of a group, CUPS denied access to users in these groups. With this update, CUPS now additionally uses the `getgrouplist()` function, which returns group members even if SSSD is configured with `ignore_group_members = true`. As a result, CUPS correctly determines access based on group memberships in the mentioned scenario.
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-08-06 12:39:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1630913, 1663257    

Description Masahiro Matsuya 2018-04-23 03:57:30 UTC
Description of problem:

This is related with https://bugzilla.redhat.com/show_bug.cgi?id=1204379 (fedora bug).

A customer's CUPS server uses AD group for web UI access.
But, he could not access with a user in AD group. sssd is configured properly,
and groups command can return the correct groups including AD group.

After some investigation by customer, the following upstream patch was found to fix the problem. getgrouplist() is used to get group information by the patch.

 https://github.com/apple/cups/commit/6eb98aee93be531b09425ea4bce86cfe05e8b4ef

The customer confirmed that the patch fixed the problem with a test package.
Could you backport this patch into RHEL7.

Version-Release number of selected component (if applicable):
Red Hat Enterprise Linux 7

How reproducible:
Always

Steps to Reproduce:
1. Configure sssd for AD user and group
2. ignore_group_members = true may be needed in sssd.conf for reproduction.
It's used to speed up authentication. As the result, getent group <group> doesn't return members. But, id command can list all groups including AD group.
It's expected. 
3. configure CUPS to allow to access Web UI for a user in a AD group.

Actual results:
cannot access WEB UI with a user in the AD group which was permitted in CUPS configuration.

Expected results:
can access WEB UI

Comment 2 Zdenek Dohnal 2018-11-05 10:08:29 UTC
*** Bug 1644641 has been marked as a duplicate of this bug. ***

Comment 22 errata-xmlrpc 2019-08-06 12:39:53 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:2058