I wasn't sure if this was more suited to the krbdev list, but I decided to start here first. Please advise if this belongs elsewhere.
[...]
https://github.com/geoffthorpe/newhcp/blob/main/doc/stateless-kdc.md
Among the things that I'm currently depending on in heimdal that might be different or missing in the MIT codebase are;
* "namespace principals" - [...]
* "synthetic principals" - [...]
* a persistent, PKI-based kinit - i.e. where an instance of kinit ("kinit
-C" in heimdal) will automatically renegotiate and update tickets over time to respect the key-rotiation period, and will reread the x509v3 cred each time (so that any updates to the local PKI cred also get picked up).
* a "kadmin ext_keytab" enhancement that supports namespace principals.
I first took a brief look at migrating this whole system and workflow over
to MIT kerberos some time ago, and I very quickly hit the skids. I've had
to shelve that for a while but I'm keen to try again. I'm wondering if
anyone with more familiarity with the MIT tools and code might be
interested in collaborating?
On Fri, Mar 20, 2026 at 11:12:56PM -0400, Geoffrey Thorpe wrote:
I wasn't sure if this was more suited to the krbdev list, but I decided to >> start here first. Please advise if this belongs elsewhere.
krbdev is better, yes.
<snip>[...]
https://github.com/geoffthorpe/newhcp/blob/main/doc/stateless-kdc.md
FYI KDCs are stateless by definition. What you meant is more like a KDC where there is no need to have a _writeable KDB/HDB_ because:
Among the things that I'm currently depending on in heimdal that might be
different or missing in the MIT codebase are;
* "namespace principals" - [...]
* "synthetic principals" - [...]
At the OpenSSL 2025 Conference I was told that one of the major
contributors to MIT kerberos also wants these features in MIT Kerberos.
In this age of LLMs you can probably contribute these yourself in no
time flat!
* a persistent, PKI-based kinit - i.e. where an instance of kinit ("kinit
-C" in heimdal) will automatically renegotiate and update tickets over time >> to respect the key-rotiation period, and will reread the x509v3 cred each
time (so that any updates to the local PKI cred also get picked up).
I'm not sure what this is referring to. MIT Kerberos supports using
PKINIT in kinit. Neither MIT nor Heimdal will automatically refresh
user certificates though, but Heimdal does have kx509 and an HTTP-based online CA as well which can do that -- it's just Heimdal's kinit does
not do what you're asking for.
Yeah I didn't mean stateless in the way you're interpreting it, I get what you mean. It's only "stateless" in the sense that the typical orchestration problem of managing a KDC, i.e. registering and deregistering client and service principals in the KDC database, is avoidable. [...]
* a persistent, PKI-based kinit - i.e. where an instance of kinit ("kinit -C" in heimdal) will automatically renegotiate and update tickets over time
to respect the key-rotiation period, and will reread the x509v3 cred each time (so that any updates to the local PKI cred also get picked up).
I'm not sure what this is referring to. MIT Kerberos supports using
PKINIT in kinit. Neither MIT nor Heimdal will automatically refresh
user certificates though, but Heimdal does have kx509 and an HTTP-based online CA as well which can do that -- it's just Heimdal's kinit does
not do what you're asking for.
Perhaps I didn't express it well. The feature I'm relying on is _not_ that kinit refreshes the x509v3 cred itself, but that it re-reads the cert and
key periodically from the FS rather than reading only once at startup. I.e.
the assumption is that the pkinit cert+key is going to be refreshed "by
other means" (in my case via HCP attestation, in other cases it'll be whatever PKI tooling keeps creds up to date), so what I'm relying on is that the kinit instance will consume those updates to the cred over time (from
the FS), without requiring a restart.
The heimdal "kinit -C" does seem to do this.
On Mon, Mar 30, 2026 at 05:41:23PM -0400, Geoffrey Thorpe wrote:
Yeah I didn't mean stateless in the way you're interpreting it, I get what >> you mean. It's only "stateless" in the sense that the typical orchestration >> problem of managing a KDC, i.e. registering and deregistering client and
service principals in the KDC database, is avoidable. [...]
I would call this read-only KDCs, or mostly-read-only KDCs.
Perhaps I didn't express it well. The feature I'm relying on is _not_ that >> kinit refreshes the x509v3 cred itself, but that it re-reads the cert and
key periodically from the FS rather than reading only once at startup. I.e.
FS?
the assumption is that the pkinit cert+key is going to be refreshed "by
other means" (in my case via HCP attestation, in other cases it'll be
whatever PKI tooling keeps creds up to date), so what I'm relying on is that >> the kinit instance will consume those updates to the cred over time (from
the FS), without requiring a restart.
The heimdal "kinit -C" does seem to do this.
Are you referring to the mode of kinit where it runs a command and keeps
it supplied with fresh tickets? MIT Kerberos' kinit does not have that
mode.
Are you referring to the mode of kinit where it runs a command and keeps >> it supplied with fresh tickets? MIT Kerberos' kinit does not have that
mode.
Yes that's what I'm referring to. If it's not yet supported by the MIT >kinit, I would certainly recommend that it be added, it's very helpful.
Can't speak for anyone else, but we use "k5start" for this.
Are you referring to the mode of kinit where it runs a command and keeps >>> it supplied with fresh tickets? MIT Kerberos' kinit does not have that
mode.
Yes that's what I'm referring to. If it's not yet supported by the MIT
kinit, I would certainly recommend that it be added, it's very helpful.
Can't speak for anyone else, but we use "k5start" for this.
As I understand it, k5start will invoke kinit periodically to handle credential refresh, and so if kinit is configured to use pkinit to get
creds, then it would pick up the cert and key from the file system each
time kinit is invoked (rather than them being read only once when
k5start is first run). Is that correct? If so, that's once less feature
to worry about. :-)
k5start itself does not run kinit. It uses the Kerberos library calls
directly. I am dubious that it would work with PKINIT from a file
without some code changes. (Although also I'm not sure I understand the
security model of using a PKINIT cert on disk and not a keytab.)
While you can specify some PKINIT options to the MIT kinit with the
-X switch, at least in my experience PKINIT authentication is normally configured in your krb5.conf and anything that calls the "normal" krb5_get_init_creds_with_password() function does the right thing.
So I think k5start should work out of the box assuming all of the
other PKINIT stuff was configured properly.
I can think of situations where you might be issued X.509 certificates
that you would want to use for authentication, rather than a keytab.
That might solve some compliance issues depending on site policy. E.g.,
here in the DoD there is a lot of policy pushback about using "fixed" passwords (even with password expiration) and while almost nobody knows
about Kerberos, if they ever did figure out what a keytab was then there would be a lot of resistance to using that for client authentication.
But if you use DoD-issued client certificates for authentication you are exempt from all that (most of the time they want you to use hardware token-based certificates, but software certificates are allowed for "non-person entities" and a few other cases).
I can think of situations where you might be issued X.509 certificates
that you would want to use for authentication, rather than a keytab.
Geoffrey Thorpe <geoff@geoffthorpe.net> writes:
As I understand it, k5start will invoke kinit periodically to handle
credential refresh, and so if kinit is configured to use pkinit to get
creds, then it would pick up the cert and key from the file system each
time kinit is invoked (rather than them being read only once when
k5start is first run). Is that correct? If so, that's once less feature
to worry about. :-)
k5start itself does not run kinit. It uses the Kerberos library calls directly. I am dubious that it would work with PKINIT from a file without some code changes. (Although also I'm not sure I understand the security model of using a PKINIT cert on disk and not a keytab.)
[...]. (Although also I'm not sure I understand the security model of using a PKINIT cert on disk and not a keytab.)
As Geoff explained in his reply, the idea is that the KDC can synthesize
a KDB entry for any principal that doesn't exist in the KDB but for
which a client certificate is presented (with a PKINIT SAN, issued by a
CA trusted for that and the realm in question) and issue a ticket.
| Sysop: | Amessyroom |
|---|---|
| Location: | Fayetteville, NC |
| Users: | 64 |
| Nodes: | 6 (0 / 6) |
| Uptime: | 492944:05:57 |
| Calls: | 842 |
| Files: | 1,304 |
| D/L today: |
8 files (19,649K bytes) |
| Messages: | 261,765 |