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 1498347 - Fallback to admin_server if kpasswd_server is not set does not work
Summary: Fallback to admin_server if kpasswd_server is not set does not work
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: krb5
Version: 7.4
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: rc
: ---
Assignee: Robbie Harwood
QA Contact: Filip Dvorak
URL: https://github.com/krb5/krb5/pull/864
Whiteboard:
Depends On: 1640272
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-10-04 05:31 UTC by Sumit Bose
Modified: 2020-03-31 19:41 UTC (History)
3 users (show)

Fixed In Version: krb5-1.15.1-45.el7
Doc Type: No Doc Update
Doc Text:
Clone Of:
: 1640271 (view as bug list)
Environment:
Last Closed: 2020-03-31 19:41:21 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:1029 0 None None None 2020-03-31 19:41:40 UTC

Description Sumit Bose 2017-10-04 05:31:38 UTC
Description of problem:

According to the krb5.conf man page
                                                                                                                                                                                                                                             
"""                                                                                                                                                                                                                                         
       kpasswd_server                                                                                                                                                                                                                       
              Points to the server where all the password changes are                                                                                                                                                                       
performed.  If there is no such entry, the port 464 on the admin_server                                                                                                                                                                     
host will be tried.                                                                                                                                                                                                                         
"""

In my testing it looked like libkrb5 is doing a DNS SRV lookup if no kpasswd_server is defined and does not fall back to admin_server immediately. This can cause issues in an environment with multiple KDCs with replicated data base backend (e.g. AD or IPA) because the password change will be done on one KDC while the next AS request will go to a different one where the new password is not replicated yet. Setting a single server as kdc and admin_server in krb5.conf should prevent this according to the man page.

If the current behavior is expected then imo at least the man page should be enhanced to describe the expected behavior.

Of course 'dns_lookup_kdc' can be used to control the behavior but I think the admin_server fallback should work independently of this setting. 'dns_lookup_kdc' might be needed by other realms. Additionally the lookups schemes in libkrb5 are ordered (iirc locator plugin, krb5.conf, DNS) and I think it would be more clear if all krb5.conf settings are evaluated first before switching to DNS.

Comment 2 Robbie Harwood 2017-10-05 21:12:47 UTC
So reading into the code: the fallback happens after querying DNS, and it looks pretty intentional.  I've raised the issue with upstream as to which direction they want the discrepancy resolved in.

Comment 3 Robbie Harwood 2017-10-10 18:11:50 UTC
The most attractive thing to do is to disable dns for a realm when any servers are defined for it.  Unfortunately this is not viable since it breaks with kadmin (and upstream says it would break MIT's realm deployment as well).

So there are really three things krb5 could do here:

1) Change nothing; document this behavior and move on.

2) Make an option to disable DNS on a per-realm basis: probably this would just be making dns_lookup_kdc settable in the realm stanza, rather than just [libdefaults].

3) Allow setting entries to explicitly empty ("") to indicate that DNS should be skipped for them.

My impression is that you all would prefer option (2).  Is that right?

Comment 4 Sumit Bose 2017-10-11 08:05:16 UTC
I think 2) would be a nice and useful feature.

However I think documentation part of 1) should be done as well. And this might even be sufficient for the IPA server use case, because even if 2) is implemented the realm section in krb5.conf on the IPA server must be edited. Either the new option to disable DNS must be added or a kpasswd_server entry.

Comment 11 errata-xmlrpc 2020-03-31 19:41:21 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-2020:1029


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