Repository: cxf-dosgi Updated Branches: refs/heads/master 70abcac2f -> 3b1c5b46a
Shortening project names Project: http://git-wip-us.apache.org/repos/asf/cxf-dosgi/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf-dosgi/commit/de41edc6 Tree: http://git-wip-us.apache.org/repos/asf/cxf-dosgi/tree/de41edc6 Diff: http://git-wip-us.apache.org/repos/asf/cxf-dosgi/diff/de41edc6 Branch: refs/heads/master Commit: de41edc62fb1129977393ed4eff4169d6f034202 Parents: 70abcac Author: Christian Schneider <[email protected]> Authored: Wed Jul 27 18:14:16 2016 +0200 Committer: Christian Schneider <[email protected]> Committed: Wed Jul 27 18:14:16 2016 +0200 ---------------------------------------------------------------------- distribution/multi-bundle/pom.xml | 2 +- distribution/pom.xml | 2 +- distribution/repository/pom.xml | 1 + distribution/sources/pom.xml | 2 +- itests/multi-bundle/pom.xml | 2 +- itests/pom.xml | 2 +- pom.xml | 2 +- samples/ds/client/pom.xml | 2 +- samples/ds/impl/pom.xml | 2 +- samples/ds/interface/pom.xml | 2 +- samples/ds/pom.xml | 2 +- samples/greeter/client/pom.xml | 2 +- samples/greeter/impl/pom.xml | 2 +- samples/greeter/interface/pom.xml | 2 +- samples/greeter/pom.xml | 2 +- samples/greeter_rest/client/pom.xml | 2 +- samples/greeter_rest/impl/pom.xml | 2 +- samples/greeter_rest/interface/pom.xml | 2 +- samples/greeter_rest/pom.xml | 2 +- samples/pom.xml | 2 +- samples/security_filter/pom.xml | 2 +- samples/ssl/README.md | 22 +++++++++++++++++--- samples/ssl/client/pom.xml | 2 +- samples/ssl/impl/pom.xml | 2 +- samples/ssl/interface/pom.xml | 2 +- .../apache/cxf/dosgi/samples/ssl/SslIntent.java | 4 ++++ samples/ssl/org.ops4j.pax.web.cfg | 1 + samples/ssl/pom.xml | 2 +- 28 files changed, 49 insertions(+), 27 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/de41edc6/distribution/multi-bundle/pom.xml ---------------------------------------------------------------------- diff --git a/distribution/multi-bundle/pom.xml b/distribution/multi-bundle/pom.xml index 3afda1c..ab39138 100644 --- a/distribution/multi-bundle/pom.xml +++ b/distribution/multi-bundle/pom.xml @@ -21,7 +21,7 @@ <modelVersion>4.0.0</modelVersion> <artifactId>cxf-dosgi-ri-multibundle-distribution</artifactId> - <name>Distributed OSGI Multi-Bundle Distribution</name> + <name>CXF DOSGi Multi-Bundle Distribution</name> <url>http://cxf.apache.org</url> <parent> http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/de41edc6/distribution/pom.xml ---------------------------------------------------------------------- diff --git a/distribution/pom.xml b/distribution/pom.xml index cbd3b33..5bb17cd 100644 --- a/distribution/pom.xml +++ b/distribution/pom.xml @@ -23,7 +23,7 @@ <artifactId>cxf-dosgi-ri-distribution-parent</artifactId> <version>2.0-SNAPSHOT</version> <packaging>pom</packaging> - <name>Distributed OSGI Distribution Parent</name> + <name>CXF DOSGi Distribution Parent</name> <url>http://cxf.apache.org</url> <parent> http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/de41edc6/distribution/repository/pom.xml ---------------------------------------------------------------------- diff --git a/distribution/repository/pom.xml b/distribution/repository/pom.xml index 767f198..b8bc426 100644 --- a/distribution/repository/pom.xml +++ b/distribution/repository/pom.xml @@ -28,4 +28,5 @@ <version>1.6.3_1</version> </dependency> </dependencies> + <name>CXF DOSGi Distribution Repository</name> </project> http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/de41edc6/distribution/sources/pom.xml ---------------------------------------------------------------------- diff --git a/distribution/sources/pom.xml b/distribution/sources/pom.xml index 6c6b05f..56a0d0d 100644 --- a/distribution/sources/pom.xml +++ b/distribution/sources/pom.xml @@ -23,7 +23,7 @@ <groupId>org.apache.cxf.dosgi</groupId> <artifactId>cxf-dosgi-ri-source-distribution</artifactId> <version>2.0-SNAPSHOT</version> - <name>Distributed OSGI Source Distribution</name> + <name>CXF DOSGi Source Distribution</name> <url>http://cxf.apache.org</url> <parent> http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/de41edc6/itests/multi-bundle/pom.xml ---------------------------------------------------------------------- diff --git a/itests/multi-bundle/pom.xml b/itests/multi-bundle/pom.xml index 71be6a5..e588d4b 100644 --- a/itests/multi-bundle/pom.xml +++ b/itests/multi-bundle/pom.xml @@ -31,7 +31,7 @@ <groupId>org.apache.cxf.dosgi.systests</groupId> <artifactId>cxf-dosgi-ri-itests-multibundle</artifactId> <packaging>jar</packaging> - <name>Distributed OSGi System Tests Multi-Bundle</name> + <name>CXF DOSGi Integration Tests Multi Bundle</name> <properties> <topDirectoryLocation>../..</topDirectoryLocation> http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/de41edc6/itests/pom.xml ---------------------------------------------------------------------- diff --git a/itests/pom.xml b/itests/pom.xml index 6482ba7..f8f6e5f 100644 --- a/itests/pom.xml +++ b/itests/pom.xml @@ -33,7 +33,7 @@ <version>2.0-SNAPSHOT</version> <packaging>pom</packaging> - <name>Distributed OSGi System Tests</name> + <name>CXF DOSGi Integration Tests</name> <modules> <module>multi-bundle</module> http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/de41edc6/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index ea1f430..87e8472 100644 --- a/pom.xml +++ b/pom.xml @@ -24,7 +24,7 @@ <version>2.0-SNAPSHOT</version> <packaging>pom</packaging> - <name>Distributed OSGI Reference Implementation</name> + <name>CXF DOSGi main</name> <scm> <connection>scm:git:http://git-wip-us.apache.org/repos/asf/cxf-dosgi.git</connection> http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/de41edc6/samples/ds/client/pom.xml ---------------------------------------------------------------------- diff --git a/samples/ds/client/pom.xml b/samples/ds/client/pom.xml index 625907a..dd06083 100644 --- a/samples/ds/client/pom.xml +++ b/samples/ds/client/pom.xml @@ -13,7 +13,7 @@ <modelVersion>4.0.0</modelVersion> <artifactId>cxf-dosgi-ri-samples-ds-client</artifactId> <packaging>bundle</packaging> - <name>Distributed OSGI DS Client</name> + <name>CXF DOSGi DS Client</name> <parent> <groupId>org.apache.cxf.dosgi.samples</groupId> http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/de41edc6/samples/ds/impl/pom.xml ---------------------------------------------------------------------- diff --git a/samples/ds/impl/pom.xml b/samples/ds/impl/pom.xml index 25b71b2..126630e 100644 --- a/samples/ds/impl/pom.xml +++ b/samples/ds/impl/pom.xml @@ -40,5 +40,5 @@ </dependency> </dependencies> - <name>Distributed OSGI DS Sample Impl</name> + <name>CXF DOSGi DS Sample Impl</name> </project> http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/de41edc6/samples/ds/interface/pom.xml ---------------------------------------------------------------------- diff --git a/samples/ds/interface/pom.xml b/samples/ds/interface/pom.xml index 04a9378..1585fc9 100644 --- a/samples/ds/interface/pom.xml +++ b/samples/ds/interface/pom.xml @@ -22,7 +22,7 @@ <modelVersion>4.0.0</modelVersion> <artifactId>cxf-dosgi-ri-samples-ds-interface</artifactId> <packaging>bundle</packaging> - <name>Distributed OSGI DS Sample Interface</name> + <name>CXF DOSGi DS Sample Interface</name> <parent> <groupId>org.apache.cxf.dosgi.samples</groupId> http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/de41edc6/samples/ds/pom.xml ---------------------------------------------------------------------- diff --git a/samples/ds/pom.xml b/samples/ds/pom.xml index 78deb66..e52588f 100644 --- a/samples/ds/pom.xml +++ b/samples/ds/pom.xml @@ -15,7 +15,7 @@ <groupId>org.apache.cxf.dosgi.samples</groupId> <artifactId>cxf-dosgi-ri-samples-ds-parent</artifactId> <packaging>pom</packaging> - <name>Distributed OSGI DS Sample</name> + <name>CXF DOSGi DS Sample</name> <version>2.0-SNAPSHOT</version> <parent> http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/de41edc6/samples/greeter/client/pom.xml ---------------------------------------------------------------------- diff --git a/samples/greeter/client/pom.xml b/samples/greeter/client/pom.xml index 163fcfe..da9fe5a 100644 --- a/samples/greeter/client/pom.xml +++ b/samples/greeter/client/pom.xml @@ -22,7 +22,7 @@ <modelVersion>4.0.0</modelVersion> <artifactId>cxf-dosgi-ri-samples-greeter-client</artifactId> <packaging>bundle</packaging> - <name>Distributed OSGI Greeter Bundle Client</name> + <name>CXF DOSGi Greeter Bundle Client</name> <parent> <groupId>org.apache.cxf.dosgi.samples</groupId> http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/de41edc6/samples/greeter/impl/pom.xml ---------------------------------------------------------------------- diff --git a/samples/greeter/impl/pom.xml b/samples/greeter/impl/pom.xml index 928aab3..e76e282 100644 --- a/samples/greeter/impl/pom.xml +++ b/samples/greeter/impl/pom.xml @@ -21,7 +21,7 @@ <modelVersion>4.0.0</modelVersion> <artifactId>cxf-dosgi-ri-samples-greeter-impl</artifactId> <packaging>bundle</packaging> - <name>Distributed OSGI Greeter Implementation Bundle</name> + <name>CXF DOSGi Greeter Implementation Bundle</name> <parent> <groupId>org.apache.cxf.dosgi.samples</groupId> http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/de41edc6/samples/greeter/interface/pom.xml ---------------------------------------------------------------------- diff --git a/samples/greeter/interface/pom.xml b/samples/greeter/interface/pom.xml index 57e0729..4a43d1f 100644 --- a/samples/greeter/interface/pom.xml +++ b/samples/greeter/interface/pom.xml @@ -22,7 +22,7 @@ <modelVersion>4.0.0</modelVersion> <artifactId>cxf-dosgi-ri-samples-greeter-interface</artifactId> <packaging>bundle</packaging> - <name>Distributed OSGI Greeter Interface Bundle</name> + <name>CXF DOSGi Greeter Interface Bundle</name> <parent> <groupId>org.apache.cxf.dosgi.samples</groupId> http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/de41edc6/samples/greeter/pom.xml ---------------------------------------------------------------------- diff --git a/samples/greeter/pom.xml b/samples/greeter/pom.xml index ca2606d..a801f13 100644 --- a/samples/greeter/pom.xml +++ b/samples/greeter/pom.xml @@ -23,7 +23,7 @@ <groupId>org.apache.cxf.dosgi.samples</groupId> <artifactId>cxf-dosgi-ri-samples-greeter-parent</artifactId> <packaging>pom</packaging> - <name>Distributed OSGI Greeter Bundles</name> + <name>CXF DOSGi Greeter Bundles</name> <parent> <groupId>org.apache.cxf.dosgi</groupId> http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/de41edc6/samples/greeter_rest/client/pom.xml ---------------------------------------------------------------------- diff --git a/samples/greeter_rest/client/pom.xml b/samples/greeter_rest/client/pom.xml index a35bf78..f2757df 100644 --- a/samples/greeter_rest/client/pom.xml +++ b/samples/greeter_rest/client/pom.xml @@ -14,7 +14,7 @@ <modelVersion>4.0.0</modelVersion> <artifactId>cxf-dosgi-ri-samples-greeter-rest-client</artifactId> <packaging>bundle</packaging> - <name>Distributed OSGI Greeter REST Client</name> + <name>CXF DOSGi Greeter REST Client</name> <parent> <groupId>org.apache.cxf.dosgi.samples</groupId> http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/de41edc6/samples/greeter_rest/impl/pom.xml ---------------------------------------------------------------------- diff --git a/samples/greeter_rest/impl/pom.xml b/samples/greeter_rest/impl/pom.xml index 2ede1ed..d1b26de 100644 --- a/samples/greeter_rest/impl/pom.xml +++ b/samples/greeter_rest/impl/pom.xml @@ -22,7 +22,7 @@ <modelVersion>4.0.0</modelVersion> <artifactId>cxf-dosgi-ri-samples-greeter-rest-impl</artifactId> <packaging>bundle</packaging> - <name>Distributed OSGI Greeter REST Impl</name> + <name>CXF DOSGi Greeter REST Impl</name> <parent> <groupId>org.apache.cxf.dosgi.samples</groupId> http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/de41edc6/samples/greeter_rest/interface/pom.xml ---------------------------------------------------------------------- diff --git a/samples/greeter_rest/interface/pom.xml b/samples/greeter_rest/interface/pom.xml index 745c0fe..0630e41 100644 --- a/samples/greeter_rest/interface/pom.xml +++ b/samples/greeter_rest/interface/pom.xml @@ -22,7 +22,7 @@ <groupId>org.apache.cxf.dosgi.samples</groupId> <artifactId>cxf-dosgi-ri-samples-greeter-rest-interface</artifactId> <packaging>bundle</packaging> - <name>Distributed OSGI Greeter REST Interface</name> + <name>CXF DOSGi Greeter REST Interface</name> <parent> <groupId>org.apache.cxf.dosgi</groupId> http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/de41edc6/samples/greeter_rest/pom.xml ---------------------------------------------------------------------- diff --git a/samples/greeter_rest/pom.xml b/samples/greeter_rest/pom.xml index d757c53..4f1a4f0 100644 --- a/samples/greeter_rest/pom.xml +++ b/samples/greeter_rest/pom.xml @@ -16,7 +16,7 @@ <groupId>org.apache.cxf.dosgi.samples</groupId> <artifactId>cxf-dosgi-ri-samples-greeter-rest-parent</artifactId> <packaging>pom</packaging> - <name>Distributed OSGI Greeter REST</name> + <name>CXF DOSGi Greeter REST</name> <parent> <groupId>org.apache.cxf.dosgi</groupId> http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/de41edc6/samples/pom.xml ---------------------------------------------------------------------- diff --git a/samples/pom.xml b/samples/pom.xml index 251f4bf..975c2ee 100644 --- a/samples/pom.xml +++ b/samples/pom.xml @@ -23,7 +23,7 @@ <groupId>org.apache.cxf.dosgi.samples</groupId> <artifactId>cxf-dosgi-ri-samples</artifactId> <packaging>pom</packaging> - <name>Distributed OSGI RI Sample Bundles</name> + <name>CXF DOSGi RI Sample Bundles</name> <url>http://cxf.apache.org/</url> <parent> http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/de41edc6/samples/security_filter/pom.xml ---------------------------------------------------------------------- diff --git a/samples/security_filter/pom.xml b/samples/security_filter/pom.xml index 4f58c4d..754b71f 100644 --- a/samples/security_filter/pom.xml +++ b/samples/security_filter/pom.xml @@ -15,7 +15,7 @@ <groupId>org.apache.cxf.dosgi.samples</groupId> <artifactId>cxf-dosgi-ri-samples-security</artifactId> <packaging>bundle</packaging> - <name>Distributed OSGI Security Sample Bundle</name> + <name>CXF DOSGi Security Sample Bundle</name> <parent> <groupId>org.apache.cxf.dosgi</groupId> http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/de41edc6/samples/ssl/README.md ---------------------------------------------------------------------- diff --git a/samples/ssl/README.md b/samples/ssl/README.md index e6eea83..dce022a 100644 --- a/samples/ssl/README.md +++ b/samples/ssl/README.md @@ -6,6 +6,11 @@ This example demonstrates how to configure ssl with a custom keystore and requir We want the karaf HttpService to be secured by https and require a client certificate for authentication. +# Keystore generation + +* Create client and server keys. +* Add client certificate to server + mkdir -p etc/keystores # Create server key @@ -14,8 +19,7 @@ We want the karaf HttpService to be secured by https and require a client certif keytool -genkey -dname CN=chris -keyalg RSA -validity 100000 -alias clientkey -keypass password -storepass password -keystore etc/keystores/client.jks keytool -export -rfc -keystore etc/keystores/client.jks -storepass password -alias clientkey -file client.cer keytool -import -trustcacerts -keystore etc/keystores/keystore.jks -storepass password -alias clientkey -file client.cer - # Export client cert as pkcs12 for browser - keytool -importkeystore -srckeystore etc/keystores/client.jks -destkeystore etc/keystores/client.p12 -deststoretype PKCS12 + # Export server cert keytool -exportcert -storepass password -keystore etc/keystores/keystore.jks -alias serverKey -file server.cert @@ -31,10 +35,22 @@ We want the karaf HttpService to be secured by https and require a client certif - Copy the server side ssl config org.apache.cxf.http.jetty-ssl.cfg into etc - Install the CXF DOSGi features - Install the example + +``` feature:repo-add cxf-dosgi 2.0-SNAPSHOT feature:install cxf-dosgi-provider-ws install -s mvn:org.apache.cxf.dosgi.samples/cxf-dosgi-ri-samples-ssl-interface/2.0_SNAPSHOT install -s mvn:org.apache.cxf.dosgi.samples/cxf-dosgi-ri-samples-ssl-impl/2.0-SNAPSHOT - install -s mvn:org.apache.cxf.dosgi.samples/cxf-dosgi-ri-samples-ssl-client/2.0-SNAPSHOT +``` + +# Test using browser + +If you want to access the service using your browser then you have to export it in pkcs12 format and import it into your browser. + + # Export client cert as pkcs12 for browser + keytool -importkeystore -srckeystore etc/keystores/client.jks -destkeystore etc/keystores/client.p12 -deststoretype PKCS12 + +Access the service as [](https://localhost:8443/cxf/echo "echo service"). +Add a security exemption to accept the server certificate. http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/de41edc6/samples/ssl/client/pom.xml ---------------------------------------------------------------------- diff --git a/samples/ssl/client/pom.xml b/samples/ssl/client/pom.xml index 00f29af..dbea300 100644 --- a/samples/ssl/client/pom.xml +++ b/samples/ssl/client/pom.xml @@ -22,7 +22,7 @@ <modelVersion>4.0.0</modelVersion> <artifactId>cxf-dosgi-ri-samples-ssl-client</artifactId> <packaging>bundle</packaging> - <name>Distributed OSGI Greeter Bundle Client</name> + <name>CXF DOSGi Greeter Bundle Client</name> <parent> <groupId>org.apache.cxf.dosgi.samples</groupId> http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/de41edc6/samples/ssl/impl/pom.xml ---------------------------------------------------------------------- diff --git a/samples/ssl/impl/pom.xml b/samples/ssl/impl/pom.xml index 5572b75..7a1025f 100644 --- a/samples/ssl/impl/pom.xml +++ b/samples/ssl/impl/pom.xml @@ -21,7 +21,7 @@ <modelVersion>4.0.0</modelVersion> <artifactId>cxf-dosgi-ri-samples-ssl-impl</artifactId> <packaging>bundle</packaging> - <name>Distributed OSGI Greeter Implementation Bundle</name> + <name>CXF DOSGi Greeter Implementation Bundle</name> <parent> <groupId>org.apache.cxf.dosgi.samples</groupId> http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/de41edc6/samples/ssl/interface/pom.xml ---------------------------------------------------------------------- diff --git a/samples/ssl/interface/pom.xml b/samples/ssl/interface/pom.xml index fa713c2..d705a41 100644 --- a/samples/ssl/interface/pom.xml +++ b/samples/ssl/interface/pom.xml @@ -22,7 +22,7 @@ <modelVersion>4.0.0</modelVersion> <artifactId>cxf-dosgi-ri-samples-ssl-interface</artifactId> <packaging>bundle</packaging> - <name>Distributed OSGI Greeter Interface Bundle</name> + <name>CXF DOSGi Greeter Interface Bundle</name> <parent> <groupId>org.apache.cxf.dosgi.samples</groupId> http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/de41edc6/samples/ssl/interface/src/main/java/org/apache/cxf/dosgi/samples/ssl/SslIntent.java ---------------------------------------------------------------------- diff --git a/samples/ssl/interface/src/main/java/org/apache/cxf/dosgi/samples/ssl/SslIntent.java b/samples/ssl/interface/src/main/java/org/apache/cxf/dosgi/samples/ssl/SslIntent.java index c20fc20..558f7a7 100644 --- a/samples/ssl/interface/src/main/java/org/apache/cxf/dosgi/samples/ssl/SslIntent.java +++ b/samples/ssl/interface/src/main/java/org/apache/cxf/dosgi/samples/ssl/SslIntent.java @@ -38,6 +38,10 @@ import org.apache.cxf.transport.http.HttpConduitConfig; import org.apache.cxf.transport.http.HttpConduitFeature; import org.osgi.service.component.annotations.Component; +/** + * Configures the client side conduit to trust the server certificate and authenticate by using + * a client certificate + */ @Component // (// property = "org.apache.cxf.dosgi.IntentName=ssl" // http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/de41edc6/samples/ssl/org.ops4j.pax.web.cfg ---------------------------------------------------------------------- diff --git a/samples/ssl/org.ops4j.pax.web.cfg b/samples/ssl/org.ops4j.pax.web.cfg index c0a83cc..8061c7f 100644 --- a/samples/ssl/org.ops4j.pax.web.cfg +++ b/samples/ssl/org.ops4j.pax.web.cfg @@ -1,3 +1,4 @@ +# Configure pax web with a server key and allowed client cert javax.servlet.context.tempdir = ${karaf.home}/data/pax-web-jsp org.ops4j.pax.web.config.file = ${karaf.home}/etc/jetty.xml org.osgi.service.http.port = 8181 http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/de41edc6/samples/ssl/pom.xml ---------------------------------------------------------------------- diff --git a/samples/ssl/pom.xml b/samples/ssl/pom.xml index 66a1d29..e48404e 100644 --- a/samples/ssl/pom.xml +++ b/samples/ssl/pom.xml @@ -23,7 +23,7 @@ <groupId>org.apache.cxf.dosgi.samples</groupId> <artifactId>cxf-dosgi-ri-samples-ssl-parent</artifactId> <packaging>pom</packaging> - <name>Distributed OSGI Greeter Bundles</name> + <name>CXF DOSGi Greeter Bundles</name> <parent> <groupId>org.apache.cxf.dosgi</groupId>
