Skip to content

Commit 9164fac

Browse files
RAMPART-454 Document security / maintenance assumptions flagged by review
Add in-place comments at the three locations the Gemini review flagged as HIGH/MEDIUM risk so the assumptions are enforced the next time someone touches these files, without changing behaviour: - modules/distribution/bin.xml: prepend a MAINTENANCE NOTE describing why the <excludes> list on the lib/ dependencySet exists (the dist must not duplicate jars already shipped in the Axis2 distribution) and what must be re-checked whenever ${axis2.version} or any transitive dep moves -- otherwise we re-introduce the httpcore5 5.2.5 vs 5.4.2 style silent breakage. - pom.xml: prepend a SECURITY NOTE to the <properties> block listing the checklist reviewers must follow when bumping wss4j / opensaml / xmlsec / bouncycastle: read every intermediate CVE release note (not just the newest), make sure no weak algorithm or key size gets re-introduced as a default, and re-run the policy samples. - RampartUtil.validateTransport: expand the inline comment at the jakarta.servlet.request.X509Certificate lookup site to name the Servlet-spec contract we're relying on and explicitly state that re-validation of the chain is the transport listener's job, not ours. The Javadoc on the method already documented the attribute name; this makes the responsibility split visible at the call site.
1 parent 2f9f8a5 commit 9164fac

3 files changed

Lines changed: 55 additions & 0 deletions

File tree

modules/distribution/bin.xml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,27 @@
1+
<!--
2+
MAINTENANCE NOTE
3+
================
4+
The <excludes> list on the lib/ dependencySet below is version-coupled to
5+
the contents of the Axis2 binary distribution we install into. Its purpose
6+
is to avoid shipping jars that Axis2 already provides; otherwise two copies
7+
at different versions end up on the Axis2 runtime classpath (for example
8+
httpcore5 5.2.5 alongside Axis2's 5.4.2) and the first one found wins,
9+
which silently breaks HTTPClient5 transport and other components.
10+
11+
When bumping ${axis2.version} (or any transitive dependency in the lib/
12+
set) the excludes MUST be re-reviewed:
13+
14+
1. Build the matching axis2 distribution (or unzip axis2-*-bin.zip).
15+
2. Diff the jars in axis2/lib against this pom's effective dependency
16+
list (mvn -pl modules/distribution dependency:list), comparing by
17+
artifactId prefix.
18+
3. Add any new overlaps as <exclude>group:artifact</exclude> entries.
19+
4. Drop entries for artifacts Axis2 no longer ships.
20+
5. Re-run the nine policy samples against the fresh rampart-dist to
21+
confirm no sealing violations or NoSuchMethodErrors.
22+
23+
See the rampart-dist README / release checklist for the exact commands.
24+
-->
125
<assembly>
226
<id>bin</id>
327
<baseDirectory>rampart-${version}</baseDirectory>

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1943,6 +1943,14 @@ 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+
// Per the Jakarta Servlet specification (section on SSL attributes),
1947+
// a servlet container performing TLS client authentication MUST
1948+
// expose the validated chain on the request under this attribute
1949+
// name. Rampart relies on that contract: if the container is not
1950+
// configured for client auth, or does not populate the attribute,
1951+
// this lookup returns null and the check below fails the request.
1952+
// We deliberately do not attempt to re-validate the chain here --
1953+
// that is the transport listener's responsibility.
19461954
Object certificateChain = request.getAttribute("jakarta.servlet.request.X509Certificate"); //$NON-NLS-1$
19471955
if (certificateChain instanceof X509Certificate[]) {
19481956
// HTTPS client certificate chain found

pom.xml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -820,6 +820,29 @@
820820
</modules>
821821

822822
<properties>
823+
<!--
824+
SECURITY NOTE
825+
=============
826+
Rampart sits directly on top of the WS-Security / SAML stack: WSS4J
827+
handles signing/encryption/UsernameToken, Santuario XMLSec handles
828+
XML DSig/XML Enc primitives, OpenSAML handles assertion processing,
829+
and Bouncy Castle supplies the crypto providers. Any CVE in those
830+
libraries is effectively a Rampart CVE as far as downstream users
831+
are concerned.
832+
833+
When bumping any of the versions below (wss4j, opensaml, xmlsec,
834+
bcprov/bcpkix) the reviewer must:
835+
836+
1. Read the upstream release notes / CVE feed for every version
837+
skipped (not just the newest one) and note any fixes that
838+
affect the code paths Rampart exercises (signing, encryption,
839+
SAML issuance/validation, STS, policy processing).
840+
2. Ensure no deprecated/weak algorithms (SHA-1, MD5, RSA-1.5,
841+
3DES, < 2048-bit keys) are re-introduced as defaults through
842+
the upgrade.
843+
3. Re-run the full reactor plus the nine policy samples before
844+
pushing.
845+
-->
823846
<axis2.version>2.0.1-SNAPSHOT</axis2.version>
824847
<axiom.version>2.0.0</axiom.version>
825848

0 commit comments

Comments
 (0)