This is an automated email from the ASF dual-hosted git repository.
coheigea pushed a commit to branch coheigea/saml-refactor-new
in repository https://gitbox.apache.org/repos/asf/ws-wss4j.git
The following commit(s) were added to refs/heads/coheigea/saml-refactor-new by
this push:
new fd148c791 Moving SAML to test scope
fd148c791 is described below
commit fd148c7918f828093718005da52659762574cb52
Author: Colm O hEigeartaigh <[email protected]>
AuthorDate: Fri Jun 27 10:00:14 2025 +0100
Moving SAML to test scope
---
ws-security-dom/pom.xml | 13 ++++++-------
.../java/org/apache/wss4j/dom/str/SignatureSTRParser.java | 10 ++++------
2 files changed, 10 insertions(+), 13 deletions(-)
diff --git a/ws-security-dom/pom.xml b/ws-security-dom/pom.xml
index 73bef060c..03b984140 100644
--- a/ws-security-dom/pom.xml
+++ b/ws-security-dom/pom.xml
@@ -94,13 +94,6 @@
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
- <dependency>
- <groupId>org.apache.wss4j</groupId>
- <artifactId>wss4j-ws-security-saml</artifactId>
- <version>${project.version}</version>
- <scope>compile</scope>
- <optional>true</optional>
- </dependency>
<dependency>
<groupId>org.ehcache</groupId>
<artifactId>ehcache</artifactId>
@@ -114,6 +107,12 @@
<scope>test</scope>
<classifier>tests</classifier>
</dependency>
+ <dependency>
+ <groupId>org.apache.wss4j</groupId>
+ <artifactId>wss4j-ws-security-saml</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
diff --git
a/ws-security-dom/src/main/java/org/apache/wss4j/dom/str/SignatureSTRParser.java
b/ws-security-dom/src/main/java/org/apache/wss4j/dom/str/SignatureSTRParser.java
index 2d74788c7..e6defc5c1 100644
---
a/ws-security-dom/src/main/java/org/apache/wss4j/dom/str/SignatureSTRParser.java
+++
b/ws-security-dom/src/main/java/org/apache/wss4j/dom/str/SignatureSTRParser.java
@@ -33,12 +33,9 @@ import org.apache.wss4j.common.crypto.Crypto;
import org.apache.wss4j.common.ext.WSPasswordCallback;
import org.apache.wss4j.common.ext.WSSecurityException;
import org.apache.wss4j.common.principal.CustomTokenPrincipal;
-import org.apache.wss4j.common.principal.SAMLTokenPrincipalImpl;
import org.apache.wss4j.common.principal.WSDerivedKeyTokenPrincipal;
-import org.apache.wss4j.common.saml.OpenSAMLUtil;
import org.apache.wss4j.common.saml.SAMLKeyInfo;
import org.apache.wss4j.common.saml.SAMLKeyInfoProcessor;
-import org.apache.wss4j.common.saml.SamlAssertionWrapper;
import org.apache.wss4j.common.token.BinarySecurity;
import org.apache.wss4j.common.token.Reference;
import org.apache.wss4j.common.token.SecurityTokenReference;
@@ -104,7 +101,6 @@ public class SignatureSTRParser implements STRParser {
* A method to create a Principal from a SAML Assertion
* @param samlAssertion An SamlAssertionWrapper object
* @return A principal
- */
private Principal createPrincipalFromSAML(
SamlAssertionWrapper samlAssertion, STRParserResult parserResult
) throws WSSecurityException {
@@ -119,6 +115,7 @@ public class SignatureSTRParser implements STRParser {
}
return samlPrincipal;
}
+ */
/**
* Parse the KeyIdentifier for a SAML Assertion
@@ -373,7 +370,7 @@ public class SignatureSTRParser implements STRParser {
strElement.getOwnerDocument(), wsDocInfo,
data.getCallbackHandler(), uri,
secRef.getReference().getValueType()
);
- SamlAssertionWrapper samlAssertion = null;
+
if (processedToken == null) {
Processor proc =
data.getWssConfig().getProcessor(WSConstants.SAML_TOKEN);
WSSecurityEngineResult samlResult =
proc.handleToken(token, data).get(0);
@@ -398,7 +395,7 @@ public class SignatureSTRParser implements STRParser {
} else {
Optional<SAMLKeyInfoProcessor> keyInfoProcessor =
data.getWssConfig().getSAMLKeyInfoProcessor();
if (keyInfoProcessor.isPresent()) {
- samlAssertion = new
SamlAssertionWrapper(processedToken);
+ /*TODO revisit SamlAssertionWrapper samlAssertion
= new SamlAssertionWrapper(processedToken);
samlAssertion.parseSubject(
keyInfoProcessor.get(), data,
data.getSigVerCrypto()
);
@@ -411,6 +408,7 @@ public class SignatureSTRParser implements STRParser {
}
secretKey = keyInfo.getSecret();
principal = createPrincipalFromSAML(samlAssertion,
parserResult);
+ */
}
}
} else if (el.equals(WSConstants.ENCRYPTED_KEY)) {