Skip to content

Commit 34f6918

Browse files
RAMPART-454 Upgrade to Axis2 2.0.1-SNAPSHOT + Axiom 2.0.0 (Jakarta)
- axis2.version: 1.8.2 -> 2.0.1-SNAPSHOT - axiom.version: 1.4.0 -> 2.0.0 - javax.servlet -> jakarta.servlet in RampartUtil.java - javax.servlet.request.X509Certificate -> jakarta.servlet.request.X509Certificate - Added jakarta.servlet-api 6.0.0 (provided) dependency - Added axiom-jakarta-activation and axiom-jakarta-jaxb to dependencyManagement - Updated Shibboleth Maven repo URL (old Nexus -> new releases) Builds successfully with: mvn install -Dmaven.test.skip=true -Dmaven.javadoc.skip=true OpenSAML remains at 4.3.2 — 5.x upgrade is the next step. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 93e0883 commit 34f6918

3 files changed

Lines changed: 26 additions & 5 deletions

File tree

modules/rampart-core/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,5 +103,10 @@
103103
<artifactId>axiom-truth</artifactId>
104104
<scope>test</scope>
105105
</dependency>
106+
<dependency>
107+
<groupId>jakarta.servlet</groupId>
108+
<artifactId>jakarta.servlet-api</artifactId>
109+
<scope>provided</scope>
110+
</dependency>
106111
</dependencies>
107112
</project>

modules/rampart-core/src/main/java/org/apache/rampart/util/RampartUtil.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100
import javax.security.auth.callback.Callback;
101101
import javax.security.auth.callback.CallbackHandler;
102102
import javax.xml.namespace.QName;
103-
import javax.servlet.http.HttpServletRequest;
103+
import jakarta.servlet.http.HttpServletRequest;
104104

105105
import java.security.NoSuchAlgorithmException;
106106
import java.security.cert.X509Certificate;
@@ -1880,7 +1880,7 @@ public static String getSigElementId(RampartMessageData rmd) {
18801880
* and, if the property is not available, will try to get the HttpsServletRequest from the
18811881
* message context properties (populated there by the AxisServlet if axis2 is running inside a servlet
18821882
* engine) and retrieve the https client certificate chain from its attributes. The client certificate
1883-
* chain is expected to be available under the <code>javax.servlet.request.X509Certificate</code>
1883+
* chain is expected to be available under the <code>jakarta.servlet.request.X509Certificate</code>
18841884
* attribute of the servlet request. No further trust verification is done for the client
18851885
* certificate - the transport listener should have already verified this.
18861886
*
@@ -1943,7 +1943,7 @@ public static void validateTransport(RampartMessageData messageData) throws Ramp
19431943
Object requestProperty = msgContext.getProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST);
19441944
if (requestProperty instanceof HttpServletRequest) {
19451945
HttpServletRequest request = (HttpServletRequest)requestProperty;
1946-
Object certificateChain = request.getAttribute("javax.servlet.request.X509Certificate"); //$NON-NLS-1$
1946+
Object certificateChain = request.getAttribute("jakarta.servlet.request.X509Certificate"); //$NON-NLS-1$
19471947
if (certificateChain instanceof X509Certificate[]) {
19481948
// HTTPS client certificate chain found
19491949
return;

pom.xml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -514,6 +514,22 @@
514514
<artifactId>axiom-truth</artifactId>
515515
<version>${axiom.version}</version>
516516
</dependency>
517+
<dependency>
518+
<groupId>org.apache.ws.commons.axiom</groupId>
519+
<artifactId>axiom-jakarta-activation</artifactId>
520+
<version>${axiom.version}</version>
521+
</dependency>
522+
<dependency>
523+
<groupId>jakarta.servlet</groupId>
524+
<artifactId>jakarta.servlet-api</artifactId>
525+
<version>6.0.0</version>
526+
<scope>provided</scope>
527+
</dependency>
528+
<dependency>
529+
<groupId>org.apache.ws.commons.axiom</groupId>
530+
<artifactId>axiom-jakarta-jaxb</artifactId>
531+
<version>${axiom.version}</version>
532+
</dependency>
517533

518534
<!-- Other Rampart Dependencies -->
519535
<dependency>
@@ -829,8 +845,8 @@
829845
</modules>
830846

831847
<properties>
832-
<axis2.version>1.8.2</axis2.version>
833-
<axiom.version>1.4.0</axiom.version>
848+
<axis2.version>2.0.1-SNAPSHOT</axis2.version>
849+
<axiom.version>2.0.0</axiom.version>
834850

835851
<wss4j.version>3.0.3</wss4j.version>
836852
<opensaml.version>4.3.2</opensaml.version>

0 commit comments

Comments
 (0)