RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1855323 - When ad_gpo_implicit_deny is True, it is permitting users to login when no gpo is applied
Summary: When ad_gpo_implicit_deny is True, it is permitting users to login when no gp...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: sssd
Version: 8.3
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: 8.0
Assignee: Sumit Bose
QA Contact: sssd-qe
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-07-09 14:48 UTC by Dan Lavu
Modified: 2021-09-03 15:13 UTC (History)
12 users (show)

Fixed In Version: sssd-2.3.0-9.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-04 02:05:29 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github SSSD sssd issues 5061 0 None closed [RFE] Add a new mode for ad_gpo_implicit_deny 2020-11-03 01:43:31 UTC
Red Hat Product Errata RHBA-2020:4569 0 None None None 2020-11-04 02:05:42 UTC

Description Dan Lavu 2020-07-09 14:48:19 UTC
Description of problem:
In RHEL7.9 the behavior of ad_gpo_implicit_deny = True is that no user is allowed to login if there is no GPO. While testing in RHEL8.3, all users are able to login.



Version-Release number of selected component (if applicable):
 sssd-2.3.0-2.el8.x86_64.rpm

How reproducible:
Always

Steps to Reproduce:
1. Execute ad_gpo_hbac test suite for 8.3 and ensure that 'parent domain changed default behavior from allow any to deny any' passes
2. Or set ad_gpo_implicit_deny = True with no gpo linked at all except the default domain policy and the users should not be able to login

Actual results:

Users can login

2020-07-09T09:31:27 [ci-vm-10-0-105-228.h] :: [ 05:31:27 ] :: [   LOG    ] :: Unlinking GPO from parent domain
2020-07-09T09:31:27 [ci-vm-10-0-105-228.h] :: [ 05:31:27 ] :: [   LOG    ] :: Unlinking site_policy
2020-07-09T09:32:09 [ci-vm-10-0-105-228.h] :: [ 05:32:09 ] :: [  BEGIN   ] :: Running 'ssh_user_password_login 
2020-07-09T09:32:15 [ci-vm-10-0-105-228.h] :: [ 05:32:15 ] :: [   FAIL   ] :: Command 'ssh_user_password_login 'allowed_user' Secret123' (Expected 255, got 0)
2020-07-09T09:32:15 [ci-vm-10-0-105-228.h] :: [ 05:32:15 ] :: [  BEGIN   ] :: Running 'ssh_user_password_login 'allowed_user1' Secret123'
2020-07-09T09:32:15 [ci-vm-10-0-105-228.h] spawn ssh -o StrictHostKeyChecking=no -o GSSAPIAuthentication=no -o PubkeyAuthentication=no -o NumberOfPasswordPrompts=1 -l allowed_user1 localhost
2020-07-09T09:32:21 [ci-vm-10-0-105-228.h] :: [ 05:32:21 ] :: [   FAIL   ] :: Command 'ssh_user_password_login 'allowed_user1' Secret123' (Expected 255, got 0)
2020-07-09T09:32:21 [ci-vm-10-0-105-228.h] :: [ 05:32:21 ] :: [  BEGIN   ] :: Running 'ssh_user_password_login 'regular_user' Secret123'
2020-07-09T09:32:26 [ci-vm-10-0-105-228.h] :: [ 05:32:26 ] :: [   FAIL   ] :: Command 'ssh_user_password_login 'regular_user' Secret123' (Expected 255, got 0)

2020-07-09T09:32:27 [ci-vm-10-0-105-228.h] :: [ 05:32:26 ] :: [  BEGIN   ] :: Running 'ssh_user_password_login 'denied_user' Secret123'
2020-07-09T09:32:27 [ci-vm-10-0-105-228.h] spawn ssh -o StrictHostKeyChecking=no -o GSSAPIAuthentication=no -o PubkeyAuthentication=no -o NumberOfPasswordPrompts=1 -l denied_user localhost
2020-07-09T09:32:27 [ci-vm-10-0-105-228.h] To register this system, run: insights-client --register
2020-07-09T09:32:27 [ci-vm-10-0-105-228.h] Last failed login: Thu Jul  9 05:31:26 EDT 2020 from ::1 on ssh:notty
2020-07-09T09:32:27 [ci-vm-10-0-105-228.h] There were 10 failed login attempts since the last successful login.
2020-07-09T09:32:27 [ci-vm-10-0-105-228.h] Last login: Thu Jul  9 05:19:30 2020 from ::1
2020-07-09T09:32:32 [ci-vm-10-0-105-228.h] exit
2020-07-09T09:32:32 [ci-vm-10-0-105-228.h] logout
2020-07-09T09:32:32 [ci-vm-10-0-105-228.h] Connection to localhost closed.
2020-07-09T09:32:32 [ci-vm-10-0-105-228.h] :: [ 05:32:32 ] :: [   FAIL   ] :: Command 'ssh_user_password_login 'denied_user' Secret123' (Expected 255, got 0)

Expected results:

Users cannot login




Additional info:

Comment 1 Sumit Bose 2020-07-09 14:56:22 UTC
Upstream ticket:
https://github.com/SSSD/sssd/issues/5061

Comment 7 Alexey Tikhonov 2020-08-13 07:00:45 UTC
There is RHEL7 bz 1837020 that looks very similar (and I cloned it to RHEL8 bz 1868387)
Are those really the same or different?

Comment 8 Sumit Bose 2020-08-13 08:37:16 UTC
(In reply to Alexey Tikhonov from comment #7)
> There is RHEL7 bz 1837020 that looks very similar (and I cloned it to RHEL8
> bz 1868387)
> Are those really the same or different?

Hi,

different, in bz 1837020 there are no applicable GPOs left after a second filtering and this is fixed by Pawel's patch. Here we have applicable GPOs but none with an allow rule so since ad_gpo_implicit_deny is set, access should be rejected, which requires another patch.

HTH

bye,
Sumit

Comment 11 Pavel Březina 2020-09-03 11:08:40 UTC
Pushed PR: https://github.com/SSSD/sssd/pull/5241

* `master`
    * 69e1f5fe79806a530e90c8af09bedd3b9e6b4dac - GPO: respect ad_gpo_implicit_deny when evaluation rules

Comment 24 Dan Lavu 2020-09-21 22:13:39 UTC
Verified against sssd-2.3.0-9.el8.x86_64


2020-09-21T21:39:48 [ci-vm-10-0-154-95.ho]  +-----------------------------------------------------------------------------------------+
2020-09-21T21:39:48 [ci-vm-10-0-154-95.ho]      Test:[/sssd/rhel83/client/ad_provider/ad_gpo_hbac/root]: [ Pass(14/14): 100% ] 
2020-09-21T21:39:48 [ci-vm-10-0-154-95.ho]  +-----------------------------------------------------------------------------------------+
2020-09-21T21:39:48 [ci-vm-10-0-154-95.ho] [   PASS   ] ::   parent domain gpo is disabled
2020-09-21T21:39:48 [ci-vm-10-0-154-95.ho] [   PASS   ] ::   parent domain gpo is enforcing
2020-09-21T21:39:48 [ci-vm-10-0-154-95.ho] [   PASS   ] ::   parent domain gpo is enforcing with no gpo applied
2020-09-21T21:39:48 [ci-vm-10-0-154-95.ho] [   PASS   ] ::   parent domain gpo is permissive
2020-09-21T21:39:48 [ci-vm-10-0-154-95.ho] [   PASS   ] ::   parent domain testing domain and ou inheritance
2020-09-21T21:39:48 [ci-vm-10-0-154-95.ho] [   PASS   ] ::   parent domain testing gpo mapping
2020-09-21T21:39:48 [ci-vm-10-0-154-95.ho] [   PASS   ] ::   parent domain gpo child fails when log is enabled in smb bz1177140
2020-09-21T21:39:48 [ci-vm-10-0-154-95.ho] [   PASS   ] ::   parent domain sssd crashes intermittently in GPO code bz1206092 bz1204203
2020-09-21T21:39:48 [ci-vm-10-0-154-95.ho] [   PASS   ] ::   parent domain invalid/empty values in GptTmpl.inf bz1316164
2020-09-21T21:39:48 [ci-vm-10-0-154-95.ho] [   PASS   ] ::   parent domain gpos code ignores ad_site option
2020-09-21T21:39:48 [ci-vm-10-0-154-95.ho] [   PASS   ] ::   parent domain changed default behavior from allow any to deny any
2020-09-21T21:39:48 [ci-vm-10-0-154-95.ho] [   PASS   ] ::   parent domain sssd doesn't follow the link order of AD Group Policy Management
2020-09-21T21:39:48 [ci-vm-10-0-154-95.ho] [   PASS   ] ::   parent domain Don't ignore host entries in Group Policy security filters
2020-09-21T21:39:48 [ci-vm-10-0-154-95.ho] [   PASS   ] ::   parent domain skip GPOs that have groupPolicyContainers unreadable by sssd
2020-09-21T21:39:48 [ci-vm-10-0-154-95.ho]  +----------------------------------------------------------------------+

Comment 27 errata-xmlrpc 2020-11-04 02:05:29 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 (sssd bug fix and enhancement update), 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-2020:4569


Note You need to log in before you can comment on or make changes to this bug.