/
How to Run the IdP 5 Testbed in Eclipse with Jetty 12

How to Run the IdP 5 Testbed in Eclipse with Jetty 12

Known to works with Eclipse 2024-09 or later

How To Run the IdP 5 Testbed in Eclipse with Jetty 12

1) Install Jetty (download and unpack jetty-home)

The version of Jetty should match the jetty.version property in the testbed POM java-idp-testbed/pom.xml

The Jetty directory should be set as the jetty.home system property in the Eclipse Launcher when running the testbed's Main.java.
For example : -Djetty.home=/opt/jetty-home-12.0.16

Download Jetty, verify the signature, verify the key is published by the Jetty developers, and unpack to /opt/ :

wget https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-home/12.0.16/jetty-home-12.0.16.tar.gz wget https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-home/12.0.16/jetty-home-12.0.16.tar.gz.asc gpg --keyserver http://keyserver.ubuntu.com --recv-keys FE4B68B4 gpg --verify jetty-home-12.0.16.tar.gz.asc curl https://raw.githubusercontent.com/jetty/jetty.project/jetty-12.0.x/KEYS.txt tar xzf jetty-home-12.0.16.tar.gz mv jetty-home-12.0.16 /opt/

Download jetty-home :

wget https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-home/12.0.16/jetty-home-12.0.16.tar.gz wget https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-home/12.0.16/jetty-home-12.0.16.tar.gz.asc

Download the jetty-home signature :

 

Verify the signature :

gpg --verify jetty-home-12.0.16.tar.gz.asc

Verify that the key is published by the Jetty developers :

Unpack to /opt/jetty-home-<version> :


2) Clone the java-idp-testbed, java-idp-jetty-base , and java-identity-provider projects in the same directory :

 

git clone git@git.shibboleth.net:java-idp-testbed git clone git@git.shibboleth.net:java-idp-jetty-base git clone git@git.shibboleth.net:java-identity-provider

or

git clone https://git.shibboleth.net/git/java-idp-testbed git clone https://git.shibboleth.net/git/java-idp-jetty-base git clone https://git.shibboleth.net/git/java-identity-provider

2b) Optionally, clone additional source code repositories :

git clone git@git.shibboleth.net:java-shib-attribute git clone git@git.shibboleth.net:java-shib-metadata git clone git@git.shibboleth.net:java-shib-profile git clone git@git.shibboleth.net:java-shib-shared git clone git@git.shibboleth.net:java-opensaml

or

git clone https://git.shibboleth.net/git/java-shib-attribute git clone https://git.shibboleth.net/git/java-shib-metadata git clone https://git.shibboleth.net/git/java-shib-profile git clone https://git.shibboleth.net/git/java-shib-shared git clone https://git.shibboleth.net/git/java-opensaml

3) Checkout the 12-testbed-eclipse branch of java-idp-jetty-base :

cd java-idp-jetty-base git checkout 12-testbed-eclipse

4) Import projects into Eclipse : File > Import > Maven > Existing Maven Projects 

5) Assemble third party dependencies by building the IdP WAR and removing IdP JARs :

cd java-identity-provider/idp-war mvn clean package -DskipTests rm target/idp-war-*/WEB-INF/lib/idp-*.jar

Optionally remove additional JARs :

rm target/idp-war-*/WEB-INF/lib/shib-*.jar rm target/idp-war-*/WEB-INF/lib/opensaml-*.jar

6) Download logging dependences (Logback and SLF4J) for Jetty :

cd java-idp-jetty-base/src/main/resources/jetty-base java -jar $jetty.home/start.jar --create-files

7) Run the testbed in Eclipse as a Java Application :

In the idp-testbed project, right-click on idp-testbed-jetty-12.launch > Run As > Java Application 

8) Go to the testbed webapp : 

https://localhost:8443/index.html

Issues

Logging

You will probably want to change the root logging level from DEBUG  to INFO  in
 idp-conf-impl/src/test/resources/net/shibboleth/idp/module/conf/logback.xml 

Related content