1) Deploying the 1.2.0 Fediz IdP in Apache Tomcat
As per the previous tutorial on deploying to Tomcat, we will deploy the IdP and STS in Apache Tomcat. Download Fediz 1.2.1 and extract it to a new directory (${fediz.home}). To deploy the IdP to Tomcat:
- Copy ${fediz.home}/idp/war/* to ${catalina.home}/webapps
- Download and copy the hsqldb jar (e.g. hsqldb-1.8.0.10.jar) to ${catalina.home}/lib
- Copy idp-ssl-key.jks and idp-ssl-trust.jks from ${fediz.home}/examples/samplekeys to ${catalina.home}.
- Edit ${catalina.home}/conf/server.xml and change the ports from 8080 -> 9080 + 8443 -> 9443 so as not to conflict with Jetty.
- Edit the TLS Connector in ${catalina.home}/conf/server.xml' as well, e.g.: <Connector port="9443" protocol="org.apache.coyote.http11.Http11Protocol" maxThreads="150" SSLEnabled="true" scheme="https" secure="true" clientAuth="want" sslProtocol="TLS" keystoreFile="idp-ssl-key.jks" keystorePass="tompass" keyPass="tompass" truststoreFile="idp-ssl-trust.jks" truststorePass="ispass" />
2) Deploying the simpleWebapp in Jetty 8
Download Jetty 8 and extract it to a new directory (${jetty.home}). First let's set up TLS:
- Copy ${fediz.home}/examples/samplekeys/rp-ssl-key.jks to ${jetty.home}/etc
- Copy ${fediz.home}/examples/samplekeys/ststrust.jks to ${jetty.home} *and* to ${jetty.home}/etc
- Edit ${jetty.home}/start.ini and make sure that 'etc/jetty-ssl.xml' is included.
- Edit ${jetty.home}/etc/jetty-ssl.xml and configure the TLS keys, e.g.:
Now we will deploy the simpleWebapp:
- Copy ${fediz.home}/examples/simpleWebapp/src/main/config/fediz_config.xml to ${jetty.home}/etc
- Do a "mvn clean install" in ${fediz.home}/examples/simpleWebapp
- Copy ${fediz.home}/examples/simpleWebapp/target/fedizhelloworld.war to ${jetty.home}/webapps
- Create a new directory: ${jetty.home}/lib/fediz
- Copy ${fediz.home}/plugins/jetty/lib/* to ${jetty.home}/lib/fediz (note you may want to copy in a slf4j logging binding in here to see logging output, e.g. slf4j-jdk14-1.7.12.jar).
- Edit ${jetty.home}/start.ini and add "fediz" to "OPTIONS".
- Create a new file in ${jetty.home}/contexts called "fedizhelloworld.xml" with content as follows, and then start Jetty as normal:
3) Testing the service
To test the service navigate to:
- https://localhost:8443/fedizhelloworld/ (this is not secured)
- https://localhost:8443/fedizhelloworld/secure/fedservlet
No comments:
Post a Comment