Bug 928 - Kerberos/GSSAPI authentication does not work with multihomed hosts
Summary: Kerberos/GSSAPI authentication does not work with multihomed hosts
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: Kerberos support (show other bugs)
Version: -current
Hardware: Other All
: P2 major
Assignee: OpenSSH Bugzilla mailing list
URL: http://marc.theaimsgroup.com/?l=opens...
Keywords:
: 1650 (view as bug list)
Depends on:
Blocks: V_6_9
  Show dependency treegraph
 
Reported: 2004-09-12 11:01 AEST by Darren Tucker
Modified: 2015-08-11 23:03 AEST (History)
10 users (show)

See Also:


Attachments
Add an option to select the gss_import hostname (5.82 KB, patch)
2004-09-17 20:49 AEST, Markus Moeller
no flags Details | Diff
Add new option to allow better operation on multi-homed hosts (5.67 KB, patch)
2006-09-11 00:04 AEST, Simon Wilkinson
no flags Details | Diff
sshd-gssapi-multihomed.patch (6.38 KB, text/plain)
2010-01-11 17:11 AEDT, Darren Tucker
no flags Details
openssh-6.8_p1-sshd-gssapi-multihomed.patch (5.34 KB, patch)
2015-03-19 04:16 AEDT, Mike Frysinger
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Darren Tucker 2004-09-12 11:01:47 AEST
It has been reported that Kerberos/GSSAPI authentication does not work with
multihomed hosts (see URL).

(To be clear: I don't use Kerberos and I can't judge the merit of the patch in
the URL.  I'm creating this bug so it can be tracked.)
Comment 1 Markus Moeller 2004-09-17 20:49:01 AEST
Created attachment 715 [details]
Add an option to select the gss_import hostname

This is a patch for version 3.9p1 and allows a new sshd configuration option
#GSSAPIImportHostname hostname
#GSSAPIImportHostname connection-ip
#GSSAPIImportHostname gss-c-no-name

hostname is the default setting. This should allow sshd to work on multihomed
systems.
Comment 2 Simon Wilkinson 2006-08-19 08:31:12 AEST
I'd rather see us move towards just using GSS_C_NO_NAME as the
acceptor credential. However, library support for this is still emerging.

[Sorry for the bad formatting of this, and my previous bug posts ...]
Comment 3 Simon Wilkinson 2006-09-11 00:04:52 AEST
Created attachment 1182 [details]
Add new option to allow better operation on multi-homed hosts

This fix takes advantage of recent movements in both Heimdal
and MIT Kerberos to support the use of GSS_C_NO_CREDENTIALS to
indicate that any credential in the default keytab may be used to
accept connections on a multi-homed host. 

The attached patch adds a new option, 'GSSAPIStrictAcceptorCheck', 
which defaults to 'yes'. If it is disabled, then GSS_C_NO_CREDENTIALS
is used instead of the default acceptor credential. This relies on the
system administrator only having trusted server keys in /etc/krb5.keytab
- but if they haven't, they've lost anyway.

Note that this patch needs to be applied after the code tidy up patch in
bug #1225
Comment 4 Damien Miller 2008-08-08 10:09:45 AEST
What are the risks to a server of having this option enabled?
Comment 5 Markus Moeller 2008-08-10 00:45:39 AEST
I don't see any additional risk to the server.
Markus
Comment 6 Simon Wilkinson 2008-08-10 00:58:27 AEST
The potential risk (with my patch, which is the correct way to implement this with modern Kerberos libraries) is that it allows any principal contained within the system keytab to be used, rather than just the host/hostname one.

However, Kerberos administrators already have to ensure that principals contained within the system keytab have the same, high, level of trust ascribed to them, so I don't believe that there is any practical increase in risk caused by applying this patch.

Simon.
Comment 7 Erinn Looney-Triggs 2009-07-15 02:44:56 AEST
Is there any movement in one direction or another on this patch?
Comment 8 Damien Miller 2009-08-18 06:29:24 AEST
only changes to portable OpenSSH are being considered for 5.3 at this stage.
Comment 9 Darren Tucker 2010-01-11 17:11:06 AEDT
Created attachment 1775 [details]
sshd-gssapi-multihomed.patch

I updated patch #1182 to OpenBSD current and fixed a few minor whitespace
things.  I also removed this warning from the man page:

+Note that this option applies only to protocol version 2 GSSAPI connections,
+and setting it to 
+.Dq no
+may only work with recent Kerberos GSSAPI libraries.

We would probably want to add that back in Portable.
Comment 10 Darren Tucker 2010-01-14 09:37:33 AEDT
*** Bug 1650 has been marked as a duplicate of this bug. ***
Comment 11 Simon Wilkinson 2010-02-06 22:34:09 AEDT
Sorry, this had dropped off my radar. I'll try and take a look at the patch soon.
Comment 12 Damien Miller 2010-08-03 15:40:52 AEST
We are freezing for the OpenSSH 5.6 release. Retargetting these bugs to the next release.
Comment 13 Damien Miller 2010-08-03 15:42:29 AEST
Targetting OpenSSH 5.7
Comment 14 Damien Miller 2011-01-24 12:30:48 AEDT
Retarget unclosed bugs from 5.7=>5.8
Comment 15 Paul Henson 2011-08-05 12:28:05 AEST
+1 on this, very useful for boxes behind a load balancer sharing a common dns name and host principal. Any idea if/when it might get applied?
Comment 16 Damien Miller 2011-09-06 10:34:13 AEST
Retarget unresolved bugs/features to 6.0 release
Comment 17 Damien Miller 2011-09-06 10:36:27 AEST
Retarget unresolved bugs/features to 6.0 release
Comment 18 Damien Miller 2011-09-06 10:39:01 AEST
Retarget unresolved bugs/features to 6.0 release

(try again - bugzilla's "change several" isn't)
Comment 19 Damien Miller 2012-02-24 10:34:21 AEDT
Retarget from 6.0 to 6.1
Comment 20 Damien Miller 2012-02-24 10:37:59 AEDT
Retarget 6.0 => 6.1
Comment 21 Tomas Mraz 2012-08-17 17:32:51 AEST
Any chance getting this to 6.1 or 6.2?
Comment 22 Damien Miller 2012-09-07 11:37:53 AEST
Retarget uncompleted bugs from 6.1 => 6.2
Comment 23 Damien Miller 2012-09-07 11:40:20 AEST
Retarget bugs from 6.1 => 6.2
Comment 24 Damien Miller 2013-03-08 10:23:29 AEDT
retarget to openssh-6.3
Comment 25 Paul Henson 2013-03-08 10:58:04 AEDT
This bug's been open over 8 years 8-/.

Is there an objection to applying the patch, or?
Comment 26 jotones 2013-03-11 23:17:01 AEDT
Good Morning, 

Apart of be very useful for systems behind load balancers, this patch is needed for High Availability Clusters.

We can not use Kerberos / GSSAPI without this patch in place and also it is very useful for Kerberos authentication and SSO.

Thanks, 

Jose Luist
Comment 27 Mantas M. [grawity] 2013-03-11 23:22:11 AEDT
MIT Krb5 v1.10 has an option [libdefaults] ignore_acceptor_hostname, which achieves the same functionality for all services using GSSAPI.
Comment 28 jotones 2013-03-11 23:42:56 AEDT
Hi, 

We are using IBM NAS Kerberos implementation. It is a MIT derived version unfortunatelly not upgraded to this MIT version.

Anyway have you tried it? I have dealed with this issue several years ago and I have to review it but I think that it is sshd whot is not accepting it. 

The Kerveros server side is reponsible to check the user credentials not the underlying Kerberos software. Sshd adds a extra check denying (almost in our case) access to the users who has not the hostname kerberos principal ticket.

Thanks for your response.

José Luis
Comment 29 Damien Miller 2013-07-25 12:17:35 AEST
Retarget to openssh-6.4
Comment 30 Damien Miller 2013-07-25 12:20:31 AEST
Retarget 6.3 -> 6.4
Comment 31 Damien Miller 2014-02-06 10:17:50 AEDT
Retarget incomplete bugs / feature requests to 6.6 release
Comment 32 Damien Miller 2014-02-06 10:19:44 AEDT
Retarget incomplete bugs / feature requests to 6.6 release
Comment 33 Damien Miller 2014-04-12 14:48:51 AEST
Retarget to 6.7 release, since 6.6 was mostly bugfixing.
Comment 34 Damien Miller 2014-04-12 14:53:33 AEST
Remove from 6.6 tracking bug
Comment 35 Damien Miller 2014-08-30 04:38:09 AEST
Retarget incomplete bugs to 6.8 release.
Comment 36 Damien Miller 2014-08-30 04:40:04 AEST
These bugs are no longer targeted at the imminent 6.7 release
Comment 37 Damien Miller 2015-03-03 07:59:08 AEDT
OpenSSH 6.8 is approaching release and closed for major work. Retarget these bugs for the next release.
Comment 38 Damien Miller 2015-03-03 08:01:23 AEDT
Retarget to 6.9
Comment 39 Mike Frysinger 2015-03-19 04:16:29 AEDT
Created attachment 2571 [details]
openssh-6.8_p1-sshd-gssapi-multihomed.patch
Comment 40 Damien Miller 2015-05-22 14:07:45 AEST
applied (at last). will be in openssh-6.9
Comment 41 Damien Miller 2015-08-11 23:03:44 AEST
Set all RESOLVED bugs to CLOSED with release of OpenSSH 7.1