question on SSSD, keytab refresh and host tickets

Posted by Unexpected_Cranberry@reddit | linuxadmin | View on Reddit | 9 comments

So, I'm trying to get smart card authentication working reliably in an environment with Redhat 9.x clients joined to Active Directory.

We've now gotten to a point where we can get it working, but only for a while.

The issue we're seeing is a case mismatch between entries in the keytab and a jproxy implementation trying to authenticate.

When a machine is freshly joined, the keytab contains records for the client in both upper and lower case, like so

host/COMPUTER\$@REALM
HOST/COMPUTER\$@REALM

With that, everything works fine. However, once the password rotation happens and the keytab is refreshed, we're only getting the upper case ticket. This breaks authentication and you see an error in the secure log

credential verification failed: Cannot find key for host/COMPUTER\$@REALM kvno x in keytab

Looking in the keytab, I can see that there is no entry for kvno x with a lower case host/, only upper case.

I've been trying to figure out what's going on. We are currently joining the machines using net rather than realm, not sure if that's what is tripping us up. I'm wondering if this is something anyone has seen before and knows how to solve. If there's something I can add to sssd.conf that would be easier than trying to convince the Linux team to switch from net to realm...

I have a test environment, and I haven't seen the issue there yet. I'm not sure how to simulate a password refresh to see if I can break my test environment in the same way as prod is currently broken.