JBossWS SVN: r18565 - stack/cxf/branches/asoldano/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2014-04-03 06:32:26 -0400 (Thu, 03 Apr 2014)
New Revision: 18565
Modified:
stack/cxf/branches/asoldano/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/SamlCallbackHandler.java
stack/cxf/branches/asoldano/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/WSSecurityPolicyExamples23xTestCase.java
Log:
Fixing issues with SAML signatures in WS-SecurityPolicy Examples testcase
Modified: stack/cxf/branches/asoldano/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/SamlCallbackHandler.java
===================================================================
--- stack/cxf/branches/asoldano/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/SamlCallbackHandler.java 2014-04-03 10:31:38 UTC (rev 18564)
+++ stack/cxf/branches/asoldano/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/SamlCallbackHandler.java 2014-04-03 10:32:26 UTC (rev 18565)
@@ -13,6 +13,7 @@
import org.apache.wss4j.common.crypto.Crypto;
import org.apache.wss4j.common.crypto.CryptoFactory;
import org.apache.wss4j.common.crypto.CryptoType;
+import org.apache.wss4j.common.ext.WSSecurityException;
import org.apache.wss4j.common.saml.SAMLCallback;
import org.apache.wss4j.common.saml.bean.AttributeBean;
import org.apache.wss4j.common.saml.bean.AttributeStatementBean;
@@ -28,6 +29,8 @@
private String confirmationMethod = SAML2Constants.CONF_BEARER;
private boolean saml2;
+
+ private boolean signed;
public SamlCallbackHandler()
{
@@ -88,9 +91,21 @@
attributeBean.setSimpleName("subject-role");
attributeBean.setQualifiedName("http://custom-ns");
}
- attributeBean.setAttributeValues(Collections.singletonList((Object)"system-user")); //TODO verify
+
+ attributeBean.addAttributeValue("system-user");
attrBean.setSamlAttributes(Collections.singletonList(attributeBean));
callback.setAttributeStatementData(Collections.singletonList(attrBean));
+
+ try {
+ String file = "META-INF/alice.properties";
+ Crypto crypto = CryptoFactory.getInstance(file);
+ callback.setIssuerCrypto(crypto);
+ callback.setIssuerKeyName("alice");
+ callback.setIssuerKeyPassword("password");
+ callback.setSignAssertion(signed);
+ } catch (WSSecurityException e) {
+ throw new IOException(e);
+ }
}
}
}
@@ -119,4 +134,13 @@
return keyInfo;
}
+ public boolean isSigned()
+ {
+ return signed;
+ }
+
+ public void setSigned(boolean signed)
+ {
+ this.signed = signed;
+ }
}
Modified: stack/cxf/branches/asoldano/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/WSSecurityPolicyExamples23xTestCase.java
===================================================================
--- stack/cxf/branches/asoldano/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/WSSecurityPolicyExamples23xTestCase.java 2014-04-03 10:31:38 UTC (rev 18564)
+++ stack/cxf/branches/asoldano/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/WSSecurityPolicyExamples23xTestCase.java 2014-04-03 10:32:26 UTC (rev 18565)
@@ -130,11 +130,11 @@
Map<String, Object> reqCtx = ((BindingProvider) proxy).getRequestContext();
SamlCallbackHandler cbh = new SamlCallbackHandler();
cbh.setConfirmationMethod("urn:oasis:names:tc:SAML:1.0:cm:holder-of-key");
+ cbh.setSigned(true);
reqCtx.put(SecurityConstants.SAML_CALLBACK_HANDLER, cbh);
reqCtx.put(SecurityConstants.SIGNATURE_PROPERTIES, Thread.currentThread().getContextClassLoader().getResource("META-INF/alice.properties"));
reqCtx.put(SecurityConstants.SIGNATURE_USERNAME, "alice");
reqCtx.put(SecurityConstants.CALLBACK_HANDLER, new KeystorePasswordCallback());
- reqCtx.put(SecurityConstants.SELF_SIGN_SAML_ASSERTION, "true");
assertTrue(proxy.sayHello().equals("Hello - (WSS1.0) SAML1.1 Assertion (HK) over SSL"));
}
@@ -175,13 +175,13 @@
Map<String, Object> reqCtx = ((BindingProvider) proxy).getRequestContext();
SamlCallbackHandler cbh = new SamlCallbackHandler();
cbh.setConfirmationMethod("urn:oasis:names:tc:SAML:1.0:cm:holder-of-key");
+ cbh.setSigned(true);
reqCtx.put(SecurityConstants.SAML_CALLBACK_HANDLER, cbh);
reqCtx.put(SecurityConstants.CALLBACK_HANDLER, new KeystorePasswordCallback());
reqCtx.put(SecurityConstants.SIGNATURE_PROPERTIES, Thread.currentThread().getContextClassLoader().getResource("META-INF/alice.properties"));
reqCtx.put(SecurityConstants.ENCRYPT_PROPERTIES, Thread.currentThread().getContextClassLoader().getResource("META-INF/alice.properties"));
reqCtx.put(SecurityConstants.SIGNATURE_USERNAME, "alice");
reqCtx.put(SecurityConstants.ENCRYPT_USERNAME, "bob");
- reqCtx.put(SecurityConstants.SELF_SIGN_SAML_ASSERTION, "true");
try {
assertTrue(proxy.sayHello().equals("Hello - (WSS1.0) SAML1.1 Holder of Key, Sign, Optional Encrypt"));
} catch (Exception e) {
@@ -240,11 +240,11 @@
SamlCallbackHandler cbh = new SamlCallbackHandler();
cbh.setConfirmationMethod("urn:oasis:names:tc:SAML:2.0:cm:holder-of-key");
cbh.setSaml2(true);
+ cbh.setSigned(true);
reqCtx.put(SecurityConstants.SAML_CALLBACK_HANDLER, cbh);
reqCtx.put(SecurityConstants.SIGNATURE_PROPERTIES, Thread.currentThread().getContextClassLoader().getResource("META-INF/alice.properties"));
reqCtx.put(SecurityConstants.SIGNATURE_USERNAME, "alice");
reqCtx.put(SecurityConstants.CALLBACK_HANDLER, new KeystorePasswordCallback());
- reqCtx.put(SecurityConstants.SELF_SIGN_SAML_ASSERTION, "true");
assertTrue(proxy.sayHello().equals("Hello - (WSS1.1) SAML2.0 HoK over SSL"));
}
10 years, 9 months
JBossWS SVN: r18564 - stack/cxf/branches/asoldano.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2014-04-03 06:31:38 -0400 (Thu, 03 Apr 2014)
New Revision: 18564
Modified:
stack/cxf/branches/asoldano/pom.xml
Log:
Temporarly moving to wss4j and santuario snapshots
Modified: stack/cxf/branches/asoldano/pom.xml
===================================================================
--- stack/cxf/branches/asoldano/pom.xml 2014-04-03 10:30:39 UTC (rev 18563)
+++ stack/cxf/branches/asoldano/pom.xml 2014-04-03 10:31:38 UTC (rev 18564)
@@ -105,8 +105,10 @@
<jms.api.version>1.0.1.Final</jms.api.version>
<velocity.version>1.7</velocity.version>
<xerces.version>2.9.1</xerces.version>
- <xmlsec.version>2.0.0-rc1</xmlsec.version>
- <wss4j.version>2.0.0-rc1</wss4j.version>
+<!-- <xmlsec.version>2.0.0-rc1</xmlsec.version> -->
+ <xmlsec.version>2.0.0-SNAPSHOT</xmlsec.version>
+<!-- <wss4j.version>2.0.0-rc1</wss4j.version> -->
+ <wss4j.version>2.0.0-SNAPSHOT</wss4j.version>
<wstx.version>4.2.0</wstx.version>
<spring.version>3.2.8.RELEASE</spring.version>
<shrinkwrap.version>1.1.3</shrinkwrap.version>
10 years, 9 months
JBossWS SVN: r18563 - in stack/cxf/branches/asoldano/modules/resources/src/main/resources/modules: wildfly800/org/apache/ws/security/main and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2014-04-03 06:30:39 -0400 (Thu, 03 Apr 2014)
New Revision: 18563
Modified:
stack/cxf/branches/asoldano/modules/resources/src/main/resources/modules/jboss720/org/apache/ws/security/main/module.xml
stack/cxf/branches/asoldano/modules/resources/src/main/resources/modules/wildfly800/org/apache/ws/security/main/module.xml
Log:
Adding commons-codec dependency to wss4j module
Modified: stack/cxf/branches/asoldano/modules/resources/src/main/resources/modules/jboss720/org/apache/ws/security/main/module.xml
===================================================================
--- stack/cxf/branches/asoldano/modules/resources/src/main/resources/modules/jboss720/org/apache/ws/security/main/module.xml 2014-04-02 16:24:13 UTC (rev 18562)
+++ stack/cxf/branches/asoldano/modules/resources/src/main/resources/modules/jboss720/org/apache/ws/security/main/module.xml 2014-04-03 10:30:39 UTC (rev 18563)
@@ -30,6 +30,7 @@
<dependencies>
<module name="javax.api" />
<module name="javax.xml.rpc.api" />
+ <module name="org.apache.commons.codec" />
<module name="org.apache.commons.logging" />
<module name="org.apache.neethi" />
<module name="org.apache.santuario.xmlsec" />
Modified: stack/cxf/branches/asoldano/modules/resources/src/main/resources/modules/wildfly800/org/apache/ws/security/main/module.xml
===================================================================
--- stack/cxf/branches/asoldano/modules/resources/src/main/resources/modules/wildfly800/org/apache/ws/security/main/module.xml 2014-04-02 16:24:13 UTC (rev 18562)
+++ stack/cxf/branches/asoldano/modules/resources/src/main/resources/modules/wildfly800/org/apache/ws/security/main/module.xml 2014-04-03 10:30:39 UTC (rev 18563)
@@ -30,6 +30,7 @@
<dependencies>
<module name="javax.api" />
<module name="javax.xml.rpc.api" />
+ <module name="org.apache.commons.codec" />
<module name="org.apache.commons.logging" />
<module name="org.apache.neethi" />
<module name="org.apache.santuario.xmlsec" />
10 years, 9 months
JBossWS SVN: r18562 - stack/cxf/branches/asoldano.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2014-04-02 12:24:13 -0400 (Wed, 02 Apr 2014)
New Revision: 18562
Modified:
stack/cxf/branches/asoldano/pom.xml
Log:
Setting proper new wss4j dependency version
Modified: stack/cxf/branches/asoldano/pom.xml
===================================================================
--- stack/cxf/branches/asoldano/pom.xml 2014-04-02 14:36:21 UTC (rev 18561)
+++ stack/cxf/branches/asoldano/pom.xml 2014-04-02 16:24:13 UTC (rev 18562)
@@ -105,7 +105,7 @@
<jms.api.version>1.0.1.Final</jms.api.version>
<velocity.version>1.7</velocity.version>
<xerces.version>2.9.1</xerces.version>
- <xmlsec.version>2.0.0-beta</xmlsec.version>
+ <xmlsec.version>2.0.0-rc1</xmlsec.version>
<wss4j.version>2.0.0-rc1</wss4j.version>
<wstx.version>4.2.0</wstx.version>
<spring.version>3.2.8.RELEASE</spring.version>
@@ -902,11 +902,31 @@
</exclusions>
</dependency>
<dependency>
- <groupId>org.apache.ws.security</groupId>
- <artifactId>wss4j</artifactId>
+ <groupId>org.apache.wss4j</groupId>
+ <artifactId>wss4j-ws-security-common</artifactId>
<version>${wss4j.version}</version>
</dependency>
<dependency>
+ <groupId>org.apache.wss4j</groupId>
+ <artifactId>wss4j-ws-security-dom</artifactId>
+ <version>${wss4j.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.wss4j</groupId>
+ <artifactId>wss4j-ws-security-stax</artifactId>
+ <version>${wss4j.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.wss4j</groupId>
+ <artifactId>wss4j-policy</artifactId>
+ <version>${wss4j.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.wss4j</groupId>
+ <artifactId>wss4j-ws-security-policy-stax</artifactId>
+ <version>${wss4j.version}</version>
+ </dependency>
+ <dependency>
<groupId>org.codehaus.woodstox</groupId>
<artifactId>woodstox-core-asl</artifactId>
<version>${wstx.version}</version>
10 years, 9 months
JBossWS SVN: r18561 - stack/cxf/branches/asoldano.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2014-04-02 10:36:21 -0400 (Wed, 02 Apr 2014)
New Revision: 18561
Modified:
stack/cxf/branches/asoldano/pom.xml
Log:
Temporarly moving to cxf 3.0.0-SNAPSHOT
Modified: stack/cxf/branches/asoldano/pom.xml
===================================================================
--- stack/cxf/branches/asoldano/pom.xml 2014-04-02 14:35:26 UTC (rev 18560)
+++ stack/cxf/branches/asoldano/pom.xml 2014-04-02 14:36:21 UTC (rev 18561)
@@ -71,7 +71,8 @@
<wildfly800.version>8.0.0.Final</wildfly800.version>
<wildfly801.version>8.0.1.Final-SNAPSHOT</wildfly801.version>
<ejb.api.version>1.0.2.Final</ejb.api.version>
- <cxf.version>3.0.0-milestone2</cxf.version>
+ <!--<cxf.version>3.0.0-milestone2</cxf.version>-->
+ <cxf.version>3.0.0-SNAPSHOT</cxf.version>
<cxf.asm.version>3.3.1</cxf.asm.version>
<cxf.xjcplugins.version>2.7.0</cxf.xjcplugins.version>
<jboss.common.core.version>2.2.17.GA</jboss.common.core.version>
10 years, 9 months
JBossWS SVN: r18560 - in stack/cxf/branches/asoldano/modules: resources/src/main/resources/modules/jboss720/org/apache/santuario/xmlsec/main and 3 other directories.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2014-04-02 10:35:26 -0400 (Wed, 02 Apr 2014)
New Revision: 18560
Modified:
stack/cxf/branches/asoldano/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml
stack/cxf/branches/asoldano/modules/resources/src/main/resources/modules/jboss720/org/apache/santuario/xmlsec/main/module.xml
stack/cxf/branches/asoldano/modules/resources/src/main/resources/modules/wildfly800/org/apache/santuario/xmlsec/main/module.xml
stack/cxf/branches/asoldano/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml
stack/cxf/branches/asoldano/modules/testsuite/cxf-tests/pom.xml
Log:
- Adding jasypt to wss4j module
- Adding jaxb dependency to xmlsec module
- Fixing tests with embedded spring
Modified: stack/cxf/branches/asoldano/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml
===================================================================
--- stack/cxf/branches/asoldano/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml 2014-04-02 08:40:23 UTC (rev 18559)
+++ stack/cxf/branches/asoldano/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml 2014-04-02 14:35:26 UTC (rev 18560)
@@ -56,6 +56,7 @@
<include>wsdl4j:wsdl4j:jar</include>
<include>org.apache.ws.xmlschema:xmlschema-core:jar</include>
<include>org.apache.wss4j:wss4j-*:jar</include>
+ <include>org.jasypt:jasypt:jar</include>
<include>org.apache.santuario:xmlsec:jar</include>
<include>asm:asm:jar</include>
<include>org.apache.velocity:velocity:jar</include>
Modified: stack/cxf/branches/asoldano/modules/resources/src/main/resources/modules/jboss720/org/apache/santuario/xmlsec/main/module.xml
===================================================================
--- stack/cxf/branches/asoldano/modules/resources/src/main/resources/modules/jboss720/org/apache/santuario/xmlsec/main/module.xml 2014-04-02 08:40:23 UTC (rev 18559)
+++ stack/cxf/branches/asoldano/modules/resources/src/main/resources/modules/jboss720/org/apache/santuario/xmlsec/main/module.xml 2014-04-02 14:35:26 UTC (rev 18560)
@@ -41,5 +41,7 @@
<module name="org.apache.commons.logging" />
<module name="org.apache.xalan" />
<module name="org.slf4j" />
+ <module name="javax.xml.bind.api" services="import"/>
+ <module name="com.sun.xml.bind" services="import"/>
</dependencies>
</module>
Modified: stack/cxf/branches/asoldano/modules/resources/src/main/resources/modules/wildfly800/org/apache/santuario/xmlsec/main/module.xml
===================================================================
--- stack/cxf/branches/asoldano/modules/resources/src/main/resources/modules/wildfly800/org/apache/santuario/xmlsec/main/module.xml 2014-04-02 08:40:23 UTC (rev 18559)
+++ stack/cxf/branches/asoldano/modules/resources/src/main/resources/modules/wildfly800/org/apache/santuario/xmlsec/main/module.xml 2014-04-02 14:35:26 UTC (rev 18560)
@@ -41,5 +41,7 @@
<module name="org.apache.commons.logging" />
<module name="org.apache.xalan" />
<module name="org.slf4j" />
+ <module name="javax.xml.bind.api" services="import"/>
+ <module name="com.sun.xml.bind" services="import"/>
</dependencies>
</module>
Modified: stack/cxf/branches/asoldano/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml
===================================================================
--- stack/cxf/branches/asoldano/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml 2014-04-02 08:40:23 UTC (rev 18559)
+++ stack/cxf/branches/asoldano/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml 2014-04-02 14:35:26 UTC (rev 18560)
@@ -110,6 +110,7 @@
<copy todir="@{targetdir}/org/apache/ws/security/main" flatten="false" overwrite="true">
<fileset dir="@{thirdpartydir}/lib">
<include name="**/wss4j-*.jar"/>
+ <include name="**/jasypt.jar"/>
</fileset>
</copy>
<copy todir="@{targetdir}/org/apache/ws/xmlschema/main" flatten="false" overwrite="true">
@@ -232,6 +233,7 @@
<copy todir="@{targetdir}/org/apache/ws/security/main" flatten="false" overwrite="true">
<fileset dir="@{thirdpartydir}/lib">
<include name="**/wss4j-*.jar"/>
+ <include name="**/jasypt.jar"/>
</fileset>
</copy>
<copy todir="@{targetdir}/org/apache/ws/xmlschema/main" flatten="false" overwrite="true">
Modified: stack/cxf/branches/asoldano/modules/testsuite/cxf-tests/pom.xml
===================================================================
--- stack/cxf/branches/asoldano/modules/testsuite/cxf-tests/pom.xml 2014-04-02 08:40:23 UTC (rev 18559)
+++ stack/cxf/branches/asoldano/modules/testsuite/cxf-tests/pom.xml 2014-04-02 14:35:26 UTC (rev 18560)
@@ -155,6 +155,11 @@
<artifactId>spring-aop</artifactId>
<version>${test.spring.version}</version>
</artifactItem>
+ <artifactItem>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-asm</artifactId>
+ <version>${test.spring.version}</version>
+ </artifactItem>
</artifactItems>
<outputDirectory>target/spring</outputDirectory>
</configuration>
10 years, 9 months
JBossWS SVN: r18559 - in stack/cxf/branches/asoldano/modules/resources/src/main/resources: modules/jboss720/org/apache/cxf/main and 5 other directories.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2014-04-02 04:40:23 -0400 (Wed, 02 Apr 2014)
New Revision: 18559
Modified:
stack/cxf/branches/asoldano/modules/resources/src/main/resources/modules/jboss720/org/apache/cxf/impl/main/module.xml
stack/cxf/branches/asoldano/modules/resources/src/main/resources/modules/jboss720/org/apache/cxf/main/module.xml
stack/cxf/branches/asoldano/modules/resources/src/main/resources/modules/jboss720/org/apache/ws/security/main/module.xml
stack/cxf/branches/asoldano/modules/resources/src/main/resources/modules/wildfly800/org/apache/cxf/impl/main/module.xml
stack/cxf/branches/asoldano/modules/resources/src/main/resources/modules/wildfly800/org/apache/cxf/main/module.xml
stack/cxf/branches/asoldano/modules/resources/src/main/resources/modules/wildfly800/org/apache/ws/security/main/module.xml
stack/cxf/branches/asoldano/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml
Log:
- Adding neethi dependency in wss4j module
- Adding woodstox dependency in cxf impl module
- Moving cxf-core.jar in cxf api module for now
Modified: stack/cxf/branches/asoldano/modules/resources/src/main/resources/modules/jboss720/org/apache/cxf/impl/main/module.xml
===================================================================
--- stack/cxf/branches/asoldano/modules/resources/src/main/resources/modules/jboss720/org/apache/cxf/impl/main/module.xml 2014-04-01 16:34:52 UTC (rev 18558)
+++ stack/cxf/branches/asoldano/modules/resources/src/main/resources/modules/jboss720/org/apache/cxf/impl/main/module.xml 2014-04-02 08:40:23 UTC (rev 18559)
@@ -49,6 +49,7 @@
<module name="org.apache.ws.xmlschema" />
<module name="org.apache.ws.security" />
<module name="org.apache.santuario.xmlsec" />
+ <module name="org.codehaus.woodstox" />
<module name="org.joda.time" />
<module name="org.opensaml" />
<module name="org.springframework.spring" optional="true">
Modified: stack/cxf/branches/asoldano/modules/resources/src/main/resources/modules/jboss720/org/apache/cxf/main/module.xml
===================================================================
--- stack/cxf/branches/asoldano/modules/resources/src/main/resources/modules/jboss720/org/apache/cxf/main/module.xml 2014-04-01 16:34:52 UTC (rev 18558)
+++ stack/cxf/branches/asoldano/modules/resources/src/main/resources/modules/jboss720/org/apache/cxf/main/module.xml 2014-04-02 08:40:23 UTC (rev 18559)
@@ -38,10 +38,15 @@
<module name="asm.asm" />
<module name="javax.api" />
<module name="javax.annotation.api" />
+ <module name="javax.jws.api" />
<module name="javax.mail.api" />
+ <module name="javax.resource.api" />
<module name="javax.wsdl4j.api" />
<module name="javax.xml.bind.api" services="import"/>
<module name="com.sun.xml.bind" services="import"/>
+ <module name="javax.xml.soap.api" />
+ <module name="javax.xml.stream.api" />
+ <module name="javax.xml.ws.api" />
<module name="org.apache.neethi" />
<module name="org.apache.ws.xmlschema" />
<module name="org.codehaus.woodstox" />
Modified: stack/cxf/branches/asoldano/modules/resources/src/main/resources/modules/jboss720/org/apache/ws/security/main/module.xml
===================================================================
--- stack/cxf/branches/asoldano/modules/resources/src/main/resources/modules/jboss720/org/apache/ws/security/main/module.xml 2014-04-01 16:34:52 UTC (rev 18558)
+++ stack/cxf/branches/asoldano/modules/resources/src/main/resources/modules/jboss720/org/apache/ws/security/main/module.xml 2014-04-02 08:40:23 UTC (rev 18559)
@@ -31,6 +31,7 @@
<module name="javax.api" />
<module name="javax.xml.rpc.api" />
<module name="org.apache.commons.logging" />
+ <module name="org.apache.neethi" />
<module name="org.apache.santuario.xmlsec" />
<module name="org.apache.xalan" />
<module name="org.joda.time" />
Modified: stack/cxf/branches/asoldano/modules/resources/src/main/resources/modules/wildfly800/org/apache/cxf/impl/main/module.xml
===================================================================
--- stack/cxf/branches/asoldano/modules/resources/src/main/resources/modules/wildfly800/org/apache/cxf/impl/main/module.xml 2014-04-01 16:34:52 UTC (rev 18558)
+++ stack/cxf/branches/asoldano/modules/resources/src/main/resources/modules/wildfly800/org/apache/cxf/impl/main/module.xml 2014-04-02 08:40:23 UTC (rev 18559)
@@ -49,6 +49,7 @@
<module name="org.apache.ws.xmlschema" />
<module name="org.apache.ws.security" />
<module name="org.apache.santuario.xmlsec" />
+ <module name="org.codehaus.woodstox" />
<module name="org.joda.time" />
<module name="org.opensaml" />
<module name="org.springframework.spring" optional="true">
Modified: stack/cxf/branches/asoldano/modules/resources/src/main/resources/modules/wildfly800/org/apache/cxf/main/module.xml
===================================================================
--- stack/cxf/branches/asoldano/modules/resources/src/main/resources/modules/wildfly800/org/apache/cxf/main/module.xml 2014-04-01 16:34:52 UTC (rev 18558)
+++ stack/cxf/branches/asoldano/modules/resources/src/main/resources/modules/wildfly800/org/apache/cxf/main/module.xml 2014-04-02 08:40:23 UTC (rev 18559)
@@ -38,10 +38,15 @@
<module name="asm.asm" />
<module name="javax.api" />
<module name="javax.annotation.api" />
+ <module name="javax.jws.api" />
<module name="javax.mail.api" />
+ <module name="javax.resource.api" />
<module name="javax.wsdl4j.api" />
<module name="javax.xml.bind.api" services="import"/>
<module name="com.sun.xml.bind" services="import"/>
+ <module name="javax.xml.soap.api" />
+ <module name="javax.xml.stream.api" />
+ <module name="javax.xml.ws.api" />
<module name="com.sun.xml.fastinfoset"/>
<module name="org.apache.neethi" />
<module name="org.apache.ws.xmlschema" />
Modified: stack/cxf/branches/asoldano/modules/resources/src/main/resources/modules/wildfly800/org/apache/ws/security/main/module.xml
===================================================================
--- stack/cxf/branches/asoldano/modules/resources/src/main/resources/modules/wildfly800/org/apache/ws/security/main/module.xml 2014-04-01 16:34:52 UTC (rev 18558)
+++ stack/cxf/branches/asoldano/modules/resources/src/main/resources/modules/wildfly800/org/apache/ws/security/main/module.xml 2014-04-02 08:40:23 UTC (rev 18559)
@@ -31,6 +31,7 @@
<module name="javax.api" />
<module name="javax.xml.rpc.api" />
<module name="org.apache.commons.logging" />
+ <module name="org.apache.neethi" />
<module name="org.apache.santuario.xmlsec" />
<module name="org.apache.xalan" />
<module name="org.joda.time" />
Modified: stack/cxf/branches/asoldano/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml
===================================================================
--- stack/cxf/branches/asoldano/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml 2014-04-01 16:34:52 UTC (rev 18558)
+++ stack/cxf/branches/asoldano/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml 2014-04-02 08:40:23 UTC (rev 18559)
@@ -68,13 +68,13 @@
</copy>
<copy todir="@{targetdir}/org/apache/cxf/main" flatten="false" overwrite="true">
<fileset dir="@{thirdpartydir}/lib">
- <include name="**/cxf-api*.jar"/>
+ <include name="**/cxf-core*.jar"/>
</fileset>
</copy>
<copy todir="@{targetdir}/org/apache/cxf/impl/main" flatten="false" overwrite="true">
<fileset dir="@{thirdpartydir}/lib">
<include name="**/cxf-*.jar"/>
- <exclude name="**/cxf-api*.jar"/>
+ <exclude name="**/cxf-core*.jar"/>
</fileset>
</copy>
<copy todir="@{targetdir}/org/jboss/ws/api/main" flatten="false" overwrite="true">
@@ -190,13 +190,13 @@
</copy>
<copy todir="@{targetdir}/org/apache/cxf/main" flatten="false" overwrite="true">
<fileset dir="@{thirdpartydir}/lib">
- <include name="**/cxf-api*.jar"/>
+ <include name="**/cxf-core*.jar"/>
</fileset>
</copy>
<copy todir="@{targetdir}/org/apache/cxf/impl/main" flatten="false" overwrite="true">
<fileset dir="@{thirdpartydir}/lib">
<include name="**/cxf-*.jar"/>
- <exclude name="**/cxf-api*.jar"/>
+ <exclude name="**/cxf-core*.jar"/>
</fileset>
</copy>
<copy todir="@{targetdir}/org/jboss/ws/api/main" flatten="false" overwrite="true">
10 years, 9 months
JBossWS SVN: r18558 - in stack/cxf/branches/asoldano/modules/testsuite: cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsseDigest and 10 other directories.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2014-04-01 12:34:52 -0400 (Tue, 01 Apr 2014)
New Revision: 18558
Modified:
stack/cxf/branches/asoldano/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/UsernamePasswordCallback.java
stack/cxf/branches/asoldano/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsseDigest/UsernamePasswordCallback.java
stack/cxf/branches/asoldano/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsseEJB/UsernamePasswordCallback.java
stack/cxf/branches/asoldano/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wssePolicy/UsernamePasswordCallback.java
stack/cxf/branches/asoldano/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/JBWS3516TestCase.java
stack/cxf/branches/asoldano/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3648/KeystorePasswordCallback.java
stack/cxf/branches/asoldano/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3773/JBWS3773TestCase.java
stack/cxf/branches/asoldano/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/UsernamePasswordCallback.java
stack/cxf/branches/asoldano/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaas/UsernameDigestPasswordCallback.java
stack/cxf/branches/asoldano/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaas/UsernamePasswordCallback.java
stack/cxf/branches/asoldano/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaspi/UsernamePasswordCallback.java
stack/cxf/branches/asoldano/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/SamlCallbackHandler.java
stack/cxf/branches/asoldano/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/UsernamePasswordCallback.java
stack/cxf/branches/asoldano/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/shared/ClientCallbackHandler.java
stack/cxf/branches/asoldano/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/shared/UsernameTokenCallbackHandler.java
Log:
Make the testsuite compile
Modified: stack/cxf/branches/asoldano/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/UsernamePasswordCallback.java
===================================================================
--- stack/cxf/branches/asoldano/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/UsernamePasswordCallback.java 2014-04-01 16:07:32 UTC (rev 18557)
+++ stack/cxf/branches/asoldano/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/UsernamePasswordCallback.java 2014-04-01 16:34:52 UTC (rev 18558)
@@ -26,8 +26,9 @@
import javax.security.auth.callback.Callback;
import javax.security.auth.callback.CallbackHandler;
import javax.security.auth.callback.UnsupportedCallbackException;
-import org.apache.ws.security.WSPasswordCallback;
+import org.apache.wss4j.common.ext.WSPasswordCallback;
+
public class UsernamePasswordCallback implements CallbackHandler
{
public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException
Modified: stack/cxf/branches/asoldano/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsseDigest/UsernamePasswordCallback.java
===================================================================
--- stack/cxf/branches/asoldano/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsseDigest/UsernamePasswordCallback.java 2014-04-01 16:07:32 UTC (rev 18557)
+++ stack/cxf/branches/asoldano/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsseDigest/UsernamePasswordCallback.java 2014-04-01 16:34:52 UTC (rev 18558)
@@ -26,8 +26,9 @@
import javax.security.auth.callback.Callback;
import javax.security.auth.callback.CallbackHandler;
import javax.security.auth.callback.UnsupportedCallbackException;
-import org.apache.ws.security.WSPasswordCallback;
+import org.apache.wss4j.common.ext.WSPasswordCallback;
+
public class UsernamePasswordCallback implements CallbackHandler
{
public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException
Modified: stack/cxf/branches/asoldano/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsseEJB/UsernamePasswordCallback.java
===================================================================
--- stack/cxf/branches/asoldano/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsseEJB/UsernamePasswordCallback.java 2014-04-01 16:07:32 UTC (rev 18557)
+++ stack/cxf/branches/asoldano/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsseEJB/UsernamePasswordCallback.java 2014-04-01 16:34:52 UTC (rev 18558)
@@ -26,8 +26,9 @@
import javax.security.auth.callback.Callback;
import javax.security.auth.callback.CallbackHandler;
import javax.security.auth.callback.UnsupportedCallbackException;
-import org.apache.ws.security.WSPasswordCallback;
+import org.apache.wss4j.common.ext.WSPasswordCallback;
+
public class UsernamePasswordCallback implements CallbackHandler
{
public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException
Modified: stack/cxf/branches/asoldano/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wssePolicy/UsernamePasswordCallback.java
===================================================================
--- stack/cxf/branches/asoldano/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wssePolicy/UsernamePasswordCallback.java 2014-04-01 16:07:32 UTC (rev 18557)
+++ stack/cxf/branches/asoldano/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wssePolicy/UsernamePasswordCallback.java 2014-04-01 16:34:52 UTC (rev 18558)
@@ -26,8 +26,9 @@
import javax.security.auth.callback.Callback;
import javax.security.auth.callback.CallbackHandler;
import javax.security.auth.callback.UnsupportedCallbackException;
-import org.apache.ws.security.WSPasswordCallback;
+import org.apache.wss4j.common.ext.WSPasswordCallback;
+
public class UsernamePasswordCallback implements CallbackHandler
{
public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException
Modified: stack/cxf/branches/asoldano/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/JBWS3516TestCase.java
===================================================================
--- stack/cxf/branches/asoldano/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/JBWS3516TestCase.java 2014-04-01 16:07:32 UTC (rev 18557)
+++ stack/cxf/branches/asoldano/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/JBWS3516TestCase.java 2014-04-01 16:34:52 UTC (rev 18558)
@@ -35,7 +35,6 @@
import org.apache.cxf.ws.addressing.AttributedURIType;
import org.apache.cxf.ws.addressing.EndpointReferenceType;
import org.apache.cxf.ws.addressing.JAXWSAConstants;
-import org.apache.cxf.ws.addressing.impl.AddressingPropertiesImpl;
import org.jboss.ws.common.IOUtils;
import org.jboss.wsf.test.JBossWSTest;
import org.jboss.wsf.test.JBossWSTestSetup;
@@ -52,7 +51,7 @@
public void testOneWayFaultTo() throws Exception
{
Greeter greeter = initPort();
- AddressingProperties addrProperties = new AddressingPropertiesImpl();
+ AddressingProperties addrProperties = new AddressingProperties();
EndpointReferenceType faultTo = new EndpointReferenceType();
AttributedURIType epr = new AttributedURIType();
epr.setValue("http://" + getServerHost() + ":8080/jaxws-cxf-jbws3516/target/faultTo");
@@ -81,7 +80,7 @@
{
Greeter greeter = initPort();
- AddressingProperties addrProperties = new AddressingPropertiesImpl();
+ AddressingProperties addrProperties = new AddressingProperties();
EndpointReferenceType faultTo = new EndpointReferenceType();
AttributedURIType epr = new AttributedURIType();
Modified: stack/cxf/branches/asoldano/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3648/KeystorePasswordCallback.java
===================================================================
--- stack/cxf/branches/asoldano/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3648/KeystorePasswordCallback.java 2014-04-01 16:07:32 UTC (rev 18557)
+++ stack/cxf/branches/asoldano/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3648/KeystorePasswordCallback.java 2014-04-01 16:34:52 UTC (rev 18558)
@@ -28,8 +28,9 @@
import javax.security.auth.callback.Callback;
import javax.security.auth.callback.CallbackHandler;
import javax.security.auth.callback.UnsupportedCallbackException;
-import org.apache.ws.security.WSPasswordCallback;
+import org.apache.wss4j.common.ext.WSPasswordCallback;
+
public class KeystorePasswordCallback implements CallbackHandler
{
Modified: stack/cxf/branches/asoldano/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3773/JBWS3773TestCase.java
===================================================================
--- stack/cxf/branches/asoldano/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3773/JBWS3773TestCase.java 2014-04-01 16:07:32 UTC (rev 18557)
+++ stack/cxf/branches/asoldano/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3773/JBWS3773TestCase.java 2014-04-01 16:34:52 UTC (rev 18558)
@@ -35,7 +35,6 @@
import org.apache.cxf.ws.addressing.AttributedURIType;
import org.apache.cxf.ws.addressing.EndpointReferenceType;
import org.apache.cxf.ws.addressing.JAXWSAConstants;
-import org.apache.cxf.ws.addressing.impl.AddressingPropertiesImpl;
import org.jboss.ws.common.IOUtils;
import org.jboss.wsf.test.JBossWSTest;
import org.jboss.wsf.test.JBossWSTestSetup;
@@ -51,7 +50,7 @@
{
Greeter greeter = initPort();
- AddressingProperties addrProperties = new AddressingPropertiesImpl();
+ AddressingProperties addrProperties = new AddressingProperties();
EndpointReferenceType replyTo = new EndpointReferenceType();
AttributedURIType replyToURI = new AttributedURIType();
Modified: stack/cxf/branches/asoldano/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/UsernamePasswordCallback.java
===================================================================
--- stack/cxf/branches/asoldano/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/UsernamePasswordCallback.java 2014-04-01 16:07:32 UTC (rev 18557)
+++ stack/cxf/branches/asoldano/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/UsernamePasswordCallback.java 2014-04-01 16:34:52 UTC (rev 18558)
@@ -26,8 +26,9 @@
import javax.security.auth.callback.Callback;
import javax.security.auth.callback.CallbackHandler;
import javax.security.auth.callback.UnsupportedCallbackException;
-import org.apache.ws.security.WSPasswordCallback;
+import org.apache.wss4j.common.ext.WSPasswordCallback;
+
public class UsernamePasswordCallback implements CallbackHandler
{
public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException
Modified: stack/cxf/branches/asoldano/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaas/UsernameDigestPasswordCallback.java
===================================================================
--- stack/cxf/branches/asoldano/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaas/UsernameDigestPasswordCallback.java 2014-04-01 16:07:32 UTC (rev 18557)
+++ stack/cxf/branches/asoldano/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaas/UsernameDigestPasswordCallback.java 2014-04-01 16:34:52 UTC (rev 18558)
@@ -26,8 +26,9 @@
import javax.security.auth.callback.Callback;
import javax.security.auth.callback.CallbackHandler;
import javax.security.auth.callback.UnsupportedCallbackException;
-import org.apache.ws.security.WSPasswordCallback;
+import org.apache.wss4j.common.ext.WSPasswordCallback;
+
public class UsernameDigestPasswordCallback implements CallbackHandler
{
public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException
Modified: stack/cxf/branches/asoldano/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaas/UsernamePasswordCallback.java
===================================================================
--- stack/cxf/branches/asoldano/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaas/UsernamePasswordCallback.java 2014-04-01 16:07:32 UTC (rev 18557)
+++ stack/cxf/branches/asoldano/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaas/UsernamePasswordCallback.java 2014-04-01 16:34:52 UTC (rev 18558)
@@ -26,8 +26,9 @@
import javax.security.auth.callback.Callback;
import javax.security.auth.callback.CallbackHandler;
import javax.security.auth.callback.UnsupportedCallbackException;
-import org.apache.ws.security.WSPasswordCallback;
+import org.apache.wss4j.common.ext.WSPasswordCallback;
+
public class UsernamePasswordCallback implements CallbackHandler
{
public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException
Modified: stack/cxf/branches/asoldano/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaspi/UsernamePasswordCallback.java
===================================================================
--- stack/cxf/branches/asoldano/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaspi/UsernamePasswordCallback.java 2014-04-01 16:07:32 UTC (rev 18557)
+++ stack/cxf/branches/asoldano/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaspi/UsernamePasswordCallback.java 2014-04-01 16:34:52 UTC (rev 18558)
@@ -26,8 +26,9 @@
import javax.security.auth.callback.Callback;
import javax.security.auth.callback.CallbackHandler;
import javax.security.auth.callback.UnsupportedCallbackException;
-import org.apache.ws.security.WSPasswordCallback;
+import org.apache.wss4j.common.ext.WSPasswordCallback;
+
public class UsernamePasswordCallback implements CallbackHandler
{
public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException
Modified: stack/cxf/branches/asoldano/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/SamlCallbackHandler.java
===================================================================
--- stack/cxf/branches/asoldano/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/SamlCallbackHandler.java 2014-04-01 16:07:32 UTC (rev 18557)
+++ stack/cxf/branches/asoldano/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/SamlCallbackHandler.java 2014-04-01 16:34:52 UTC (rev 18558)
@@ -10,17 +10,17 @@
import javax.security.auth.callback.CallbackHandler;
import javax.security.auth.callback.UnsupportedCallbackException;
-import org.apache.ws.security.components.crypto.Crypto;
-import org.apache.ws.security.components.crypto.CryptoFactory;
-import org.apache.ws.security.components.crypto.CryptoType;
-import org.apache.ws.security.saml.ext.SAMLCallback;
-import org.apache.ws.security.saml.ext.bean.AttributeBean;
-import org.apache.ws.security.saml.ext.bean.AttributeStatementBean;
-import org.apache.ws.security.saml.ext.bean.KeyInfoBean;
-import org.apache.ws.security.saml.ext.bean.KeyInfoBean.CERT_IDENTIFIER;
-import org.apache.ws.security.saml.ext.bean.SubjectBean;
-import org.apache.ws.security.saml.ext.builder.SAML1Constants;
-import org.apache.ws.security.saml.ext.builder.SAML2Constants;
+import org.apache.wss4j.common.crypto.Crypto;
+import org.apache.wss4j.common.crypto.CryptoFactory;
+import org.apache.wss4j.common.crypto.CryptoType;
+import org.apache.wss4j.common.saml.SAMLCallback;
+import org.apache.wss4j.common.saml.bean.AttributeBean;
+import org.apache.wss4j.common.saml.bean.AttributeStatementBean;
+import org.apache.wss4j.common.saml.bean.KeyInfoBean;
+import org.apache.wss4j.common.saml.bean.KeyInfoBean.CERT_IDENTIFIER;
+import org.apache.wss4j.common.saml.bean.SubjectBean;
+import org.apache.wss4j.common.saml.builder.SAML1Constants;
+import org.apache.wss4j.common.saml.builder.SAML2Constants;
import org.opensaml.common.SAMLVersion;
public class SamlCallbackHandler implements CallbackHandler
@@ -88,7 +88,7 @@
attributeBean.setSimpleName("subject-role");
attributeBean.setQualifiedName("http://custom-ns");
}
- attributeBean.setAttributeValues(Collections.singletonList("system-user"));
+ attributeBean.setAttributeValues(Collections.singletonList((Object)"system-user")); //TODO verify
attrBean.setSamlAttributes(Collections.singletonList(attributeBean));
callback.setAttributeStatementData(Collections.singletonList(attrBean));
}
Modified: stack/cxf/branches/asoldano/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/UsernamePasswordCallback.java
===================================================================
--- stack/cxf/branches/asoldano/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/UsernamePasswordCallback.java 2014-04-01 16:07:32 UTC (rev 18557)
+++ stack/cxf/branches/asoldano/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/UsernamePasswordCallback.java 2014-04-01 16:34:52 UTC (rev 18558)
@@ -26,8 +26,9 @@
import javax.security.auth.callback.Callback;
import javax.security.auth.callback.CallbackHandler;
import javax.security.auth.callback.UnsupportedCallbackException;
-import org.apache.ws.security.WSPasswordCallback;
+import org.apache.wss4j.common.ext.WSPasswordCallback;
+
public class UsernamePasswordCallback implements CallbackHandler
{
public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException
Modified: stack/cxf/branches/asoldano/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/shared/ClientCallbackHandler.java
===================================================================
--- stack/cxf/branches/asoldano/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/shared/ClientCallbackHandler.java 2014-04-01 16:07:32 UTC (rev 18557)
+++ stack/cxf/branches/asoldano/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/shared/ClientCallbackHandler.java 2014-04-01 16:34:52 UTC (rev 18558)
@@ -22,8 +22,9 @@
import javax.security.auth.callback.Callback;
import javax.security.auth.callback.CallbackHandler;
import javax.security.auth.callback.UnsupportedCallbackException;
-import org.apache.ws.security.WSPasswordCallback;
+import org.apache.wss4j.common.ext.WSPasswordCallback;
+
public class ClientCallbackHandler implements CallbackHandler {
public void handle(Callback[] callbacks) throws IOException,
Modified: stack/cxf/branches/asoldano/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/shared/UsernameTokenCallbackHandler.java
===================================================================
--- stack/cxf/branches/asoldano/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/shared/UsernameTokenCallbackHandler.java 2014-04-01 16:07:32 UTC (rev 18557)
+++ stack/cxf/branches/asoldano/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/shared/UsernameTokenCallbackHandler.java 2014-04-01 16:34:52 UTC (rev 18558)
@@ -25,8 +25,8 @@
import org.apache.cxf.message.Message;
import org.apache.cxf.ws.security.SecurityConstants;
import org.apache.cxf.ws.security.trust.delegation.DelegationCallback;
-import org.apache.ws.security.WSConstants;
-import org.apache.ws.security.message.token.UsernameToken;
+import org.apache.wss4j.dom.WSConstants;
+import org.apache.wss4j.dom.message.token.UsernameToken;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.Element;
10 years, 9 months
JBossWS SVN: r18557 - in stack/cxf/branches/asoldano/modules: resources/src/main/resources/modules/jboss720/org/apache/santuario/xmlsec/main and 4 other directories.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2014-04-01 12:07:32 -0400 (Tue, 01 Apr 2014)
New Revision: 18557
Modified:
stack/cxf/branches/asoldano/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml
stack/cxf/branches/asoldano/modules/resources/src/main/resources/modules/jboss720/org/apache/santuario/xmlsec/main/module.xml
stack/cxf/branches/asoldano/modules/resources/src/main/resources/modules/jboss720/org/apache/ws/security/main/module.xml
stack/cxf/branches/asoldano/modules/resources/src/main/resources/modules/wildfly800/org/apache/santuario/xmlsec/main/module.xml
stack/cxf/branches/asoldano/modules/resources/src/main/resources/modules/wildfly800/org/apache/ws/security/main/module.xml
stack/cxf/branches/asoldano/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml
stack/cxf/branches/asoldano/modules/resources/src/main/resources/resources/modules-deploy.conf
Log:
Fixing the wss4j and xmlsec modules to let the AS boot with the new stack
Modified: stack/cxf/branches/asoldano/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml
===================================================================
--- stack/cxf/branches/asoldano/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml 2014-04-01 14:45:25 UTC (rev 18556)
+++ stack/cxf/branches/asoldano/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml 2014-04-01 16:07:32 UTC (rev 18557)
@@ -55,7 +55,7 @@
<include>org.apache.neethi:neethi:jar</include>
<include>wsdl4j:wsdl4j:jar</include>
<include>org.apache.ws.xmlschema:xmlschema-core:jar</include>
- <include>org.apache.ws.security:wss4j:jar</include>
+ <include>org.apache.wss4j:wss4j-*:jar</include>
<include>org.apache.santuario:xmlsec:jar</include>
<include>asm:asm:jar</include>
<include>org.apache.velocity:velocity:jar</include>
Modified: stack/cxf/branches/asoldano/modules/resources/src/main/resources/modules/jboss720/org/apache/santuario/xmlsec/main/module.xml
===================================================================
--- stack/cxf/branches/asoldano/modules/resources/src/main/resources/modules/jboss720/org/apache/santuario/xmlsec/main/module.xml 2014-04-01 14:45:25 UTC (rev 18556)
+++ stack/cxf/branches/asoldano/modules/resources/src/main/resources/modules/jboss720/org/apache/santuario/xmlsec/main/module.xml 2014-04-01 16:07:32 UTC (rev 18557)
@@ -40,5 +40,6 @@
<module name="javax.api" />
<module name="org.apache.commons.logging" />
<module name="org.apache.xalan" />
+ <module name="org.slf4j" />
</dependencies>
</module>
Modified: stack/cxf/branches/asoldano/modules/resources/src/main/resources/modules/jboss720/org/apache/ws/security/main/module.xml
===================================================================
--- stack/cxf/branches/asoldano/modules/resources/src/main/resources/modules/jboss720/org/apache/ws/security/main/module.xml 2014-04-01 14:45:25 UTC (rev 18556)
+++ stack/cxf/branches/asoldano/modules/resources/src/main/resources/modules/jboss720/org/apache/ws/security/main/module.xml 2014-04-01 16:07:32 UTC (rev 18557)
@@ -35,5 +35,6 @@
<module name="org.apache.xalan" />
<module name="org.joda.time" />
<module name="org.opensaml" />
+ <module name="org.slf4j" />
</dependencies>
</module>
Modified: stack/cxf/branches/asoldano/modules/resources/src/main/resources/modules/wildfly800/org/apache/santuario/xmlsec/main/module.xml
===================================================================
--- stack/cxf/branches/asoldano/modules/resources/src/main/resources/modules/wildfly800/org/apache/santuario/xmlsec/main/module.xml 2014-04-01 14:45:25 UTC (rev 18556)
+++ stack/cxf/branches/asoldano/modules/resources/src/main/resources/modules/wildfly800/org/apache/santuario/xmlsec/main/module.xml 2014-04-01 16:07:32 UTC (rev 18557)
@@ -40,5 +40,6 @@
<module name="javax.api" />
<module name="org.apache.commons.logging" />
<module name="org.apache.xalan" />
+ <module name="org.slf4j" />
</dependencies>
</module>
Modified: stack/cxf/branches/asoldano/modules/resources/src/main/resources/modules/wildfly800/org/apache/ws/security/main/module.xml
===================================================================
--- stack/cxf/branches/asoldano/modules/resources/src/main/resources/modules/wildfly800/org/apache/ws/security/main/module.xml 2014-04-01 14:45:25 UTC (rev 18556)
+++ stack/cxf/branches/asoldano/modules/resources/src/main/resources/modules/wildfly800/org/apache/ws/security/main/module.xml 2014-04-01 16:07:32 UTC (rev 18557)
@@ -35,5 +35,6 @@
<module name="org.apache.xalan" />
<module name="org.joda.time" />
<module name="org.opensaml" />
+ <module name="org.slf4j" />
</dependencies>
</module>
Modified: stack/cxf/branches/asoldano/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml
===================================================================
--- stack/cxf/branches/asoldano/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml 2014-04-01 14:45:25 UTC (rev 18556)
+++ stack/cxf/branches/asoldano/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml 2014-04-01 16:07:32 UTC (rev 18557)
@@ -109,7 +109,7 @@
</copy>
<copy todir="@{targetdir}/org/apache/ws/security/main" flatten="false" overwrite="true">
<fileset dir="@{thirdpartydir}/lib">
- <include name="**/wss4j.jar"/>
+ <include name="**/wss4j-*.jar"/>
</fileset>
</copy>
<copy todir="@{targetdir}/org/apache/ws/xmlschema/main" flatten="false" overwrite="true">
@@ -231,7 +231,7 @@
</copy>
<copy todir="@{targetdir}/org/apache/ws/security/main" flatten="false" overwrite="true">
<fileset dir="@{thirdpartydir}/lib">
- <include name="**/wss4j.jar"/>
+ <include name="**/wss4j-*.jar"/>
</fileset>
</copy>
<copy todir="@{targetdir}/org/apache/ws/xmlschema/main" flatten="false" overwrite="true">
Modified: stack/cxf/branches/asoldano/modules/resources/src/main/resources/resources/modules-deploy.conf
===================================================================
--- stack/cxf/branches/asoldano/modules/resources/src/main/resources/resources/modules-deploy.conf 2014-04-01 14:45:25 UTC (rev 18556)
+++ stack/cxf/branches/asoldano/modules/resources/src/main/resources/resources/modules-deploy.conf 2014-04-01 16:07:32 UTC (rev 18557)
@@ -1 +1 @@
-org/apache/cxf/**, org/apache/neethi/**, org/apache/ws/commons/xmlschema/**, org/jboss/ws/cxf/**, org/jboss/ws/api/**, org/jboss/ws/common/**, org/jboss/ws/jaxws-client/**, org/jboss/ws/jaxws-jboss-httpserver-httpspi/**, org/jboss/ws/jaxws-undertow-httpspi/**,org/jboss/ws/saaj-impl/**, org/jboss/ws/spi/**, org/jboss/ws/tools/**, org/opensaml/**, org/springframework/spring/**, org/jboss/ws/native/**
+org/apache/cxf/**, org/apache/ws/security/**, org/apache/neethi/**, org/apache/ws/commons/xmlschema/**, org/jboss/ws/cxf/**, org/jboss/ws/api/**, org/jboss/ws/common/**, org/jboss/ws/jaxws-client/**, org/jboss/ws/jaxws-jboss-httpserver-httpspi/**, org/jboss/ws/jaxws-undertow-httpspi/**,org/jboss/ws/saaj-impl/**, org/jboss/ws/spi/**, org/jboss/ws/tools/**, org/opensaml/**, org/springframework/spring/**, org/jboss/ws/native/**
10 years, 9 months
JBossWS SVN: r18556 - in stack/cxf/branches/asoldano: modules/addons/transports/http/httpserver and 19 other directories.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2014-04-01 10:45:25 -0400 (Tue, 01 Apr 2014)
New Revision: 18556
Added:
stack/cxf/branches/asoldano/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/SecurityActions.java
Modified:
stack/cxf/branches/asoldano/modules/addons/transports/http/httpserver/pom.xml
stack/cxf/branches/asoldano/modules/addons/transports/http/undertow/pom.xml
stack/cxf/branches/asoldano/modules/addons/transports/udp/src/main/java/org/jboss/wsf/stack/cxf/addons/transports/udp/UDPTransportFactory.java
stack/cxf/branches/asoldano/modules/client/pom.xml
stack/cxf/branches/asoldano/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/BeanCustomizer.java
stack/cxf/branches/asoldano/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/CXFHandlerResolverImpl.java
stack/cxf/branches/asoldano/modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/addressing/map/CXFMAPBuilder.java
stack/cxf/branches/asoldano/modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/policy/PolicyAttachment.java
stack/cxf/branches/asoldano/modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/security/PasswordCallbackHandler.java
stack/cxf/branches/asoldano/modules/client/src/main/java/org/jboss/wsf/stack/cxf/saaj/SOAPConnectionImpl.java
stack/cxf/branches/asoldano/modules/dist/pom.xml
stack/cxf/branches/asoldano/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml
stack/cxf/branches/asoldano/modules/server/pom.xml
stack/cxf/branches/asoldano/modules/server/src/main/java/org/jboss/wsf/stack/cxf/JBossWSInvoker.java
stack/cxf/branches/asoldano/modules/server/src/main/java/org/jboss/wsf/stack/cxf/RequestHandlerImpl.java
stack/cxf/branches/asoldano/modules/server/src/main/java/org/jboss/wsf/stack/cxf/config/CXFStackConfigFactory.java
stack/cxf/branches/asoldano/modules/server/src/main/java/org/jboss/wsf/stack/cxf/security/authentication/AutenticationMgrSubjectCreatingInterceptor.java
stack/cxf/branches/asoldano/modules/server/src/main/java/org/jboss/wsf/stack/cxf/security/authentication/SubjectCreatingInterceptor.java
stack/cxf/branches/asoldano/modules/server/src/main/java/org/jboss/wsf/stack/cxf/security/authentication/SubjectCreatingPolicyInterceptor.java
stack/cxf/branches/asoldano/modules/server/src/main/java/org/jboss/wsf/stack/cxf/security/authentication/SubjectCreator.java
stack/cxf/branches/asoldano/modules/server/src/test/java/org/jboss/wsf/stack/cxf/JBossWSInvokerTest.java
stack/cxf/branches/asoldano/modules/testsuite/cxf-spring-tests/pom.xml
stack/cxf/branches/asoldano/modules/testsuite/cxf-tests/pom.xml
stack/cxf/branches/asoldano/modules/testsuite/pom.xml
stack/cxf/branches/asoldano/pom.xml
Log:
Initial changes to use Apache CXF 3.0 dependency and have the jbossws-cxf stack at least compile with it (WIP)
Modified: stack/cxf/branches/asoldano/modules/addons/transports/http/httpserver/pom.xml
===================================================================
--- stack/cxf/branches/asoldano/modules/addons/transports/http/httpserver/pom.xml 2014-04-01 12:29:55 UTC (rev 18555)
+++ stack/cxf/branches/asoldano/modules/addons/transports/http/httpserver/pom.xml 2014-04-01 14:45:25 UTC (rev 18556)
@@ -47,10 +47,6 @@
</dependency>
<dependency>
<groupId>org.springframework</groupId>
- <artifactId>spring-asm</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
</dependency>
<dependency>
Modified: stack/cxf/branches/asoldano/modules/addons/transports/http/undertow/pom.xml
===================================================================
--- stack/cxf/branches/asoldano/modules/addons/transports/http/undertow/pom.xml 2014-04-01 12:29:55 UTC (rev 18555)
+++ stack/cxf/branches/asoldano/modules/addons/transports/http/undertow/pom.xml 2014-04-01 14:45:25 UTC (rev 18556)
@@ -36,10 +36,6 @@
</dependency>
<dependency>
<groupId>org.springframework</groupId>
- <artifactId>spring-asm</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
</dependency>
<dependency>
Modified: stack/cxf/branches/asoldano/modules/addons/transports/udp/src/main/java/org/jboss/wsf/stack/cxf/addons/transports/udp/UDPTransportFactory.java
===================================================================
--- stack/cxf/branches/asoldano/modules/addons/transports/udp/src/main/java/org/jboss/wsf/stack/cxf/addons/transports/udp/UDPTransportFactory.java 2014-04-01 12:29:55 UTC (rev 18555)
+++ stack/cxf/branches/asoldano/modules/addons/transports/udp/src/main/java/org/jboss/wsf/stack/cxf/addons/transports/udp/UDPTransportFactory.java 2014-04-01 14:45:25 UTC (rev 18556)
@@ -30,8 +30,6 @@
import java.util.logging.Level;
import java.util.logging.Logger;
-import javax.annotation.Resource;
-
import org.apache.cxf.Bus;
import org.apache.cxf.common.injection.NoJSR250Annotations;
import org.apache.cxf.common.logging.LogUtils;
@@ -44,7 +42,7 @@
import org.apache.cxf.ws.addressing.AttributedURIType;
import org.apache.cxf.ws.addressing.EndpointReferenceType;
-@NoJSR250Annotations(unlessNull = { "bus" })
+@NoJSR250Annotations
public class UDPTransportFactory extends AbstractTransportFactory
implements DestinationFactory, ConduitInitiator {
@@ -64,22 +62,16 @@
this(null);
}
public UDPTransportFactory(Bus b) {
- super(DEFAULT_NAMESPACES, null);
- bus = b;
- register();
+ super(DEFAULT_NAMESPACES);
}
- @Resource(name = "cxf")
- public void setBus(Bus b) {
- super.setBus(b);
+ public Destination getDestination(EndpointInfo ei, Bus bus) throws IOException {
+ return getDestination(ei, null, bus);
}
- public Destination getDestination(EndpointInfo ei) throws IOException {
- return getDestination(ei, null);
- }
-
protected Destination getDestination(EndpointInfo ei,
- EndpointReferenceType reference)
+ EndpointReferenceType reference,
+ Bus bus)
throws IOException {
if (reference == null) {
reference = createReference(ei);
@@ -88,11 +80,11 @@
}
- public Conduit getConduit(EndpointInfo ei) throws IOException {
- return getConduit(ei, null);
+ public Conduit getConduit(EndpointInfo ei, Bus bus) throws IOException {
+ return getConduit(ei, null, bus);
}
- public Conduit getConduit(EndpointInfo ei, EndpointReferenceType target) throws IOException {
+ public Conduit getConduit(EndpointInfo ei, EndpointReferenceType target, Bus bus) throws IOException {
LOG.log(Level.FINE, "Creating conduit for {0}", ei.getAddress());
if (target == null) {
target = createReference(ei);
Modified: stack/cxf/branches/asoldano/modules/client/pom.xml
===================================================================
--- stack/cxf/branches/asoldano/modules/client/pom.xml 2014-04-01 12:29:55 UTC (rev 18555)
+++ stack/cxf/branches/asoldano/modules/client/pom.xml 2014-04-01 14:45:25 UTC (rev 18556)
@@ -165,10 +165,6 @@
</dependency>
<dependency>
<groupId>org.springframework</groupId>
- <artifactId>spring-asm</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
</dependency>
<dependency>
Modified: stack/cxf/branches/asoldano/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/BeanCustomizer.java
===================================================================
--- stack/cxf/branches/asoldano/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/BeanCustomizer.java 2014-04-01 12:29:55 UTC (rev 18555)
+++ stack/cxf/branches/asoldano/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/BeanCustomizer.java 2014-04-01 14:45:25 UTC (rev 18556)
@@ -26,7 +26,7 @@
import org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory;
import org.apache.cxf.frontend.ClientProxyFactoryBean;
import org.apache.cxf.jaxb.JAXBDataBinding;
-import org.apache.cxf.service.factory.ReflectionServiceFactoryBean;
+import org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean;
import org.apache.cxf.transport.http.HTTPConduit;
import org.jboss.ws.api.binding.BindingCustomization;
import org.jboss.ws.api.binding.JAXBBindingCustomization;
Modified: stack/cxf/branches/asoldano/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/CXFHandlerResolverImpl.java
===================================================================
--- stack/cxf/branches/asoldano/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/CXFHandlerResolverImpl.java 2014-04-01 12:29:55 UTC (rev 18555)
+++ stack/cxf/branches/asoldano/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/CXFHandlerResolverImpl.java 2014-04-01 14:45:25 UTC (rev 18556)
@@ -40,9 +40,12 @@
*/
package org.jboss.wsf.stack.cxf.client.serviceref;
+import static org.jboss.wsf.stack.cxf.Loggers.DEPLOYMENT_LOGGER;
import static org.jboss.wsf.stack.cxf.Messages.MESSAGES;
import java.io.File;
+
+import org.jboss.ws.common.DOMUtils;
import org.jboss.wsf.spi.metadata.ParserConstants;
import java.io.IOException;
@@ -55,9 +58,13 @@
import java.util.Map;
import java.util.regex.Pattern;
+import javax.xml.XMLConstants;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
import javax.xml.namespace.QName;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
import javax.xml.ws.WebServiceException;
import javax.xml.ws.handler.Handler;
import javax.xml.ws.handler.HandlerResolver;
@@ -66,7 +73,6 @@
import org.apache.cxf.Bus;
import org.apache.cxf.common.injection.ResourceInjector;
-import org.apache.cxf.helpers.XMLUtils;
import org.apache.cxf.jaxws.handler.HandlerChainBuilder;
import org.apache.cxf.jaxws.javaee.PortComponentHandlerType;
import org.apache.cxf.resource.DefaultResourceManager;
@@ -89,6 +95,7 @@
private final Class<?> clazz;
private final ClassLoader classLoader;
private final Bus bus;
+ private static DocumentBuilder builder;
public CXFHandlerResolverImpl(Bus bus, String handlerFile, Class<?> clazz)
{
@@ -151,7 +158,7 @@
throw MESSAGES.handlerConfigFileNotFound(handlerFile);
}
- Document doc = XMLUtils.parse(is);
+ Document doc = getDocumentBuilder().parse(is);
Element el = doc.getDocumentElement();
if (!ParserConstants.JAVAEE_NS.equals(el.getNamespaceURI())
|| !ParserConstants.HANDLER_CHAINS.equals(el.getLocalName())) {
@@ -196,7 +203,7 @@
if (cur instanceof Element) {
el = (Element)cur;
if (!el.getNamespaceURI().equals(ParserConstants.JAVAEE_NS)) {
- String xml = XMLUtils.toString(el);
+ String xml = "{" + el.getNamespaceURI() + "}" + el.getLocalName();
throw MESSAGES.invalidElementInHandler(handlerFile, xml);
}
String name = el.getLocalName();
@@ -370,5 +377,35 @@
}
return context;
}
+
+ private static synchronized DocumentBuilder getDocumentBuilder()
+ {
+ if (builder == null)
+ {
+ final ClassLoader classLoader = SecurityActions.getContextClassLoader();
+ SecurityActions.setContextClassLoader(CXFHandlerResolverImpl.class.getClassLoader());
+ try
+ {
+ DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+ factory.setValidating(false);
+ factory.setNamespaceAware(true);
+ factory.setExpandEntityReferences(false);
+ try
+ {
+ factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);
+ }
+ catch (ParserConfigurationException pce)
+ {
+ DEPLOYMENT_LOGGER.error(pce);
+ }
+ builder = DOMUtils.newDocumentBuilder(factory);
+ }
+ finally
+ {
+ SecurityActions.setContextClassLoader(classLoader);
+ }
+ }
+ return builder;
+ }
}
Added: stack/cxf/branches/asoldano/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/SecurityActions.java
===================================================================
--- stack/cxf/branches/asoldano/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/SecurityActions.java (rev 0)
+++ stack/cxf/branches/asoldano/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/SecurityActions.java 2014-04-01 14:45:25 UTC (rev 18556)
@@ -0,0 +1,101 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2013, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.stack.cxf.client.serviceref;
+
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+
+/**
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 03-Oct-2013
+ *
+ */
+class SecurityActions
+{
+ /**
+ * Get context classloader.
+ *
+ * @return the current context classloader
+ */
+ static ClassLoader getContextClassLoader()
+ {
+ SecurityManager sm = System.getSecurityManager();
+ if (sm == null)
+ {
+ return Thread.currentThread().getContextClassLoader();
+ }
+ else
+ {
+ return AccessController.doPrivileged(new PrivilegedAction<ClassLoader>()
+ {
+ public ClassLoader run()
+ {
+ return Thread.currentThread().getContextClassLoader();
+ }
+ });
+ }
+ }
+
+ /**
+ * Set context classloader.
+ *
+ * @param classLoader the classloader
+ */
+ static void setContextClassLoader(final ClassLoader classLoader)
+ {
+ if (System.getSecurityManager() == null)
+ {
+ Thread.currentThread().setContextClassLoader(classLoader);
+ }
+ else
+ {
+ AccessController.doPrivileged(new PrivilegedAction<Object>()
+ {
+ public Object run()
+ {
+ Thread.currentThread().setContextClassLoader(classLoader);
+ return null;
+ }
+ });
+ }
+ }
+
+ /**
+ * Return the current value of the specified system property
+ *
+ * @param name
+ * @param defaultValue
+ * @return
+ */
+ static String getSystemProperty(final String name, final String defaultValue)
+ {
+ PrivilegedAction<String> action = new PrivilegedAction<String>()
+ {
+ public String run()
+ {
+ return System.getProperty(name, defaultValue);
+ }
+ };
+ return AccessController.doPrivileged(action);
+ }
+}
Property changes on: stack/cxf/branches/asoldano/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/SecurityActions.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Modified: stack/cxf/branches/asoldano/modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/addressing/map/CXFMAPBuilder.java
===================================================================
--- stack/cxf/branches/asoldano/modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/addressing/map/CXFMAPBuilder.java 2014-04-01 12:29:55 UTC (rev 18555)
+++ stack/cxf/branches/asoldano/modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/addressing/map/CXFMAPBuilder.java 2014-04-01 14:45:25 UTC (rev 18556)
@@ -25,7 +25,6 @@
import javax.xml.namespace.QName;
-import org.apache.cxf.ws.addressing.AddressingBuilder;
import org.apache.cxf.ws.addressing.AddressingConstants;
import org.apache.cxf.ws.addressing.AddressingProperties;
import org.apache.cxf.ws.addressing.AttributedURIType;
@@ -47,8 +46,6 @@
*/
public class CXFMAPBuilder implements MAPBuilder
{
- private AddressingBuilder addressingBuilder;
-
private static MAPBuilder theBuilder = new CXFMAPBuilder();
public static MAPBuilder getBuilder()
@@ -58,13 +55,11 @@
private CXFMAPBuilder()
{
- AddressingBuilder implementation = AddressingBuilder.getAddressingBuilder();
- this.addressingBuilder = implementation;
}
public MAP newMap()
{
- AddressingProperties implementation = addressingBuilder.newAddressingProperties();
+ AddressingProperties implementation = new AddressingProperties();
return new CXFMAP(implementation);
}
@@ -89,7 +84,7 @@
AddressingProperties implementation = (AddressingProperties)ctx.get(CXFMAPConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND);
if (implementation == null)
{
- implementation = addressingBuilder.newAddressingProperties();
+ implementation = new AddressingProperties();
ctx.put(CXFMAPConstants.CLIENT_ADDRESSING_PROPERTIES, implementation);
ctx.put(CXFMAPConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, implementation);
}
@@ -104,7 +99,7 @@
public MAPConstants newConstants()
{
- AddressingConstants implementation = addressingBuilder.newAddressingConstants();
+ AddressingConstants implementation = new AddressingConstants();
return new CXFMAPConstants(implementation);
}
Modified: stack/cxf/branches/asoldano/modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/policy/PolicyAttachment.java
===================================================================
--- stack/cxf/branches/asoldano/modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/policy/PolicyAttachment.java 2014-04-01 12:29:55 UTC (rev 18555)
+++ stack/cxf/branches/asoldano/modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/policy/PolicyAttachment.java 2014-04-01 14:45:25 UTC (rev 18556)
@@ -84,7 +84,11 @@
}
finally
{
- StaxUtils.close(reader);
+ try {
+ StaxUtils.close(reader);
+ } catch (Exception e) {
+ //ignore
+ }
if (is != null) {
try {
is.close();
Modified: stack/cxf/branches/asoldano/modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/security/PasswordCallbackHandler.java
===================================================================
--- stack/cxf/branches/asoldano/modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/security/PasswordCallbackHandler.java 2014-04-01 12:29:55 UTC (rev 18555)
+++ stack/cxf/branches/asoldano/modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/security/PasswordCallbackHandler.java 2014-04-01 14:45:25 UTC (rev 18556)
@@ -28,8 +28,9 @@
import javax.security.auth.callback.Callback;
import javax.security.auth.callback.CallbackHandler;
import javax.security.auth.callback.UnsupportedCallbackException;
-import org.apache.ws.security.WSPasswordCallback;
+import org.apache.wss4j.common.ext.WSPasswordCallback;
+
public class PasswordCallbackHandler implements CallbackHandler
{
Modified: stack/cxf/branches/asoldano/modules/client/src/main/java/org/jboss/wsf/stack/cxf/saaj/SOAPConnectionImpl.java
===================================================================
--- stack/cxf/branches/asoldano/modules/client/src/main/java/org/jboss/wsf/stack/cxf/saaj/SOAPConnectionImpl.java 2014-04-01 12:29:55 UTC (rev 18555)
+++ stack/cxf/branches/asoldano/modules/client/src/main/java/org/jboss/wsf/stack/cxf/saaj/SOAPConnectionImpl.java 2014-04-01 14:45:25 UTC (rev 18556)
@@ -79,7 +79,7 @@
// sent SOAPMessage
try
{
- final Conduit c = ci.getConduit(info);
+ final Conduit c = ci.getConduit(info, BusFactory.getThreadDefaultBus(false)); //TODO verify bus
Map<String, List<String>> outHeaders = new HashMap<String, List<String>>();
@@ -147,7 +147,7 @@
// sent GET request
try
{
- final Conduit c = ci.getConduit(info);
+ final Conduit c = ci.getConduit(info, BusFactory.getThreadDefaultBus(false)); //TODO verify bus
if (c instanceof HTTPConduit)
{
Modified: stack/cxf/branches/asoldano/modules/dist/pom.xml
===================================================================
--- stack/cxf/branches/asoldano/modules/dist/pom.xml 2014-04-01 12:29:55 UTC (rev 18555)
+++ stack/cxf/branches/asoldano/modules/dist/pom.xml 2014-04-01 14:45:25 UTC (rev 18556)
@@ -96,10 +96,6 @@
</dependency>
<dependency>
<groupId>org.springframework</groupId>
- <artifactId>spring-asm</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
</dependency>
<dependency>
Modified: stack/cxf/branches/asoldano/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml
===================================================================
--- stack/cxf/branches/asoldano/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml 2014-04-01 12:29:55 UTC (rev 18555)
+++ stack/cxf/branches/asoldano/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml 2014-04-01 14:45:25 UTC (rev 18556)
@@ -77,7 +77,6 @@
<unpack>false</unpack>
<includes>
<include>org.springframework:spring-aop:jar</include>
- <include>org.springframework:spring-asm:jar</include>
<include>org.springframework:spring-beans:jar</include>
<include>org.springframework:spring-context:jar</include>
<include>org.springframework:spring-core:jar</include>
Modified: stack/cxf/branches/asoldano/modules/server/pom.xml
===================================================================
--- stack/cxf/branches/asoldano/modules/server/pom.xml 2014-04-01 12:29:55 UTC (rev 18555)
+++ stack/cxf/branches/asoldano/modules/server/pom.xml 2014-04-01 14:45:25 UTC (rev 18556)
@@ -169,10 +169,6 @@
</dependency>
<dependency>
<groupId>org.springframework</groupId>
- <artifactId>spring-asm</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
</dependency>
<dependency>
Modified: stack/cxf/branches/asoldano/modules/server/src/main/java/org/jboss/wsf/stack/cxf/JBossWSInvoker.java
===================================================================
--- stack/cxf/branches/asoldano/modules/server/src/main/java/org/jboss/wsf/stack/cxf/JBossWSInvoker.java 2014-04-01 12:29:55 UTC (rev 18555)
+++ stack/cxf/branches/asoldano/modules/server/src/main/java/org/jboss/wsf/stack/cxf/JBossWSInvoker.java 2014-04-01 14:45:25 UTC (rev 18556)
@@ -126,7 +126,7 @@
} else if (o != null) {
params = new MessageContentsList(o);
}
- return invoke(exchange, targetBean, adjustMethodAndParams(md.getMethod(bop), exchange, params), params);
+ return invoke(exchange, targetBean, adjustMethodAndParams(md.getMethod(bop), exchange, params, targetBean.getClass()), params);
}
/**
Modified: stack/cxf/branches/asoldano/modules/server/src/main/java/org/jboss/wsf/stack/cxf/RequestHandlerImpl.java
===================================================================
--- stack/cxf/branches/asoldano/modules/server/src/main/java/org/jboss/wsf/stack/cxf/RequestHandlerImpl.java 2014-04-01 12:29:55 UTC (rev 18555)
+++ stack/cxf/branches/asoldano/modules/server/src/main/java/org/jboss/wsf/stack/cxf/RequestHandlerImpl.java 2014-04-01 14:45:25 UTC (rev 18556)
@@ -27,7 +27,6 @@
import java.io.Writer;
import java.net.MalformedURLException;
import java.net.URL;
-import java.security.AccessController;
import java.util.Collection;
import java.util.regex.Pattern;
@@ -40,23 +39,16 @@
import org.apache.cxf.Bus;
import org.apache.cxf.BusException;
-import org.apache.cxf.frontend.WSDLGetUtils;
-import org.apache.cxf.service.model.EndpointInfo;
import org.apache.cxf.transport.DestinationFactory;
import org.apache.cxf.transport.DestinationFactoryManager;
import org.apache.cxf.transport.http.AbstractHTTPDestination;
import org.apache.cxf.transport.http.DestinationRegistry;
import org.apache.cxf.transport.http.HTTPTransportFactory;
-import org.apache.cxf.transports.http.QueryHandler;
-import org.apache.cxf.transports.http.QueryHandlerRegistry;
import org.jboss.util.NotImplementedException;
-import org.jboss.ws.common.management.AbstractServerConfig;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.invocation.InvocationContext;
import org.jboss.wsf.spi.invocation.RequestHandler;
import org.jboss.wsf.spi.management.EndpointMetrics;
-import org.jboss.wsf.spi.management.ServerConfig;
-import org.jboss.wsf.stack.cxf.addressRewrite.SoapAddressRewriteHelper;
import org.jboss.wsf.stack.cxf.configuration.BusHolder;
/**
@@ -83,32 +75,41 @@
public void handleHttpRequest(Endpoint ep, HttpServletRequest req, HttpServletResponse res, ServletContext context) throws ServletException, IOException
{
+ if ("GET".equals(req.getMethod()))
+ {
+ final String queryString = req.getQueryString();
+ if ((null == queryString) || (queryString.length() == 0)) {
+ //reject HTTP GET without query string (only support messages sent w/ POST)
+ res.setStatus(405);
+ res.setContentType("text/plain");
+ Writer out = res.getWriter();
+ out.write("HTTP GET not supported");
+ out.close();
+ return;
+ }
+ }
+
+ Long beginTime = initRequestMetrics(ep);
Bus bus = ep.getService().getDeployment().getAttachment(BusHolder.class).getBus();
AbstractHTTPDestination dest = findDestination(req, bus);
-
- boolean requestHandled = handleQuery(req, res, dest, bus);
- if (false == requestHandled)
+ HttpServletResponseWrapper response = new HttpServletResponseWrapper(res);
+ try
{
- Long beginTime = initRequestMetrics(ep);
- HttpServletResponseWrapper response = new HttpServletResponseWrapper(res);
- try
- {
- ServletConfig cfg = (ServletConfig)context.getAttribute(ServletConfig.class.getName());
- dest.invoke(cfg, context, req, response);
- }
- catch (IOException e)
- {
- throw new ServletException(e);
- }
- if (response.getStatus() < 500)
- {
- processResponseMetrics(ep, beginTime);
- }
- else
- {
- processFaultMetrics(ep, beginTime);
- }
+ ServletConfig cfg = (ServletConfig)context.getAttribute(ServletConfig.class.getName());
+ dest.invoke(cfg, context, req, response);
}
+ catch (IOException e)
+ {
+ throw new ServletException(e);
+ }
+ if (response.getStatus() < 500)
+ {
+ processResponseMetrics(ep, beginTime);
+ }
+ else
+ {
+ processFaultMetrics(ep, beginTime);
+ }
}
public void handleRequest(Endpoint endpoint, InputStream inStream, OutputStream outStream, InvocationContext context)
@@ -184,70 +185,6 @@
return null;
}
- /**
- * When request includes query it tries to lookup the query handler and tries to handle the request message
- * @param req request
- * @param res response
- * @param dest destination
- * @return true if there was a query handler that successfully handled the request, false otherwise
- * @throws ServletException if some problem occurs
- */
- private final boolean handleQuery(HttpServletRequest req, HttpServletResponse res, AbstractHTTPDestination dest, Bus bus)
- throws ServletException, IOException
- {
- final String queryString = req.getQueryString();
- if ((null != queryString) && (queryString.length() > 0))
- {
- final QueryHandlerRegistry qhr = bus.getExtension(QueryHandlerRegistry.class);
- if (qhr != null) {
- final String ctxUri = req.getRequestURI();
- final String baseUri = req.getRequestURL().toString() + "?" + queryString;
- final EndpointInfo endpointInfo = dest.getEndpointInfo();
- final boolean autoRewrite = SoapAddressRewriteHelper.isAutoRewriteOn(getServerConfig());
- endpointInfo.setProperty(WSDLGetUtils.AUTO_REWRITE_ADDRESS, autoRewrite);
- endpointInfo.setProperty(WSDLGetUtils.AUTO_REWRITE_ADDRESS_ALL, autoRewrite);
-
- for (QueryHandler queryHandler : qhr.getHandlers())
- {
- if (queryHandler.isRecognizedQuery(baseUri, ctxUri, endpointInfo))
- {
- res.setContentType(queryHandler.getResponseContentType(baseUri, ctxUri));
- try
- {
- OutputStream out = res.getOutputStream();
- queryHandler.writeResponse(baseUri, ctxUri, endpointInfo, out);
- out.flush();
- return true;
- }
- catch (Exception e)
- {
- throw new ServletException(e);
- }
- }
- }
- }
- }
- else if ("GET".equals(req.getMethod()))
- {
- //reject HTTP GET without query string (only support messages sent w/ POST)
- res.setStatus(405);
- res.setContentType("text/plain");
- Writer out = res.getWriter();
- out.write("HTTP GET not supported");
- out.close();
- return true;
- }
-
- return false;
- }
-
- private static ServerConfig getServerConfig() {
- if(System.getSecurityManager() == null) {
- return AbstractServerConfig.getServerIntegrationServerConfig();
- }
- return AccessController.doPrivileged(AbstractServerConfig.GET_SERVER_INTEGRATION_SERVER_CONFIG);
- }
-
private long initRequestMetrics(Endpoint endpoint)
{
long beginTime = 0;
Modified: stack/cxf/branches/asoldano/modules/server/src/main/java/org/jboss/wsf/stack/cxf/config/CXFStackConfigFactory.java
===================================================================
--- stack/cxf/branches/asoldano/modules/server/src/main/java/org/jboss/wsf/stack/cxf/config/CXFStackConfigFactory.java 2014-04-01 12:29:55 UTC (rev 18555)
+++ stack/cxf/branches/asoldano/modules/server/src/main/java/org/jboss/wsf/stack/cxf/config/CXFStackConfigFactory.java 2014-04-01 14:45:25 UTC (rev 18556)
@@ -26,7 +26,7 @@
import java.security.AccessController;
import java.security.PrivilegedAction;
-import org.apache.ws.security.WSSConfig;
+import org.apache.wss4j.dom.WSSConfig;
import org.jboss.wsf.spi.classloading.ClassLoaderProvider;
import org.jboss.wsf.spi.management.StackConfig;
import org.jboss.wsf.spi.management.StackConfigFactory;
Modified: stack/cxf/branches/asoldano/modules/server/src/main/java/org/jboss/wsf/stack/cxf/security/authentication/AutenticationMgrSubjectCreatingInterceptor.java
===================================================================
--- stack/cxf/branches/asoldano/modules/server/src/main/java/org/jboss/wsf/stack/cxf/security/authentication/AutenticationMgrSubjectCreatingInterceptor.java 2014-04-01 12:29:55 UTC (rev 18555)
+++ stack/cxf/branches/asoldano/modules/server/src/main/java/org/jboss/wsf/stack/cxf/security/authentication/AutenticationMgrSubjectCreatingInterceptor.java 2014-04-01 14:45:25 UTC (rev 18556)
@@ -31,7 +31,7 @@
import org.apache.cxf.interceptor.Fault;
import org.apache.cxf.message.Message;
import org.apache.cxf.security.SecurityContext;
-import org.apache.ws.security.WSUsernameTokenPrincipal;
+import org.apache.wss4j.common.principal.UsernameTokenPrincipal;
import org.jboss.security.plugins.JBossAuthenticationManager;
import org.jboss.wsf.stack.cxf.Loggers;
import org.jboss.wsf.stack.cxf.Messages;
@@ -79,10 +79,10 @@
{
//Try authenticating using WSS4J internal info (previously set into SecurityContext by WSS4JInInterceptor)
Principal p = context.getUserPrincipal();
- if (!(p instanceof WSUsernameTokenPrincipal)) {
+ if (!(p instanceof UsernameTokenPrincipal)) {
throw Messages.MESSAGES.couldNotGetSubjectInfo();
}
- WSUsernameTokenPrincipal up = (WSUsernameTokenPrincipal) p;
+ UsernameTokenPrincipal up = (UsernameTokenPrincipal) p;
subject = helper.createSubject(authenticationManger, up.getName(), up.getPassword(), up.isPasswordDigest(), up.getNonce(), up.getCreatedTime());
}
Modified: stack/cxf/branches/asoldano/modules/server/src/main/java/org/jboss/wsf/stack/cxf/security/authentication/SubjectCreatingInterceptor.java
===================================================================
--- stack/cxf/branches/asoldano/modules/server/src/main/java/org/jboss/wsf/stack/cxf/security/authentication/SubjectCreatingInterceptor.java 2014-04-01 12:29:55 UTC (rev 18555)
+++ stack/cxf/branches/asoldano/modules/server/src/main/java/org/jboss/wsf/stack/cxf/security/authentication/SubjectCreatingInterceptor.java 2014-04-01 14:45:25 UTC (rev 18556)
@@ -42,11 +42,11 @@
import org.apache.cxf.security.SecurityContext;
import org.apache.cxf.ws.security.wss4j.PolicyBasedWSS4JInInterceptor;
import org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor;
-import org.apache.ws.security.WSSecurityEngine;
-import org.apache.ws.security.WSSecurityException;
-import org.apache.ws.security.handler.RequestData;
-import org.apache.ws.security.validate.UsernameTokenValidator;
-import org.apache.ws.security.validate.Validator;
+import org.apache.wss4j.common.ext.WSSecurityException;
+import org.apache.wss4j.dom.WSSecurityEngine;
+import org.apache.wss4j.dom.handler.RequestData;
+import org.apache.wss4j.dom.validate.UsernameTokenValidator;
+import org.apache.wss4j.dom.validate.Validator;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.security.SecurityDomainContext;
import org.jboss.wsf.stack.cxf.security.nonce.NonceStore;
@@ -158,13 +158,13 @@
{
String errorMessage = "Failed Authentication : Subject has not been created";
LOG.severe(errorMessage);
- throw new WSSecurityException(errorMessage, ex);
+ throw new WSSecurityException(WSSecurityException.ErrorCode.FAILED_AUTHENTICATION);
}
if (subject == null || subject.getPrincipals().size() == 0 || !checkUserPrincipal(subject.getPrincipals(), name))
{
String errorMessage = "Failed Authentication : Invalid Subject";
LOG.severe(errorMessage);
- throw new WSSecurityException(errorMessage);
+ throw new WSSecurityException(WSSecurityException.ErrorCode.FAILED_AUTHENTICATION);
}
msg.put(Subject.class, subject);
}
@@ -192,7 +192,7 @@
@Override
protected void verifyCustomPassword(
- org.apache.ws.security.message.token.UsernameToken usernameToken,
+ org.apache.wss4j.dom.message.token.UsernameToken usernameToken,
RequestData data
) throws WSSecurityException {
SubjectCreatingInterceptor.this.setSubject(
@@ -202,7 +202,7 @@
@Override
protected void verifyPlaintextPassword(
- org.apache.ws.security.message.token.UsernameToken usernameToken,
+ org.apache.wss4j.dom.message.token.UsernameToken usernameToken,
RequestData data
) throws WSSecurityException {
SubjectCreatingInterceptor.this.setSubject(
@@ -212,11 +212,11 @@
@Override
protected void verifyDigestPassword(
- org.apache.ws.security.message.token.UsernameToken usernameToken,
+ org.apache.wss4j.dom.message.token.UsernameToken usernameToken,
RequestData data
) throws WSSecurityException {
if (!supportDigestPasswords) {
- throw new WSSecurityException(WSSecurityException.FAILED_AUTHENTICATION);
+ throw new WSSecurityException(WSSecurityException.ErrorCode.FAILED_AUTHENTICATION);
}
String user = usernameToken.getName();
String password = usernameToken.getPassword();
@@ -230,7 +230,7 @@
@Override
protected void verifyUnknownPassword(
- org.apache.ws.security.message.token.UsernameToken usernameToken,
+ org.apache.wss4j.dom.message.token.UsernameToken usernameToken,
RequestData data
) throws WSSecurityException {
SubjectCreatingInterceptor.this.setSubject(
Modified: stack/cxf/branches/asoldano/modules/server/src/main/java/org/jboss/wsf/stack/cxf/security/authentication/SubjectCreatingPolicyInterceptor.java
===================================================================
--- stack/cxf/branches/asoldano/modules/server/src/main/java/org/jboss/wsf/stack/cxf/security/authentication/SubjectCreatingPolicyInterceptor.java 2014-04-01 12:29:55 UTC (rev 18555)
+++ stack/cxf/branches/asoldano/modules/server/src/main/java/org/jboss/wsf/stack/cxf/security/authentication/SubjectCreatingPolicyInterceptor.java 2014-04-01 14:45:25 UTC (rev 18556)
@@ -35,7 +35,7 @@
import org.apache.cxf.phase.AbstractPhaseInterceptor;
import org.apache.cxf.phase.Phase;
import org.apache.cxf.security.SecurityContext;
-import org.apache.ws.security.WSUsernameTokenPrincipal;
+import org.apache.wss4j.common.principal.UsernameTokenPrincipal;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.security.SecurityDomainContext;
import org.jboss.wsf.stack.cxf.Loggers;
@@ -88,17 +88,17 @@
{
//Try authenticating using WSS4J internal info (previously set into SecurityContext by WSS4JInInterceptor)
Principal p = context.getUserPrincipal();
- if (!(p instanceof WSUsernameTokenPrincipal)) {
+ if (!(p instanceof UsernameTokenPrincipal)) {
throw Messages.MESSAGES.couldNotGetSubjectInfo();
}
- WSUsernameTokenPrincipal up = (WSUsernameTokenPrincipal) p;
+ UsernameTokenPrincipal up = (UsernameTokenPrincipal) p;
subject = createSubject(sdc, up.getName(), up.getPassword(), up.isPasswordDigest(), up.getNonce(), up.getCreatedTime());
}
Principal principal = getPrincipal(context.getUserPrincipal(), subject);
message.put(SecurityContext.class, createSecurityContext(principal, subject));
}
-
+
protected Subject createSubject(SecurityDomainContext sdc, String name, String password, boolean isDigest, String nonce, String creationTime)
{
Subject subject = null;
@@ -117,6 +117,24 @@
return subject;
}
+ protected Subject createSubject(SecurityDomainContext sdc, String name, String password, boolean isDigest, byte[] nonce, String creationTime)
+ {
+ Subject subject = null;
+ try
+ {
+ subject = helper.createSubject(sdc, name, password, isDigest, nonce, creationTime);
+ }
+ catch (Exception ex)
+ {
+ throw Messages.MESSAGES.authenticationFailedSubjectNotCreated(ex);
+ }
+ if (subject == null || subject.getPrincipals().size() == 0)
+ {
+ throw Messages.MESSAGES.authenticationFailedSubjectInvalid();
+ }
+ return subject;
+ }
+
protected Principal getPrincipal(Principal originalPrincipal, Subject subject)
{
Principal[] ps = subject.getPrincipals().toArray(new Principal[]
Modified: stack/cxf/branches/asoldano/modules/server/src/main/java/org/jboss/wsf/stack/cxf/security/authentication/SubjectCreator.java
===================================================================
--- stack/cxf/branches/asoldano/modules/server/src/main/java/org/jboss/wsf/stack/cxf/security/authentication/SubjectCreator.java 2014-04-01 12:29:55 UTC (rev 18555)
+++ stack/cxf/branches/asoldano/modules/server/src/main/java/org/jboss/wsf/stack/cxf/security/authentication/SubjectCreator.java 2014-04-01 14:45:25 UTC (rev 18556)
@@ -24,6 +24,7 @@
import static org.jboss.wsf.stack.cxf.Loggers.SECURITY_LOGGER;
import static org.jboss.wsf.stack.cxf.Messages.MESSAGES;
+import java.io.ByteArrayOutputStream;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.security.Principal;
@@ -62,6 +63,13 @@
private boolean decodeNonce = true;
+ public Subject createSubject(SecurityDomainContext ctx, String name, String password, boolean isDigest, byte[] nonce, String created)
+ {
+ //TODO, revisit
+ final String sNonce = convertNonce(nonce);
+ return createSubject(ctx, name, password, isDigest, sNonce, created);
+ }
+
public Subject createSubject(SecurityDomainContext ctx, String name, String password, boolean isDigest, String nonce, String created)
{
if (isDigest)
@@ -125,6 +133,12 @@
}
return subject;
}
+ public Subject createSubject(JBossAuthenticationManager manager, String name, String password, boolean isDigest, byte[] nonce, String created)
+ {
+ //TODO revisit
+ final String sNonce = convertNonce(nonce);
+ return createSubject(manager, name, password, isDigest, sNonce, created);
+ }
//TODO:refactor this
public Subject createSubject(JBossAuthenticationManager manager, String name, String password, boolean isDigest, String nonce, String created)
{
@@ -184,6 +198,28 @@
return subject;
}
+ private String convertNonce(byte[] nonce)
+ {
+ //TODO, revisit
+ try
+ {
+ if (nonce != null)
+ {
+ ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ bos.write(nonce);
+ return bos.toString();
+ }
+ else
+ {
+ return null;
+ }
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException(e);
+ }
+ }
+
protected void verifyUsernameToken(String nonce, String created)
{
Modified: stack/cxf/branches/asoldano/modules/server/src/test/java/org/jboss/wsf/stack/cxf/JBossWSInvokerTest.java
===================================================================
--- stack/cxf/branches/asoldano/modules/server/src/test/java/org/jboss/wsf/stack/cxf/JBossWSInvokerTest.java 2014-04-01 12:29:55 UTC (rev 18555)
+++ stack/cxf/branches/asoldano/modules/server/src/test/java/org/jboss/wsf/stack/cxf/JBossWSInvokerTest.java 2014-04-01 14:45:25 UTC (rev 18556)
@@ -60,6 +60,7 @@
public void testMessageContextThreadLocal()
{
TestInvoker invoker = new TestInvoker();
+ invoker.setTargetBean(this); //just to avoid internal NPE
Exchange exchange = getTestExchange();
Object obj = invoker.invoke(exchange, null);
String res = obj instanceof List<?> ? ((List<?>)obj).get(0).toString() : obj.toString();
Modified: stack/cxf/branches/asoldano/modules/testsuite/cxf-spring-tests/pom.xml
===================================================================
--- stack/cxf/branches/asoldano/modules/testsuite/cxf-spring-tests/pom.xml 2014-04-01 12:29:55 UTC (rev 18555)
+++ stack/cxf/branches/asoldano/modules/testsuite/cxf-spring-tests/pom.xml 2014-04-01 14:45:25 UTC (rev 18556)
@@ -32,10 +32,6 @@
</dependency>
<dependency>
<groupId>org.springframework</groupId>
- <artifactId>spring-asm</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
</dependency>
<dependency>
Modified: stack/cxf/branches/asoldano/modules/testsuite/cxf-tests/pom.xml
===================================================================
--- stack/cxf/branches/asoldano/modules/testsuite/cxf-tests/pom.xml 2014-04-01 12:29:55 UTC (rev 18555)
+++ stack/cxf/branches/asoldano/modules/testsuite/cxf-tests/pom.xml 2014-04-01 14:45:25 UTC (rev 18556)
@@ -127,11 +127,6 @@
<artifactItems>
<artifactItem>
<groupId>org.springframework</groupId>
- <artifactId>spring-asm</artifactId>
- <version>${test.spring.version}</version>
- </artifactItem>
- <artifactItem>
- <groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>${test.spring.version}</version>
</artifactItem>
Modified: stack/cxf/branches/asoldano/modules/testsuite/pom.xml
===================================================================
--- stack/cxf/branches/asoldano/modules/testsuite/pom.xml 2014-04-01 12:29:55 UTC (rev 18555)
+++ stack/cxf/branches/asoldano/modules/testsuite/pom.xml 2014-04-01 14:45:25 UTC (rev 18556)
@@ -589,10 +589,6 @@
</dependency>
<dependency>
<groupId>org.springframework</groupId>
- <artifactId>spring-asm</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
</dependency>
<dependency>
Modified: stack/cxf/branches/asoldano/pom.xml
===================================================================
--- stack/cxf/branches/asoldano/pom.xml 2014-04-01 12:29:55 UTC (rev 18555)
+++ stack/cxf/branches/asoldano/pom.xml 2014-04-01 14:45:25 UTC (rev 18556)
@@ -71,9 +71,9 @@
<wildfly800.version>8.0.0.Final</wildfly800.version>
<wildfly801.version>8.0.1.Final-SNAPSHOT</wildfly801.version>
<ejb.api.version>1.0.2.Final</ejb.api.version>
- <cxf.version>2.7.10</cxf.version>
+ <cxf.version>3.0.0-milestone2</cxf.version>
<cxf.asm.version>3.3.1</cxf.asm.version>
- <cxf.xjcplugins.version>2.6.1</cxf.xjcplugins.version>
+ <cxf.xjcplugins.version>2.7.0</cxf.xjcplugins.version>
<jboss.common.core.version>2.2.17.GA</jboss.common.core.version>
<jboss-logging.version>3.1.2.GA</jboss-logging.version>
<jboss-logging-processor.version>1.0.3.Final</jboss-logging-processor.version>
@@ -96,18 +96,18 @@
<log4j.version>1.2.16</log4j.version>
<activation.version>1.1</activation.version>
<fastinfoset.version>1.2.12</fastinfoset.version>
- <neethi.version>3.0.2</neethi.version>
- <opensaml.version>2.5.3</opensaml.version>
+ <neethi.version>3.0.3</neethi.version>
+ <opensaml.version>2.6.0</opensaml.version>
<saaj.api.version>1.0.3.Final</saaj.api.version>
<servlet.api.version>1.0.2.Final</servlet.api.version>
<stax.api.version>1.0-2</stax.api.version>
<jms.api.version>1.0.1.Final</jms.api.version>
<velocity.version>1.7</velocity.version>
<xerces.version>2.9.1</xerces.version>
- <xmlsec.version>1.5.6</xmlsec.version>
- <wss4j.version>1.6.14</wss4j.version>
+ <xmlsec.version>2.0.0-beta</xmlsec.version>
+ <wss4j.version>2.0.0-rc1</wss4j.version>
<wstx.version>4.2.0</wstx.version>
- <spring.version>3.0.7.RELEASE</spring.version>
+ <spring.version>3.2.8.RELEASE</spring.version>
<shrinkwrap.version>1.1.3</shrinkwrap.version>
<jaspi.api.version>1.0.0.Alpha1</jaspi.api.version>
</properties>
@@ -185,6 +185,10 @@
<artifactId>saaj-api</artifactId>
</exclusion>
<exclusion>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-javamail_1.4_spec</artifactId>
+ </exclusion>
+ <exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
@@ -251,10 +255,6 @@
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
- <artifactId>spring-asm</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
</exclusion>
<exclusion>
@@ -318,10 +318,6 @@
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
- <artifactId>spring-asm</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
</exclusion>
<exclusion>
@@ -357,10 +353,6 @@
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
- <artifactId>spring-asm</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
</exclusion>
<exclusion>
@@ -400,10 +392,6 @@
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
- <artifactId>spring-asm</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
</exclusion>
<exclusion>
@@ -447,10 +435,6 @@
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
- <artifactId>spring-asm</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
</exclusion>
<exclusion>
@@ -508,10 +492,6 @@
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
- <artifactId>spring-asm</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
</exclusion>
<exclusion>
@@ -555,10 +535,6 @@
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
- <artifactId>spring-asm</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
</exclusion>
<exclusion>
@@ -610,10 +586,6 @@
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
- <artifactId>spring-asm</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
</exclusion>
<exclusion>
@@ -677,10 +649,6 @@
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
- <artifactId>spring-asm</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
</exclusion>
<exclusion>
@@ -716,10 +684,6 @@
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
- <artifactId>spring-asm</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
</exclusion>
<exclusion>
@@ -755,10 +719,6 @@
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
- <artifactId>spring-asm</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
</exclusion>
<exclusion>
@@ -794,10 +754,6 @@
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
- <artifactId>spring-asm</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
</exclusion>
<exclusion>
@@ -833,10 +789,6 @@
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
- <artifactId>spring-asm</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
</exclusion>
<exclusion>
@@ -872,10 +824,6 @@
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
- <artifactId>spring-asm</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
</exclusion>
<exclusion>
@@ -945,6 +893,12 @@
<groupId>org.apache.santuario</groupId>
<artifactId>xmlsec</artifactId>
<version>${xmlsec.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>org.apache.ws.security</groupId>
@@ -1061,12 +1015,6 @@
</dependency>
<dependency>
<groupId>org.springframework</groupId>
- <artifactId>spring-asm</artifactId>
- <version>${spring.version}</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>${spring.version}</version>
<scope>provided</scope>
10 years, 9 months