Logging authorized key info
Nicolas Williams
Nicolas.Williams at ubsw.com
Fri Sep 28 23:39:55 EST 2001
On Thu, Sep 27, 2001 at 12:48:51PM -0400, Peter W wrote:
> On Thu, Sep 27, 2001 at 12:27:23PM -0400, Nicolas Williams wrote:
>
> > The key name field from the authorized_keys entry (or, missing that, the
> > public key fingerprint) should be logged.
>
> Do you mean the comment field? Since that's user-supplied, is there any
> concern about mischievous values? A hex-encoded fingerprint value on the
> other hand would always be safe/predictable & relatively short.
Yes, but the name field is controlled by the same person who controls
authorized_keys. What matters it that that person make it a *meaningful*
value.
> > Also, whichever is logged should be set as the value of some environment
> > variable.
>
> I like this idea. Currently I have some command= tools that have hard links
> and behave differently based on the name referenced in command=. It would be
> cleaner if I had only one file name, but the behavior depended on the
> identity being used to invoke the tool.
I use this now. Here's an example, using GSS-API/KerberosV (thanks to
Simon Wilkinson!):
foo at somehost[87]% kinit foo/superroot
Password for foo/superroot at FOOBAR.COM:
foo at somehost[88]% ssh -l root someotherhost
Last login: Thu Aug 23 08:08:08 2001 from somehost
<motd>
# env|grep SSH
SSH_AUTH_EXT_NAME=foo/superroot at FOOBAR.COM
SSH_AUTH_EXT_NAME_TYPE=krb5
SSH_AUTH_SOCK=/tmp/ssh-nRSm3742/agent.3742
SSH_CLIENT=10.11.12.13 33244 22
SSH_TTY=/dev/pts/38
# cat ~root/.ssh/authorized_keys2
ssh-ext-name-pat:krb5 */superroot at FOOBAR.COM
#
See?
> -Peter
My patch for this can be found in the archives of this list at MARC.
Cheers,
Nico
--
-DISCLAIMER: an automatically appended disclaimer may follow. By posting-
-to a public e-mail mailing list I hereby grant permission to distribute-
-and copy this message.-
Visit our website at http://www.ubswarburg.com
This message contains confidential information and is intended only
for the individual named. If you are not the named addressee you
should not disseminate, distribute or copy this e-mail. Please
notify the sender immediately by e-mail if you have received this
e-mail by mistake and delete this e-mail from your system.
E-mail transmission cannot be guaranteed to be secure or error-free
as information could be intercepted, corrupted, lost, destroyed,
arrive late or incomplete, or contain viruses. The sender therefore
does not accept liability for any errors or omissions in the contents
of this message which arise as a result of e-mail transmission. If
verification is required please request a hard-copy version. This
message is provided for informational purposes and should not be
construed as a solicitation or offer to buy or sell any securities or
related financial instruments.
More information about the openssh-unix-dev
mailing list