You can specify the certificate exactly on the 'kinit' command line
with the "-X X509_user_identity" option (this has the same format
as the pkinit_identities option in krb5.conf). Now this option isn't supported for kadmin, but you can do:
% kinit -X X509_user_identity=FILE:/tmp/foo.pem -S kadmin/admin jason/admin
or
% kinit -X X509_user_identity=FILE:/tmp/foo.pem -S kadmin/admin.host jason/admin
Depending on the principal you are using for kadmind, and then you can use the "-c credential_cache" option to kadmin to use an existing credential cache.
I have had success using a YubiKey 5 in PIV mode which also supportsYes, exactly. I'm contemplating Yubikeys, however, for this and other
a bunch of other things like FIDO 2; I have no connection with Yubico
other than as a user. Yubico provides a PKCS#11 module but in PIV mode
you should be able to use any PKCS#11 module that supports PIV (this is
very common). One advantage to a YubiKey is it is just USB and does not require a dedicated smartcard reader. Note that this is a lot of moving parts and probably will require a fair amount of fiddling.
First problem: I have a second principal, jason/admin, for use with
kadmin. I've generated a certificate that can authenticate. However, now
that I have two certificates (one for jason and another for
jason/admin), it isn't clear how to configure the client to offer the
correct certificate to the kdc. If I specify both certificates on >pkinit_identities lines in the client's krb5.conf file, "jason" can log
in, but kadmin returns a "Client name mismatch while initializing kadmin >interface" error. My assumptions is that the wrong certificate was
offered to the KDC (i.e., not the jason/admin certificate). Specifying
the directory containing the certificates in pkinit_identities results
in finding two certificates where one is expected, with an error message
to that effect.
Do I need to specify a PKINIT certificate matching rule, or is there
some other configuration that is required?
Second problem: securing the client's private key. The Linux client has
a TPM 2.0 module, but I haven't found any documentation on how to
configure it for use with Kerberos, if indeed this is supported.
References would be welcome.
The machine has a smartcard reader, so my other options would be to
purchase some compatible smartcards (after finding out what those are),
or a security key. In the latter case, I would probably choose a FIDO 2
key with smartcard support.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 465 |
Nodes: | 16 (2 / 14) |
Uptime: | 39:11:45 |
Calls: | 9,400 |
Files: | 13,569 |
Messages: | 6,098,615 |