Bug 1002591

Summary: Cached credentials aren't working with sssd-ad UPN logins
Product: Red Hat Enterprise Linux 7 Reporter: Dmitri Pal <dpal>
Component: sssdAssignee: Jakub Hrozek <jhrozek>
Status: CLOSED CURRENTRELEASE QA Contact: Jeremy Agee <jagee>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0CC: grajaiya, jagee, jgalipea, kbanerje, lslebodn, mkosek, pbrezina
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: sssd-1.11.1-1.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-13 11:45:36 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Dmitri Pal 2013-08-29 13:46:55 UTC
This bug is created as a clone of upstream ticket:
https://fedorahosted.org/sssd/ticket/2060

Ticket was cloned from Red Hat Bugzilla (product ''Fedora''): [https://bugzilla.redhat.com/show_bug.cgi?id=1001310 Bug 1001310]

{{{
Description of problem:

Using SSSD AD and a UPN username login (i.e where the UPN name doesn't equal
the domain name) succeeds correctly when connected to the network. However the
user in unable to login when offline. Cached credentials aren't working.

Version-Release number of selected component (if applicable):
sssd-1.11.0-0.1.beta2.fc19.x86_64

How reproducible:
Everytime

Steps to Reproduce:
1.Login whilst connected to the network
2.Logout
3.Disconnect network cable
4.Attempt to login when off the network

Actual results:
Unable to login off the network

Expected results:
Login succeeds off the network

Additional info:

I can't guarantee this is due to UPN logins, but I'm guessing due to presumably
cached credentials working for users on simpler domains. I have no way of
testing this.

My very un-sssd expert eyes seem to indicate that sssd is losing the username
(lots of name "(unknown)" appearing) somewhere in the process.

(Mon Aug 26 19:08:08 2013) [sssd[nss]] [check_cache] (0x0400): Cached entry is
valid, returning..
(Mon Aug 26 19:08:08 2013) [sssd[nss]] [nss_cmd_initgroups_search] (0x0400):
Initgroups for [colin] completed
(Mon Aug 26 19:08:08 2013) [sssd[nss]] [reset_idle_timer] (0x4000): Idle timer
re-set for client [0x7f08383b83d0][20]ion
(Mon Aug 26 19:08:08 2013) [sssd[nss]] [reset_idle_timer] (0x4000): Idle timer
re-set for client [0x7f08383b83d0][20]
(Mon Aug 26 19:08:08 2013) [sssd[nss]] [nss_cmd_getbynam] (0x0400): Running
command [17] with input [(unknown)].
(Mon Aug 26 19:08:08 2013) [sssd[nss]] [sss_parse_name_for_domains] (0x0200):
name '(unknown)' matched without domain, user is (unknown)
(Mon Aug 26 19:08:08 2013) [sssd[nss]] [sss_parse_name_for_domains] (0x0200):
using default domain [(null)]
(Mon Aug 26 19:08:08 2013) [sssd[nss]] [nss_cmd_getbynam] (0x0100): Requesting
info for [(unknown)] from [<ALL>]
(Mon Aug 26 19:08:08 2013) [sssd[nss]] [sss_ncache_check_str] (0x2000):
Checking negative cache for [NCE/USER/iongeo.lan/(unknown)]
(Mon Aug 26 19:08:08 2013) [sssd[nss]] [nss_cmd_getpwnam_search] (0x0400): User
[(unknown)] does not exist in [iongeo.lan]! (negative cache)
(Mon Aug 26 19:08:08 2013) [sssd[nss]] [nss_cmd_getpwnam_search] (0x0080): No
matching domain found for [(unknown)], fail!
(Mon Aug 26 19:08:08 2013) [sssd[nss]] [reset_idle_timer] (0x4000): Idle timer
re-set for client [0x7f08383b83d0][20]
(Mon Aug 26 19:08:08 2013) [sssd[nss]] [reset_idle_timer] (0x4000): Idle timer
re-set for client [0x7f08383b83d0][20]
(Mon Aug 26 19:08:08 2013) [sssd[nss]] [nss_cmd_getbynam] (0x0400): Running
command [17] with input [(unknown)].
(Mon Aug 26 19:08:08 2013) [sssd[nss]] [sss_parse_name_for_domains] (0x0200):
name '(unknown)' matched without domain, user is (unknown)
(Mon Aug 26 19:08:08 2013) [sssd[nss]] [sss_parse_name_for_domains] (0x0200):
using default domain [(null)]
(Mon Aug 26 19:08:08 2013) [sssd[nss]] [nss_cmd_getbynam] (0x0100): Requesting
info for [(unknown)] from [<ALL>]
}}}

Comment 1 Jakub Hrozek 2013-08-29 17:22:09 UTC
We know the root cause -> ASSIGNED

Comment 2 Jakub Hrozek 2013-09-23 15:04:58 UTC
Fixed upstream.

Comment 4 Jakub Hrozek 2013-10-04 13:24:02 UTC
Temporarily moving bugs to MODIFIED to work around errata tool bug

Comment 6 Jeremy Agee 2014-01-28 20:26:07 UTC
Tested and verified manually, working on automated test plan 

1. Alternative UPN Suffix test_sssdad.in created in root of the AD forest.

2. Created a user in the following 3 domains and set there UPN to alt suffix listed above.
sssdad.com
child1.sssdad.com
sssdad_tree.com

3. logged on with each users with caching enabled.

4. blocked all 3 domain controllers with iptables rules.

5. Successfully logged in again with all three users and checked debug logs to confirm offline logins.

Comment 7 Ludek Smid 2014-06-13 11:45:36 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.