Skip to content

Commit 23cf31d

Browse files
committed
Increase limit for url query size
The OIDF federation sets send some request objects to the authorization endpoint via GET that are a bit larger than 8K and were reject with: Bad Message 414 reason: URI Too Long
1 parent 21603f4 commit 23cf31d

3 files changed

Lines changed: 31 additions & 3 deletions

File tree

Dockerfile.prod

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@ USER root
1515
COPY certs/ certs/
1616
RUN certs/import-certificate.sh certs/Open_Banking_Brasil_Sandbox_Root_G2.pem
1717
USER jetty
18+
ENV JAVA_OPTIONS="$JAVA_OPTIONS -Djetty.httpConfig.requestHeaderSize=65536"
1819
COPY --from=builder /build/target/*.war /var/lib/jetty/webapps/ROOT.war

jetty/jetty-http.xml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?xml version="1.0"?>
2+
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd">
3+
<Configure id="Server" class="org.eclipse.jetty.server.Server">
4+
<New id="httpConfig" class="org.eclipse.jetty.server.HttpConfiguration">
5+
<Set name="requestHeaderSize">
6+
<Property name="jetty.httpConfig.requestHeaderSize" default="65536" />
7+
</Set>
8+
</New>
9+
10+
<New id="httpConnector" class="org.eclipse.jetty.server.ServerConnector">
11+
<Arg><Ref id="Server" /></Arg>
12+
<Arg>
13+
<Array type="org.eclipse.jetty.server.ConnectionFactory">
14+
<Item>
15+
<New class="org.eclipse.jetty.server.HttpConnectionFactory">
16+
<Arg><Ref id="httpConfig" /></Arg>
17+
</New>
18+
</Item>
19+
</Array>
20+
</Arg>
21+
<Set name="port">
22+
<Property name="jetty.http.port" deprecated="jetty.port" default="8080" />
23+
</Set>
24+
</New>
25+
26+
<Call name="addConnector">
27+
<Arg><Ref id="httpConnector" /></Arg>
28+
</Call>
29+
</Configure>

pom.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,12 +188,10 @@
188188
<artifactId>jetty-maven-plugin</artifactId>
189189
<version>${jetty.version}</version>
190190
<configuration>
191+
<jettyXml>${project.basedir}/jetty/jetty-http.xml</jettyXml>
191192
<webApp>
192193
<webInfIncludeJarPattern>.*/.*jersey-[^/]\.jar$</webInfIncludeJarPattern>
193194
</webApp>
194-
<httpConnector>
195-
<port>8080</port>
196-
</httpConnector>
197195
<stopPort>9090</stopPort>
198196
<stopKey>stop</stopKey>
199197
<systemProperties>

0 commit comments

Comments
 (0)