Changing the database master key - Kerberos
This is a discussion on Changing the database master key - Kerberos ; Hello all,
My understanding from previous discussions was that it was not possible to
change the database master key for an MIT Kerberos KDC due to various bits
that are encrypted in the master key. However, I noticed that the
...
-
Changing the database master key
Hello all,
My understanding from previous discussions was that it was not possible to
change the database master key for an MIT Kerberos KDC due to various bits
that are encrypted in the master key. However, I noticed that the
kdb5_util man page seems to indicate that it can under dump:
-mkey_convert
prompts for a new master key. This new master key will
be used to re-encrypt the key data in the dumpfile. The
key data in the database will not be changed.
-new_mkey_file mkey_file
the filename of a stash file. The master key in this
stash file will be used to re-encrypt the key data in the
dumpfile. The key data in the database will not be
changed.
Those options make it sound like I could use a technique like:
1. Create a new KDC database in a new location with an AES master key.
2. Dump the old database using -new_mkey_file pointing at the new stash.
3. Load the database dump into the new empty database.
and thereby change the database master key. Is that correct? Does this
fail for some reason? Has anyone done this?
--
Russ Allbery (rra@stanford.edu)
-
Re: Changing the database master key
>My understanding from previous discussions was that it was not possible to
>change the database master key for an MIT Kerberos KDC due to various bits
>that are encrypted in the master key. However, I noticed that the
>kdb5_util man page seems to indicate that it can under dump:
>
> -mkey_convert
> prompts for a new master key. This new master key will
> be used to re-encrypt the key data in the dumpfile. The
> key data in the database will not be changed.
>
> -new_mkey_file mkey_file
> the filename of a stash file. The master key in this
> stash file will be used to re-encrypt the key data in the
> dumpfile. The key data in the database will not be
> changed.
The problem is that you can change the master key ... but only to another
key of the same enctype.
When I investigated this ... it turns out that while the enctype is
stored in the stash file, none of the code makes use of that. And
also, the history key enctype is derived from the master key enctype.
Neither of these are insurmountable problems ... but at that point, I
gave up. Maybe this is fixed in newer versions of MIT Kerberos ...
but I suspect when you try it, it will fail.
--Ken
________________________________________________
Kerberos mailing list Kerberos@mit.edu
https://mailman.mit.edu/mailman/listinfo/kerberos
-
Re: Changing the database master key
>>>>> "Ken" == Ken Hornstein writes:
Ken> The problem is that you can change the master key ... but
Ken> only to another key of the same enctype.
Ken> When I investigated this ... it turns out that while the
Ken> enctype is stored in the stash file, none of the code makes
Ken> use of that. And also, the history key enctype is derived
Ken> from the master key enctype. Neither of these are
Ken> insurmountable problems ... but at that point, I gave up.
Ken> Maybe this is fixed in newer versions of MIT Kerberos ...
Ken> but I suspect when you try it, it will fail.
It is not.
But a patch committed by Russ would be welcome.:-)
________________________________________________
Kerberos mailing list Kerberos@mit.edu
https://mailman.mit.edu/mailman/listinfo/kerberos