Bug 1733289 - Password expiry notifications to AD clients no longer work due to regression from fix for bug 1385665
Summary: Password expiry notifications to AD clients no longer work due to regression ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: krb5
Version: 7.6
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Robbie Harwood
QA Contact: Filip Dvorak
lmcgarry
URL: https://github.com/krb5/krb5/pull/1056
Whiteboard:
Depends On: 1805628
Blocks: 1820311
TreeView+ depends on / blocked
 
Reported: 2019-07-25 15:37 UTC by afox@redhat.com
Modified: 2020-09-29 20:19 UTC (History)
15 users (show)

Fixed In Version: krb5-1.15.1-50.el7
Doc Type: Bug Fix
Doc Text:
.Password expiration notifications sent to AD clients using SSSD Previously, Active Directory clients (non-IdM) using SSSD were not sent password expiration notices because of a recent change in the SSSD interface for acquiring Kerberos credentials. The Kerberos interface has been updated and expiration notices are now sent correctly.
Clone Of:
: 1805628 1820311 (view as bug list)
Environment:
Last Closed: 2020-09-29 20:19:38 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:3982 0 None None None 2020-09-29 20:19:45 UTC

Description afox@redhat.com 2019-07-25 15:37:41 UTC
Description of problem:
Password expiry notifications to AD clients with SSSD no longer work due to regression from fix for bug 1385665.

Version-Release number of selected component (if applicable):
sssd-client-1.16.0-19.el7_5.8.x86_64


How reproducible:
Always

Steps to Reproduce:
1) Configure sssd to use auth_provider=krb5 or ad.
2) Configure short password expiry for user in AD. 

Actual results:
No expiry message is sent to any client e.g. gnome, ssh etc. 

Expected results:
Expiry message should be seen.

Comment 3 Jakub Hrozek 2019-07-26 15:07:09 UTC
My first suggestion would be to not use the private version of krb5_get_init_creds_password() even if it means regressing the other bug.

Looking at how libkrb5 implements the password expiration, we'd need to inspect the AS reply and the only API that libkrb5 publicly makes available that returns struct krb5_kdc_rep is marked as deprecated. So reimplementing the functionality looks non-trivial. But moreover, I'm worried that we would be constantly missing some fixes or changes to the recommended krb5_get_init_creds_password..

Comment 4 Jakub Hrozek 2019-08-07 19:57:35 UTC
To capture the discussion we had last week on our team meeting:
 - we would ask MIT to provide an API to access the needed data
 - in the meantime, we could suggest using auth_provider=krb5. This should have no functional regression compared with auth_provider=ad as long as the following two options are set:
   - krb5_validate = true
   - krb5_use_enterprise_principal = true

Comment 5 Sumit Bose 2020-02-29 15:36:39 UTC
Hi,

it looks like a new API is not strictly needed.

Robbie, can you have a look at https://github.com/sumit-bose/krb5/commit/036888a75c875f4ab4b850967bec47ab421bc276 and let me know if the change makes sense and would be worth for a pull-request.

Thanks.

bye,
Sumit

Comment 6 Robbie Harwood 2020-03-04 16:24:31 UTC
Hi Sumit, I've reviewed it and it looks reasonable to me.  I think we should propose it (I assume you want to do this, but I'm willing to handle it if that's easier).

My understanding is that that change by itself will fix the SSSD issue; is that right?  If so, it seems like we should move this bug to krb5.

Comment 7 Sumit Bose 2020-03-19 13:06:51 UTC
(In reply to Robbie Harwood from comment #6)
> Hi Sumit, I've reviewed it and it looks reasonable to me.  I think we should
> propose it (I assume you want to do this, but I'm willing to handle it if
> that's easier).

Hi Robbie,

thanks for the feedback. I updated the description of krb5_get_init_creds_opt_set_expire_callback() in krb5.hin in the latest version in https://github.com/sumit-bose/krb5/commits/warn_pw_expiry. It looks like the preferred way to contribute is a pull-request on github, I will create one. 

> 
> My understanding is that that change by itself will fix the SSSD issue; is
> that right?  If so, it seems like we should move this bug to krb5.

Yes, with the modified libkrb5 SSSD can receive the password expiration data automatically again, no changes needed on the SSSD side.

bye,
Sumit

Comment 8 Sumit Bose 2020-03-24 14:55:52 UTC
Hi,

I created https://github.com/krb5/krb5/pull/1056 and as suggested by Robbie in comment #6 I move this ticket to krb5. If the pull-request is not accepted please move the ticket back to SSSD so that we can think about alternative solutions.

bye,
Sumit

Comment 24 errata-xmlrpc 2020-09-29 20:19:38 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 (krb5 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:3982


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