Bug 1129244 - KDC locator is misbehaving when only master_kdc is specified in krb5.conf
Summary: KDC locator is misbehaving when only master_kdc is specified in krb5.conf
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: krb5
Version: 20
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Roland Mainz
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-08-12 11:26 UTC by Petr Spacek
Modified: 2015-09-08 17:27 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-06-29 22:02:22 UTC


Attachments (Terms of Use)

Description Petr Spacek 2014-08-12 11:26:45 UTC
Description of problem:
Kerberos library behaves strangely in case where krb5.conf defines only "master_kdc" without "kdc". Please see steps to preproduce.

Version-Release number of selected component (if applicable):
krb5-libs-1.11.5-10.fc20.x86_64

How reproducible:
100 %

Steps to Reproduce:
Define following krb5.conf:

[realms]
 IPA.EXAMPLE = {
  master_kdc = vm-108.ipa.example.:88
  admin_server = vm-108.ipa.example.:749
  default_domain = ipa.example
}

And try following commands. I'm using environment variable KRB5_TRACE=/dev/stdout to get some debug information.

$ kinit -kt /etc/named.keytab DNS/pspacek.ipa.example@IPA.EXAMPLE
This works as expected, i.e. contacts KDC vm-108.ipa.example and obtains TGT.


All further attempts to get service tickets or renew TGT fail:

$ kinit -R -kt /etc/named.keytab DNS/pspacek.ipa.example@IPA.EXAMPLE
kinit -R  DNS/pspacek.brq.redhat.com@IPA.EXAMPLE
Using default cache: /tmp/krb5cc_0
Using principal: DNS/pspacek.brq.redhat.com@IPA.EXAMPLE
[4464] 1407842478.143475: Retrieving DNS/pspacek.brq.redhat.com@IPA.EXAMPLE -> krbtgt/IPA.EXAMPLE@IPA.EXAMPLE from FILE:/tmp/krb5cc_0 with result: 0/Success
[4464] 1407842478.143518: Get cred via TGT krbtgt/IPA.EXAMPLE@IPA.EXAMPLE after requesting krbtgt/IPA.EXAMPLE@IPA.EXAMPLE (canonicalize off)
[4464] 1407842478.143598: Generated subkey for TGS request: aes256-cts/2203
[4464] 1407842478.143725: etypes requested in TGS request: aes256-cts, aes128-cts, des3-cbc-sha1, rc4-hmac, camellia128-cts, camellia256-cts
[4464] 1407842478.144055: Encoding request body and padata into FAST request
[4464] 1407842478.144219: Sending request (975 bytes) to IPA.EXAMPLE
[4464] 1407842478.144356: Got cred; -1765328230/Cannot find KDC for requested realm
kinit: Cannot find KDC for requested realm while renewing credentials


$ kvno ldap/vm-108.ipa.example
kvno  ldap/vm-108.ipa.example
[4485] 1407842533.699452: Getting credentials DNS/pspacek.brq.redhat.com@IPA.EXAMPLE -> ldap/vm-108.ipa.example@IPA.EXAMPLE using ccache FILE:/tmp/krb5cc_0
[4485] 1407842533.699864: Retrieving DNS/pspacek.brq.redhat.com@IPA.EXAMPLE -> ldap/vm-108.ipa.example@IPA.EXAMPLE from FILE:/tmp/krb5cc_0 with result: -1765328243/Matching credential not found
[4485] 1407842533.700055: Retrieving DNS/pspacek.brq.redhat.com@IPA.EXAMPLE -> krbtgt/IPA.EXAMPLE@IPA.EXAMPLE from FILE:/tmp/krb5cc_0 with result: 0/Success
[4485] 1407842533.700086: Found cached TGT for service realm: DNS/pspacek.brq.redhat.com@IPA.EXAMPLE -> krbtgt/IPA.EXAMPLE@IPA.EXAMPLE
[4485] 1407842533.700108: Requesting tickets for ldap/vm-108.ipa.example@IPA.EXAMPLE, referrals on
[4485] 1407842533.700171: Generated subkey for TGS request: aes256-cts/6C96
[4485] 1407842533.700267: etypes requested in TGS request: aes256-cts, aes128-cts, des3-cbc-sha1, rc4-hmac, camellia128-cts, camellia256-cts
[4485] 1407842533.700497: Encoding request body and padata into FAST request
[4485] 1407842533.700626: Sending request (986 bytes) to IPA.EXAMPLE
kvno: Cannot find KDC for requested realm while getting credentials for ldap/vm-108.ipa.example@IPA.EXAMPLE


Actual results:
It is hard to debug because it works partially, i.e. only for plain kinit but not for any further operation.

Expected results:
It should fail /or/ work in all cases.

Also, maybe the error message could be clearer. Roland had some ideas how to improve it.

Additional info:
Everything works fine when I add 'kdc' definition to krb5.conf.

Comment 1 Petr Spacek 2014-08-12 11:27:24 UTC
Note: This happens on machine *without* SSSD.

Comment 2 Roland Mainz 2014-08-12 15:19:04 UTC
AFAIK the kinit error message should be changed to include the KDC name to provide better diagnostics, e.g. change from...
-- snip --
kinit: Cannot find KDC for requested realm while renewing credentials
-- snip --
... to ...
-- snip --
kinit: Cannot find KDC 'chickenmonster.edu' for requested realm while renewing credentials
-- snip --
(in your case the string would've been empty to indicate that no KDC name was found)

Comment 3 Fedora Admin XMLRPC Client 2014-10-06 16:38:08 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 4 Fedora End Of Life 2015-05-29 12:37:05 UTC
This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '20'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 20 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 5 Fedora End Of Life 2015-06-29 22:02:22 UTC
Fedora 20 changed to end-of-life (EOL) status on 2015-06-23. Fedora 20 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


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