Bug 225451 - OpenSSH only looks for .k5login in user directory
Summary: OpenSSH only looks for .k5login in user directory
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords: patch, security
Depends on:
Blocks:
 
Reported: 2018-01-25 15:18 UTC by Mark Felder
Modified: 2022-09-09 14:23 UTC (History)
4 users (show)

See Also:


Attachments
k5login_directory patch (2.56 KB, patch)
2018-01-25 15:18 UTC, Mark Felder
no flags Details | Diff
Option to control k5users in sshd.conf (5.58 KB, patch)
2018-01-25 15:19 UTC, Mark Felder
no flags Details | Diff
restore the usage of krb5_kuserok() so that localauth plugins can be used (13.02 KB, patch)
2018-01-25 15:22 UTC, Mark Felder
no flags Details | Diff
additional .k5users and .k5login checks to compliment previous patches (8.24 KB, patch)
2018-01-25 15:24 UTC, Mark Felder
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Felder freebsd_committer freebsd_triage 2018-01-25 15:18:55 UTC
Created attachment 190054 [details]
k5login_directory patch

RedHat patched this. It would be nice if we did the same:

https://bugzilla.redhat.com/show_bug.cgi?id=1328243


They give the ability to *disable* this feature entirely, which is what I was trying to do, as well as added some extra safetybelts.

Attaching relevant patches that RedHat has cooked up for Kerberos.
Comment 1 Mark Felder freebsd_committer freebsd_triage 2018-01-25 15:19:46 UTC
Created attachment 190055 [details]
Option to control k5users in sshd.conf
Comment 2 Mark Felder freebsd_committer freebsd_triage 2018-01-25 15:22:05 UTC
Created attachment 190056 [details]
restore the usage of krb5_kuserok() so that localauth plugins can be used
Comment 3 Mark Felder freebsd_committer freebsd_triage 2018-01-25 15:24:54 UTC
Created attachment 190057 [details]
additional .k5users and .k5login checks to compliment previous patches
Comment 4 Mark Felder freebsd_committer freebsd_triage 2018-03-30 14:47:06 UTC
This also breaks gssapi-with-mic if your user homedir is locked down with mode 700.
Comment 5 Cy Schubert freebsd_committer freebsd_triage 2018-05-16 00:48:31 UTC
The current behavior is consistent with krb5.

https://web.mit.edu/kerberos/krb5-latest/doc/user/user_config/k5login.html

Could the RH patches be an option in the security/openssh-portable port?
Comment 6 Dan Mahoney 2022-09-08 23:52:49 UTC
(In reply to Cy Schubert from comment #5)

Cy, apologies for opening an old bug: this is a supported feature in mit krb5:

https://web.mit.edu/kerberos/krb5-latest/doc/admin/conf_files/krb5_conf.html#krb5-conf-5

In our case, we'd want to deny users the ability to use their own k5login, such that you only required a "special" auth token (like user/ssh@DOMAIN.COM)

It seems a valid use case for this.

-Dan
Comment 7 Cy Schubert freebsd_committer freebsd_triage 2022-09-09 14:23:11 UTC
(In reply to Dan Mahoney from comment #6)
OpenSSH in base uses Heimdal, not MIT. Heimdal does not necessarily support all MIT features.

And, our Heimdal is 1.5. I am working on replacing it with 7.7.0 (unfortunately there is a serious regression). We should not add any custom patches to our ancient Heimdal until this work complete because any new patches may not be ported over.

Have you tried opessh-portable using the MIT port?