s4:kdc: make use of the 'kdc enable fast' option
authorStefan Metzmacher <metze@samba.org>
Wed, 9 Mar 2022 11:39:07 +0000 (12:39 +0100)
committerStefan Metzmacher <metze@samba.org>
Fri, 11 Mar 2022 17:10:29 +0000 (17:10 +0000)
This will useful to test against a KDC without FAST support
and find/prevent regressions.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15002
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15005

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
source4/kdc/db-glue.c
source4/kdc/kdc-heimdal.c

index bea9ac8e1ae5b64b15ed6d74d23e77445a05de57..62cc8bdef1da5d0d264ab37327a5253f085e924e 100644 (file)
@@ -449,11 +449,15 @@ static krb5_error_code samba_kdc_message2entry_keys(krb5_context context,
        *supported_enctypes_out = 0;
 
        if (rid == DOMAIN_RID_KRBTGT || is_rodc) {
+               bool enable_fast;
+
                /* KDCs (and KDCs on RODCs) use AES */
                supported_enctypes |= ENC_HMAC_SHA1_96_AES128 | ENC_HMAC_SHA1_96_AES256;
 
-               /* KDCs support FAST */
-               supported_enctypes |= ENC_FAST_SUPPORTED;
+               enable_fast = lpcfg_kdc_enable_fast(kdc_db_ctx->lp_ctx);
+               if (enable_fast) {
+                       supported_enctypes |= ENC_FAST_SUPPORTED;
+               }
        } else if (userAccountControl & (UF_PARTIAL_SECRETS_ACCOUNT|UF_SERVER_TRUST_ACCOUNT)) {
                /* DCs and RODCs comptuer accounts use AES */
                supported_enctypes |= ENC_HMAC_SHA1_96_AES128 | ENC_HMAC_SHA1_96_AES256;
index ddf3b649da2d64ea868017dc0ac7454138161e4b..0d2a410fc3b40160a3ddf4569ba981825e1bcb25 100644 (file)
@@ -422,6 +422,13 @@ static void kdc_post_fork(struct task_server *task, struct process_details *pd)
 
        kdc_config->require_pac = true;
 
+       /*
+        * By default we enable RFC6113/FAST support,
+        * but we have an option to disable in order to
+        * test against a KDC with FAST support.
+        */
+       kdc_config->enable_fast = lpcfg_kdc_enable_fast(task->lp_ctx);
+
        /*
         * Match Windows and RFC6113 and Windows but break older
         * Heimdal clients.