bb0ded
From 3e54c4362490b4da1b6cb3e141bb6e08fecc58c0 Mon Sep 17 00:00:00 2001
bb0ded
From: Alexander Bokovoy <abokovoy@redhat.com>
bb0ded
Date: Mon, 14 Mar 2022 13:23:04 +0200
bb0ded
Subject: [PATCH] Kerberos instance: default to AES256-SHA2 for master key
bb0ded
 encryption
bb0ded
bb0ded
KDC configuration in /var/kerberos/krb5kdc/kdc.conf is generated from
bb0ded
the template in install/share/kdc.conf.template. Master key encryption
bb0ded
type specified there is used to bootstrap the master key in LDAP
bb0ded
database. Once it is done, actual deployment does not rely on the
bb0ded
master_key_type value anymore. The actual master key(s) get loaded from
bb0ded
LDAP database where they stored in a BER-encoded format, preserving all
bb0ded
parameters, including encryption type.
bb0ded
bb0ded
This means we can safely migrate to AES256-SHA2 as the default master
bb0ded
key encryption type for new installations. Replicas will get their
bb0ded
master key encryption type details from the server they were provisioned
bb0ded
from.
bb0ded
bb0ded
MIT Kerberos supports AES256-SHA2 since 1.15 (2015), meaning RHEL 7.4 is
bb0ded
the earliest supported version as it provides krb5 1.15.1. Current
bb0ded
supported RHEL 7 version is RHEL 7.9. Since RHEL 6 already cannot be
bb0ded
used as a replica to IPA 4.5+ due to a domain level 1 upgrade, this
bb0ded
change does not affect old releases.
bb0ded
bb0ded
Migration from the previously deployed master key encryption type is
bb0ded
described by MIT Kerberos upstream in
bb0ded
http://web.mit.edu/kerberos/krb5-latest/doc/admin/advanced/retiring-des.html#the-database-master-key
bb0ded
bb0ded
One would need to use '-x ipa-setup-override-restrictions' to allow
bb0ded
the `kdb5_util` utility to modify the data over IPA KDB driver.
bb0ded
bb0ded
Fixes: https://pagure.io/freeipa/issue/9119
bb0ded
bb0ded
Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com>
bb0ded
Reviewed-By: Francisco Trivino <ftrivino@redhat.com>
bb0ded
---
bb0ded
 ipaserver/install/krbinstance.py | 2 +-
bb0ded
 1 file changed, 1 insertion(+), 1 deletion(-)
bb0ded
bb0ded
diff --git a/ipaserver/install/krbinstance.py b/ipaserver/install/krbinstance.py
bb0ded
index 01b3309d50c0e8025e3381eac577225b1ef0be9d..a5eaa7b17133498f08e84d01c90764236e8ebe84 100644
bb0ded
--- a/ipaserver/install/krbinstance.py
bb0ded
+++ b/ipaserver/install/krbinstance.py
bb0ded
@@ -51,7 +51,7 @@ logger = logging.getLogger(__name__)
bb0ded
 
bb0ded
 PKINIT_ENABLED = 'pkinitEnabled'
bb0ded
 
bb0ded
-MASTER_KEY_TYPE = 'aes256-sha1'
bb0ded
+MASTER_KEY_TYPE = 'aes256-sha2'
bb0ded
 SUPPORTED_ENCTYPES = ('aes256-sha2:special', 'aes128-sha2:special',
bb0ded
                       'aes256-sha2:normal', 'aes128-sha2:normal',
bb0ded
                       'aes256-cts:special', 'aes128-cts:special',
bb0ded
-- 
bb0ded
2.34.1
bb0ded