Skip to content

Commit 8b0ef86

Browse files
authored
[#544] Add requires-admin-action component-restart for max-request-size (#552)
1 parent 89de450 commit 8b0ef86

3 files changed

Lines changed: 12 additions & 2 deletions

File tree

opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/HTTPConnectionHandlerConfiguration.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
information: "Portions Copyright [year] [name of copyright owner]".
1414
1515
Portions copyright 2013-2016 ForgeRock AS.
16+
Portions copyright 2025 3A Systems, LLC
1617
! -->
1718
<adm:managed-object name="http-connection-handler"
1819
plural-name="http-connection-handlers"
@@ -225,7 +226,10 @@
225226
they send extremely large requests to the server causing it to
226227
attempt to allocate large amounts of memory.
227228
</adm:description>
228-
<adm:default-behavior>
229+
<adm:requires-admin-action>
230+
<adm:component-restart />
231+
</adm:requires-admin-action>
232+
<adm:default-behavior>
229233
<adm:defined>
230234
<adm:value>5 megabytes</adm:value>
231235
</adm:defined>

opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/LDAPConnectionHandlerConfiguration.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
1515
Copyright 2007-2009 Sun Microsystems, Inc.
1616
Portions copyright 2011-2016 ForgeRock AS.
17+
Portions copyright 2025 3A Systems, LLC
1718
! -->
1819
<adm:managed-object name="ldap-connection-handler"
1920
plural-name="ldap-connection-handlers"
@@ -311,6 +312,9 @@
311312
send extremely large requests to the server causing it to
312313
attempt to allocate large amounts of memory.
313314
</adm:description>
315+
<adm:requires-admin-action>
316+
<adm:component-restart />
317+
</adm:requires-admin-action>
314318
<adm:default-behavior>
315319
<adm:defined>
316320
<adm:value>5 megabytes</adm:value>

opendj-server-legacy/src/test/java/org/opends/server/protocols/ldap/TestLDAPConnectionHandler.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
*
1414
* Copyright 2006-2009 Sun Microsystems, Inc.
1515
* Portions Copyright 2012-2016 ForgeRock AS.
16+
* Portions Copyright 2025 3A Systems, LLC.
1617
*/
1718
package org.opends.server.protocols.ldap;
1819

@@ -85,7 +86,7 @@ public void testLDAPConnectionHandler() throws Exception {
8586
"ds-cfg-use-tcp-no-delay: true",
8687
"ds-cfg-allow-tcp-reuse-address: true",
8788
"ds-cfg-send-rejection-notice: true",
88-
"ds-cfg-max-request-size: 5 megabytes",
89+
"ds-cfg-max-request-size: 10 megabytes",
8990
"ds-cfg-num-request-handlers: 2",
9091
"ds-cfg-allow-start-tls: false",
9192
"ds-cfg-use-ssl: false",
@@ -105,6 +106,7 @@ public void testLDAPConnectionHandler() throws Exception {
105106
Collection<String> cips = LDAPConnHandler.getEnabledSSLCipherSuites();
106107
Collection<String> protos = LDAPConnHandler.getEnabledSSLProtocols();
107108
int maxReqSize = LDAPConnHandler.getMaxRequestSize();
109+
assertEquals(maxReqSize,10*1000*1000);
108110
String shutListName=LDAPConnHandler.getShutdownListenerName();
109111
SSLClientAuthPolicy policy = LDAPConnHandler.getSSLClientAuthPolicy();
110112
Collection<ClientConnection> cons=LDAPConnHandler.getClientConnections();

0 commit comments

Comments
 (0)