]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
config: add certificate backdating compensation
authorGary Lockyer <gary@catalyst.net.nz>
Thu, 28 Aug 2025 23:05:10 +0000 (11:05 +1200)
committerJennifer Sutton <jsutton@samba.org>
Fri, 10 Oct 2025 01:27:31 +0000 (01:27 +0000)
When preforming certificate based kerberos authentication (PKINIT) with
"strong certificate binding enforcement = compatibility"", for WEAK mappings
the certificate issue date must be after the date the user record was created.

This parameter relaxes that constraint by allowing the certificate to have been
issued up to the specified number of minutes before the user record was created.

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
docs-xml/smbdotconf/security/kdccertbackdating.xml [new file with mode: 0644]
lib/param/loadparm.c
source3/param/loadparm.c

diff --git a/docs-xml/smbdotconf/security/kdccertbackdating.xml b/docs-xml/smbdotconf/security/kdccertbackdating.xml
new file mode 100644 (file)
index 0000000..11926a1
--- /dev/null
@@ -0,0 +1,28 @@
+<samba:parameter name="certificate backdating compensation"
+                 context="G"
+                 type="integer"
+                 xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
+<description>
+    <para>
+        When performing certificate based kerberos authentication
+        (PKINIT) with
+        <smbconfoption name="strong certificate binding enforcement">
+            compatibility
+        </smbconfoption>
+    </para>
+    <para>
+        This parameter specifies number of minutes that a certificate's issue
+        date may precede the creation of a users account.
+    </para>
+
+    <para>More details can be found at
+        <ulink url="https://support.microsoft.com/en-us/topic/kb5014754-certificate-based-authentication-changes-on-windows-domain-controllers-ad2c23b0-15d8-4340-a468-4d4f3b188f16">
+            KB5014754: Certificate-based authentication changes on Windows
+            domain controllers
+        </ulink>
+    </para>
+
+</description>
+
+<value type="default">0</value>
+</samba:parameter>
index 98dafbd25de3ffb926e14014b0bfa28e089362e1..8aea8f8499b20eb61012daf27a827187b24d1dc4 100644 (file)
@@ -2958,6 +2958,7 @@ struct loadparm_context *loadparm_init(TALLOC_CTX *mem_ctx)
 
        lpcfg_do_global_parameter(lp_ctx, "kdc enable fast", "True");
        lpcfg_do_global_parameter(lp_ctx, "strong certificate binding enforcement", "full");
+       lpcfg_do_global_parameter(lp_ctx, "certificate backdating compensation", "0");
 
        lpcfg_do_global_parameter(lp_ctx, "nt status support", "True");
 
index 59ccbf99b815b6dc49832901d6057a22d89f3349..d8ee4002fab7edb9cc6775e02a19341dcd27d372 100644 (file)
@@ -962,6 +962,7 @@ void loadparm_s3_init_globals(struct loadparm_context *lp_ctx,
        Globals.kdc_enable_fast = true;
        Globals.strong_certificate_binding_enforcement
                = KDC_CERT_BINDING_FULL;
+       Globals.certificate_backdating_compensation = 0;
 
        Globals.winbind_debug_traceid = true;