-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[JBWS-4179] WS integration with WildFly Elytron - AuthenticationClien… #108
Conversation
modules/client/pom.xml
Outdated
|
||
<dependency> | ||
<groupId>org.jboss.ws</groupId> | ||
<artifactId>jbossws-spi</artifactId> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Duplicate depedency? Already at https://github.com/jbossws/jbossws-cxf/blob/master/modules/client/pom.xml#L37
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
modules/client/pom.xml
Outdated
<dependency> | ||
<groupId>xerces</groupId> | ||
<artifactId>xercesImpl</artifactId> | ||
<version>2.7.1</version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
xercesImpl version is managed, not needed to specify it here, see https://github.com/jbossws/jbossws-cxf/blob/master/pom.xml#L773
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed. Thanks!
3f1f3bd
to
ab7d385
Compare
try { | ||
endpointURI = new URI(endpointAddress); | ||
} catch (URISyntaxException e) { | ||
e.printStackTrace(); // TODO throw some uri parsing exception |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about this TODO? I guess client won't be used only as standalone application but can run at container environment so we need exception here, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
99d5ef5
to
52dd1c9
Compare
fa8a455
to
d089b8d
Compare
modules/testsuite/cxf-tests/pom.xml
Outdated
<dependency> | ||
<groupId>org.wildfly.security</groupId> | ||
<artifactId>wildfly-elytron-client</artifactId> | ||
<version>1.10.0.CR5</version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please parametrize the version via property.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes seem reasonable to me, lets wait for feedback from @jimma.
I would just appreciate if we could get rid of unnecessary whitespace changes.
d089b8d
to
b1c390a
Compare
4862b97
to
7f88c61
Compare
3693527
to
ebc24d2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found some minor issues, please review.
Also could you please add some javadoc for tests that these are meant for JBWS-4179 (at least for the whole new testcases)?
.addClass(org.jboss.test.ws.jaxws.cxf.httpauth.ObjectFactory.class) | ||
.addAsResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/cxf/clientConfig/META-INF/jaxws-client-config.xml"), "META-INF/jaxws-client-config.xml") | ||
.addAsResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/cxf/httpauth/WEB-INF/wsdl/hello.wsdl"), "META-INF/wsdl/hello.wsdl") | ||
.addAsResource(new File("/home/skylar/work/projects/integrations/ws/jbossws-cxf/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/clientConfig/META-INF/wildfly-config-http-basic-auth.xml"), "META-INF/wildfly-config.xml") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please replace with dynamically created path
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
<authentication-client xmlns="urn:elytron:client:1.4"> | ||
<key-stores> | ||
<key-store name="truststore" type="PKCS12"> | ||
<file name="/home/skylar/work/projects/integrations/ws/jbossws-cxf/modules/testsuite/cxf-tests/src/test/etc/client.truststore"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please replace with dynamically created path or relative path if possible
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
<key-store-clear-password password="secret"/> | ||
</key-store> | ||
<key-store name="keystore" type="JKS"> | ||
<file name="/home/skylar/work/projects/integrations/ws/jbossws-cxf/modules/testsuite/cxf-tests/src/test/etc/client.keystore"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please replace with dynamically created path or relative path if possible
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
@ArquillianResource | ||
private URL baseURL; | ||
|
||
public static final String CLIENT_JAR = JBossWSTestHelper.writeToFile(new JBossWSTestHelper.JarDeployment("jaxws-cxf-jbws3713-client.jar") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could we use other name for JAR, eg. 'jaxws-cxf-jbws4179-client.jar'? It is already used by other tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
.addAsResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/cxf/clientConfig/META-INF/jaxws-client-config.xml"), "META-INF/jaxws-client-config.xml") | ||
.addAsResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/cxf/httpauth/WEB-INF/wsdl/hello.wsdl"), "META-INF/wsdl/hello.wsdl") | ||
.addAsResource(new File("/home/skylar/work/projects/integrations/ws/jbossws-cxf/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/clientConfig/META-INF/wildfly-config-http-basic-auth.xml"), "META-INF/wildfly-config.xml") | ||
.addAsManifestResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/cxf/jbws3713/WEB-INF/client-permissions.xml"), "permissions.xml") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could we use own copy of that file here? so that we don't have to worry about future changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
// our client jar is an input param to jboss-module | ||
final File f = new File(JBossWSTestHelper.getTestArchiveDir(), CLIENT_JAR); | ||
sbuf.append(" -jar ").append(f.getAbsolutePath()); | ||
sbuf.append(" -agentlib:jdwp=transport=dt_socket,address=8787,server=y,suspend=y ").append(f.getAbsolutePath()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why these debug args here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
URL wsdlURL = getResourceURL("jaxws/cxf/httpauth/WEB-INF/wsdl/hello.wsdl"); | ||
Service service = Service.create(wsdlURL, serviceName); | ||
Hello proxy = service.getPort(Hello.class); | ||
((BindingProvider) proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, "https://localhost:13443/ssl-mutual-auth/HelloService"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you please parametrize 13443 so that it takes port offset for tested container into account? Eg. https://github.com/jbossws/jbossws-cxf/blob/master/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/WSSecurityPolicyExamples23xTestCase.java#L68-L69
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
7e42071
to
7b8ee02
Compare
@Skyllarr This is great stuff to have in jbossws. And thanks @jbliznak for review.
Your thoughts ? |
@jimma Please correct me if I misunderstand. ClientConfig has only String properties:
and then it could be:
Did I get that? |
@Skyllarr I think you can add this field directly to ClientConfig like :
And we directly pass this ClientConfig to WildFlyClientConfigProvider as you pasted above. And we can still create other ClientConfigProvider to add more properties to ClientConfig in the future. WDYT ? |
@jimma Alright now I think I know what you mean. Yes, it sounds nicer. I'll try it that way now. Thanks |
7b8ee02
to
b57bcc3
Compare
@jimma I have updated the PRs accordingly. |
b57bcc3
to
527d7c6
Compare
b13fc26
to
d19d22c
Compare
some refactoring and nullcheck for nonexistent config file added |
e75d245
to
40ec143
Compare
rebased and unused import deleted |
07e2de8
to
5b6ca72
Compare
@jimma please review |
26d1376
to
11758e3
Compare
...a/org/jboss/test/ws/jaxws/cxf/clientConfig/CXFClientConfigElytronNotOnClasspathTestCase.java
Show resolved
Hide resolved
@RunAsClient | ||
public void testClientWithoutElytronOnClasspath() throws Exception { | ||
List<String> list = runJBossModulesClient(); | ||
assertTrue(true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this line be removed ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jimma yes i will remove
...a/org/jboss/test/ws/jaxws/cxf/clientConfig/CXFClientConfigElytronNotOnClasspathTestCase.java
Show resolved
Hide resolved
…t for Authentication / SSL
11758e3
to
72cea9d
Compare
…t for Authentication / SSL
JBWS-4179
Requires update to following repositories:
jbossws-spi : jbossws/jbossws-spi#5
jbossws-common: jbossws/jbossws-common#18
wildfly-elytron: wildfly-security/wildfly-elytron#1309