public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: David Hanina <dhanina@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/freeipa] f45: Backport dogtagpki changes due to AJP packet size
Date: Tue, 06 Oct 2026 14:08:56 GMT [thread overview]
Message-ID: <179129573617.1.8386522921813306969.rpms-freeipa-8d9c0427f48d@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/freeipa
Branch : f45
Commit : 8d9c0427f48d27a8551c1481fb6b032a78a6f797
Author : David Hanina <dhanina@redhat.com>
Date : 2026-10-06T15:50:26+02:00
Stats : +247/-1 in 3 file(s)
URL : https://src.fedoraproject.org/rpms/freeipa/c/8d9c0427f48d27a8551c1481fb6b032a78a6f797?branch=f45
Log:
Backport dogtagpki changes due to AJP packet size
Dogtag version in Fedora has been bumped and the follow up code on the
FreeIPA side should've been bumped too, but never was.
Resolves: rhbz#2546573
Signed-off-by: David Hanina <dhanina@redhat.com>
---
diff --git a/freeipa-force-rewrite-of-ipa-pki-proxy.conf-on-upgrade.patch b/freeipa-force-rewrite-of-ipa-pki-proxy.conf-on-upgrade.patch
new file mode 100644
index 0000000..3922f3a
--- /dev/null
+++ b/freeipa-force-rewrite-of-ipa-pki-proxy.conf-on-upgrade.patch
@@ -0,0 +1,77 @@
+From 97c01284cc378404faf2b02b99d678a630c763f6 Mon Sep 17 00:00:00 2001
+From: Fraser Tweedale <ftweedal@redhat.com>
+Date: Wed, 15 Jul 2026 21:15:59 -0400
+Subject: [PATCH] Force rewrite of ipa-pki-proxy.conf on upgrade
+
+There are several conditions that require the updating of
+ipa-pki-proxy.conf, in addition to version bump:
+
+- AJP secret added or changed
+- Dogtag AJP packet size added or changed
+
+To avoid the complexity of checking these conditions, force a
+rewrite on every upgrade.
+
+Also add a comment to `ipa-pki-proxy.conf` to warn administrators
+and discourage customisation.
+
+Related: https://pagure.io/freeipa/issue/9988
+
+Signed-off-by: Fraser Tweedale <ftweedal@redhat.com>
+---
+ install/share/ipa-pki-proxy.conf.template | 2 ++
+ ipaserver/install/server/upgrade.py | 14 +++++++++++---
+ 2 files changed, 13 insertions(+), 3 deletions(-)
+
+diff --git a/install/share/ipa-pki-proxy.conf.template b/install/share/ipa-pki-proxy.conf.template
+index 036b8118d..edd6c3f62 100644
+--- a/install/share/ipa-pki-proxy.conf.template
++++ b/install/share/ipa-pki-proxy.conf.template
+@@ -1,5 +1,7 @@
+ # VERSION 18 - DO NOT REMOVE THIS LINE
+
++# Do not customise this file; it gets rewritten on every upgrade
++
+ ProxyRequests Off
+
+ $DOGTAG_AJP_PACKET_SIZE
+diff --git a/ipaserver/install/server/upgrade.py b/ipaserver/install/server/upgrade.py
+index 6f9148259..1db05abfa 100644
+--- a/ipaserver/install/server/upgrade.py
++++ b/ipaserver/install/server/upgrade.py
+@@ -1732,7 +1732,7 @@ def upgrade_configuration():
+ ca.add_ipa_wait()
+
+ # Handle upgrade of AJP connector configuration
+- secret_needs_sync = ca.secure_ajp_connector()
++ ca.secure_ajp_connector()
+ if ca.ajp_secret:
+ sub_dict['DOGTAG_AJP_SECRET'] = "secret={}".format(
+ ca.ajp_secret)
+@@ -1746,13 +1746,21 @@ def upgrade_configuration():
+ else:
+ sub_dict['DOGTAG_AJP_PACKET_SIZE'] = ''
+
+- # force=True will ensure the secret is updated if it changes
++ # There are several conditions that require the updating
++ # of ipa-pki-proxy.conf, in addition to version bump:
++ #
++ # - AJP secret added or changed
++ # - Dogtag AJP packet size added or changed
++ #
++ # Forcing a rewrite on every upgrade avoids the complexity
++ # to check for these conditions. Therefore: force=True
++ #
+ upgrade_file(
+ sub_dict,
+ paths.HTTPD_IPA_PKI_PROXY_CONF,
+ os.path.join(paths.USR_SHARE_IPA_DIR,
+ "ipa-pki-proxy.conf.template"),
+- add=True, force=secret_needs_sync)
++ add=True, force=True)
+ else:
+ if os.path.isfile(paths.HTTPD_IPA_PKI_PROXY_CONF):
+ os.remove(paths.HTTPD_IPA_PKI_PROXY_CONF)
+--
+2.55.0
+
diff --git a/freeipa-increase-the-AJP-proxy-buffer-size-to-handle-large-c.patch b/freeipa-increase-the-AJP-proxy-buffer-size-to-handle-large-c.patch
new file mode 100644
index 0000000..60d2a6b
--- /dev/null
+++ b/freeipa-increase-the-AJP-proxy-buffer-size-to-handle-large-c.patch
@@ -0,0 +1,164 @@
+From 291d484b39e67e062b7a5ddf6c69cfdd1eb3fc40 Mon Sep 17 00:00:00 2001
+From: Rob Crittenden <rcritten@redhat.com>
+Date: Mon, 11 May 2026 14:20:48 -0400
+Subject: [PATCH] Increase the AJP proxy buffer size to handle large
+ certificates
+
+The key sizes of ML-DSA 65 and 87 generate very large certificates,
+CSRs, etc. These can be larger than the default mod_proxy AJP
+setting allows (8192).
+
+The equivalent value in PKI was updated to 65536 in dogtagpki
+change. See:
+
+https://github.com/dogtagpki/pki/commit/9d8d6d2
+https://github.com/dogtagpki/pki/commit/3007eda
+https://github.com/dogtagpki/pki/commit/8e667b2
+
+We do NOT want to increase the value if the tomcat packetSize
+attribute is not set in the AJP connector. If only one of these
+is set between Apache and Tomcat then one side is likely to
+send a packet too large which will be rejected by the other side.
+
+An upgrade script is used to ensure the environment is sane.
+
+Fixes: https://pagure.io/freeipa/issue/9988
+
+Signed-off-by: Rob Crittenden <rcritten@redhat.com>
+Co-authored-by: Fraser Tweedale <ftweedal@redhat.com>
+---
+ install/share/ipa-pki-proxy.conf.template | 4 ++-
+ ipaserver/install/cainstance.py | 1 -
+ ipaserver/install/dogtaginstance.py | 36 +++++++++++++++++++++++
+ ipaserver/install/server/upgrade.py | 22 +++++++++-----
+ 4 files changed, 53 insertions(+), 10 deletions(-)
+
+diff --git a/install/share/ipa-pki-proxy.conf.template b/install/share/ipa-pki-proxy.conf.template
+index c7f0bfc36..036b8118d 100644
+--- a/install/share/ipa-pki-proxy.conf.template
++++ b/install/share/ipa-pki-proxy.conf.template
+@@ -1,7 +1,9 @@
+-# VERSION 17 - DO NOT REMOVE THIS LINE
++# VERSION 18 - DO NOT REMOVE THIS LINE
+
+ ProxyRequests Off
+
++$DOGTAG_AJP_PACKET_SIZE
++
+ # matches for ee port
+ <LocationMatch "^/ca/ee/ca/checkRequest|^/ca/ee/ca/getCertChain|^/ca/ee/ca/getTokenInfo|^/ca/ee/ca/tokenAuthenticate|^/ca/ocsp|^/ca/ee/ca/updateNumberRange|^/ca/ee/ca/getCRL|^/ca/ee/ca/profileSubmit">
+ SSLOptions +StdEnvVars +ExportCertData +StrictRequire +OptRenegotiate
+diff --git a/ipaserver/install/cainstance.py b/ipaserver/install/cainstance.py
+index 8edc7f839..40f4161ee 100644
+--- a/ipaserver/install/cainstance.py
++++ b/ipaserver/install/cainstance.py
+@@ -1178,7 +1178,6 @@ class CAInstance(DogtagInstance):
+
+ return publishdir
+
+-
+ def __enable_crl_publish(self):
+ """
+ Enable file-based CRL publishing and disable LDAP publishing.
+diff --git a/ipaserver/install/dogtaginstance.py b/ipaserver/install/dogtaginstance.py
+index aac8fb989..80e04890c 100644
+--- a/ipaserver/install/dogtaginstance.py
++++ b/ipaserver/install/dogtaginstance.py
+@@ -489,8 +489,39 @@ class DogtagInstance(service.Service):
+
+ return rewrite
+
++ def get_ajp_packet_size(self):
++ """Return packetSize if set in the AJP connectors
++
++ There are multiple connectors but the value should be the same.
++
++ We aren't trying to keep the values in sync between PKI and
++ Apache. They should both be 65536.
++
++ There are several opportunities for a user to mess this up:
++ * the attribute name is case-sensitive
++ * we only want the max possible value, nothing creative
++
++ Return the value if set, None if not.
++ """
++
++ server_xml = lxml.etree.parse(paths.PKI_TOMCAT_SERVER_XML)
++ doc = server_xml.getroot()
++
++ # no AJP connector is probably bad.
++ connectors = doc.xpath('//Connector[@protocol="AJP/1.3"]')
++ if len(connectors) == 0:
++ logger.debug("No AJP connectors found in get_ajp_packet_size")
++ return None
++
++ for connector in connectors:
++ if 'packetSize' in connector.attrib:
++ return connector.get('packetSize')
++
++ return None
++
+ def http_proxy(self):
+ """ Update the http proxy file """
++ ajp_packet_size = self.get_ajp_packet_size()
+ template_filename = (
+ os.path.join(paths.USR_SHARE_IPA_DIR,
+ "ipa-pki-proxy.conf.template"))
+@@ -499,9 +530,14 @@ class DogtagInstance(service.Service):
+ CLONE='' if self.clone else '#',
+ FQDN=self.fqdn,
+ DOGTAG_AJP_SECRET='',
++ DOGTAG_AJP_PACKET_SIZE='',
+ )
+ if self.ajp_secret:
+ sub_dict['DOGTAG_AJP_SECRET'] = "secret={}".format(self.ajp_secret)
++ if ajp_packet_size:
++ sub_dict['DOGTAG_AJP_PACKET_SIZE'] = (
++ "ProxyIOBufferSize {}".format(ajp_packet_size)
++ )
+ template = ipautil.template_file(template_filename, sub_dict)
+ with open(paths.HTTPD_IPA_PKI_PROXY_CONF, "w") as fd:
+ fd.write(template)
+diff --git a/ipaserver/install/server/upgrade.py b/ipaserver/install/server/upgrade.py
+index 0ae0ea235..6f9148259 100644
+--- a/ipaserver/install/server/upgrade.py
++++ b/ipaserver/install/server/upgrade.py
+@@ -1732,21 +1732,27 @@ def upgrade_configuration():
+ ca.add_ipa_wait()
+
+ # Handle upgrade of AJP connector configuration
+- rewrite = ca.secure_ajp_connector()
++ secret_needs_sync = ca.secure_ajp_connector()
+ if ca.ajp_secret:
+ sub_dict['DOGTAG_AJP_SECRET'] = "secret={}".format(
+ ca.ajp_secret)
+ else:
+ sub_dict['DOGTAG_AJP_SECRET'] = ''
+
++ ajp_packet_size = ca.get_ajp_packet_size()
++ if ajp_packet_size:
++ sub_dict['DOGTAG_AJP_PACKET_SIZE'] = (
++ "ProxyIOBufferSize {}".format(ajp_packet_size))
++ else:
++ sub_dict['DOGTAG_AJP_PACKET_SIZE'] = ''
++
+ # force=True will ensure the secret is updated if it changes
+- if rewrite:
+- upgrade_file(
+- sub_dict,
+- paths.HTTPD_IPA_PKI_PROXY_CONF,
+- os.path.join(paths.USR_SHARE_IPA_DIR,
+- "ipa-pki-proxy.conf.template"),
+- add=True, force=True)
++ upgrade_file(
++ sub_dict,
++ paths.HTTPD_IPA_PKI_PROXY_CONF,
++ os.path.join(paths.USR_SHARE_IPA_DIR,
++ "ipa-pki-proxy.conf.template"),
++ add=True, force=secret_needs_sync)
+ else:
+ if os.path.isfile(paths.HTTPD_IPA_PKI_PROXY_CONF):
+ os.remove(paths.HTTPD_IPA_PKI_PROXY_CONF)
+--
+2.55.0
+
diff --git a/freeipa.spec b/freeipa.spec
index 43c60d8..b2eb143 100644
--- a/freeipa.spec
+++ b/freeipa.spec
@@ -211,7 +211,7 @@
Name: %{package_name}
Version: %{IPA_VERSION}
-Release: 3.1%{?rc_version:.%rc_version}%{?dist}
+Release: 3.2%{?rc_version:.%rc_version}%{?dist}
Summary: The Identity, Policy and Audit system
License: GPL-3.0-or-later
@@ -240,6 +240,8 @@ Patch2: freeipa-pr-8558.patch
Patch3: freeipa-CVE-2026-14612.patch
Patch4: freeipa-ipa-join-increase-argv-array-suze-for-ipa-getkeytab.patch
Patch5: freeipa-ipa-kdb-fix-NULL-pointer-dereference-when-freeing-cr.patch
+Patch6: freeipa-increase-the-AJP-proxy-buffer-size-to-handle-large-c.patch
+Patch7: freeipa-force-rewrite-of-ipa-pki-proxy.conf-on-upgrade.patch
# RHEL spec file only: START: Change branding to IPA and Identity Management
# Moved branding logos and background to redhat-logos-ipa-80.4:
@@ -1977,6 +1979,9 @@ fi
%endif
%changelog
+* Tue Oct 06 2026 David Hanina <dhanina@redhat.com> - 4.13.4-3.2
+- Resolves: rhbz#2546573
+
* Thu Oct 01 2026 Alexander Bokovoy <abokovoy@redhat.com> - 4.13.4-3.1
- Resolves: rhbz#2439482
reply other threads:[~2026-10-06 14:08 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=179129573617.1.8386522921813306969.rpms-freeipa-8d9c0427f48d@fedoraproject.org \
--to=dhanina@redhat.com \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox