This is an automated email from the ASF dual-hosted git repository. robertlazarski pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/axis-axis2-java-rampart.git
commit aceacfe9e64e9a25f82bc6fc53d1a7a2ac343f44 Author: Robert Lazarski <[email protected]> AuthorDate: Sun Apr 12 16:19:12 2026 -1000 RAMPART-454 Upgrade OpenSAML from 4.3.2 to 5.2.1 OpenSAML 5.x API changes: - opensaml-core artifact renamed to opensaml-core-api (all other artifacts unchanged) - AuthnContextClassRef.setAuthnContextClassRef() -> setURI() - ConfirmationMethod.getConfirmationMethod() -> getURI() - ConfirmationMethod.setConfirmationMethod() -> setURI() Only 4 method renames needed. The Shibboleth Maven repo URL was updated in the previous commit. Builds successfully with: mvn install -Dmaven.test.skip=true -Dmaven.javadoc.skip=true Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]> --- .../src/main/java/org/apache/rahas/impl/SAML2TokenIssuer.java | 4 ++-- .../src/main/java/org/apache/rahas/impl/util/SAMLUtils.java | 4 ++-- pom.xml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/rampart-trust/src/main/java/org/apache/rahas/impl/SAML2TokenIssuer.java b/modules/rampart-trust/src/main/java/org/apache/rahas/impl/SAML2TokenIssuer.java index 542d3a7e..316f34da 100644 --- a/modules/rampart-trust/src/main/java/org/apache/rahas/impl/SAML2TokenIssuer.java +++ b/modules/rampart-trust/src/main/java/org/apache/rahas/impl/SAML2TokenIssuer.java @@ -699,9 +699,9 @@ public class SAML2TokenIssuer implements TokenIssuer { //if username/password based authn if (inMsgCtx.getProperty(RahasConstants.USERNAME) != null) { - authCtxClassRef.setAuthnContextClassRef(AuthnContext.PASSWORD_AUTHN_CTX); + authCtxClassRef.setURI(AuthnContext.PASSWORD_AUTHN_CTX); } else if (inMsgCtx.getProperty(RahasConstants.X509_CERT) != null) { //if X.509 cert based authn - authCtxClassRef.setAuthnContextClassRef(AuthnContext.X509_AUTHN_CTX); + authCtxClassRef.setURI(AuthnContext.X509_AUTHN_CTX); } authContext.setAuthnContextClassRef(authCtxClassRef); diff --git a/modules/rampart-trust/src/main/java/org/apache/rahas/impl/util/SAMLUtils.java b/modules/rampart-trust/src/main/java/org/apache/rahas/impl/util/SAMLUtils.java index 0a2eb3a7..8ba55483 100644 --- a/modules/rampart-trust/src/main/java/org/apache/rahas/impl/util/SAMLUtils.java +++ b/modules/rampart-trust/src/main/java/org/apache/rahas/impl/util/SAMLUtils.java @@ -188,7 +188,7 @@ public class SAMLUtils { List<ConfirmationMethod> confirmationMethods = subjectConfirmation.getConfirmationMethods(); if (!confirmationMethods.isEmpty()) { - subjectConfirmationMethod = confirmationMethods.get(0).getConfirmationMethod(); + subjectConfirmationMethod = confirmationMethods.get(0).getURI(); } } } @@ -232,7 +232,7 @@ public class SAMLUtils { ConfirmationMethod confirmationMethodObject = (ConfirmationMethod)CommonUtil.buildXMLObject(ConfirmationMethod.DEFAULT_ELEMENT_NAME); - confirmationMethodObject.setConfirmationMethod(confirmationMethod); + confirmationMethodObject.setURI(confirmationMethod); return confirmationMethodObject; } diff --git a/pom.xml b/pom.xml index d7f6edc0..0d296410 100644 --- a/pom.xml +++ b/pom.xml @@ -568,7 +568,7 @@ </dependency> <dependency> <groupId>org.opensaml</groupId> - <artifactId>opensaml-core</artifactId> + <artifactId>opensaml-core-api</artifactId> <version>${opensaml.version}</version> <scope>compile</scope> </dependency> @@ -849,7 +849,7 @@ <axiom.version>2.0.0</axiom.version> <wss4j.version>3.0.3</wss4j.version> - <opensaml.version>4.3.2</opensaml.version> + <opensaml.version>5.2.1</opensaml.version> <shibboleth.utilities.version>8.4.2</shibboleth.utilities.version> <dropwizard.metrics.version>4.2.19</dropwizard.metrics.version> <cryptacular.version>1.2.4</cryptacular.version>
