Skip to content

The Shibboleth Identity Provider web application built using a Gradle Overlay.

Notifications You must be signed in to change notification settings

UniconLabs/shibboleth-idp-gradle-overlay

Repository files navigation

shibboleth-idp-gradle-overlay

The Shibboleth Identity Provider web application built using a Gradle overlay. (A similar yet much uglier experiment done with Maven exists here)

This project was developed as part of Unicon's Open Source Support program. Professional support/integration assistance for this module is available. For more information, visit https://unicon.net/opensource/shibboleth.

Requirements

  • JDK 11
  • Tomcat 9

Initial Setup

Run once:

./gradlew clean unpackShibboleth

Build

Run afterwards:

./gradlew build overlay

IntelliJ IDEA

Create a Run Configuration based on a Tomcat server. If you don't have a Tomcat instance available, download one as a zip archive and configure it inside IDEA. When done, select that as the application server in the "Run Configuration" screen. download one as a zip archive and configure it inside IDEA. When done, select that as the application server in the Run Configuration screen.

Server

  • Specify a URL: https://org.example.net:8443/idp
  • Add the following VM options:
-Didp.home=<project-path>/build/tmp/unpackShibboleth/shibboleth-idp
  • For "Tomcat Server Settings", use ports 8080, 8443 and 1099.
  • For "Before launch" tasks, add build overlay.

image

Your external Tomcat server must have enabled port 8443 in its conf/server.xml file:

<Connector
   protocol="org.apache.coyote.http11.Http11NioProtocol"
   port="8443" maxThreads="200"
   scheme="https" secure="true" SSLEnabled="true"
   keystoreFile="${user.home}/mykeystore" keystorePass="changeit"
   clientAuth="false" sslProtocol="TLS"/>

Ensure Tomcat binaries are allowed to execute:

chmod +x $CATALINA_HOME/bin/*.sh
chmod +x $CATALINA_HOME/bin/*.bat

Deployment

  • Add an External Source for deployment, and select <project-path>/build/tmp/unpackShibboleth/shibboleth-idp/webapp
  • Use /idp as the application context path.

image

Logs

  • Select Tomcat Localhost Log and Tomcat Catalina Log
  • Add a new log entry with the alias idp and the log file location <project-path>/build/tmp/unpackShibboleth/shibboleth-idp/logs/idp-*.log

image

Usage

Overlay

The src/test/overlay directory contains files that will be laid on top of the originals. Mimic the same directory structure as the IdP itself and add files for customizations.

Authentication

Authentication is mocked using a dummy JAAS connector. Use any password/username you like. All is welcome.

Logs

Logging is controlled by the logback.xml file in the overlay directory. DEBUG level is turned on by default for a number of packages.

Build, Run and Remove docker image

Build the docker image without running it. This will also rebuild your shibboleth:

./gradlew buildDockerImage

Build and run the docker image, if you see an error that says that you cannot have duplicate images, then run the cleanDockerImage task below before running this task again:

./gradlew runDockerImage

Stop and remove the docker image if it is running.

./gradlew cleanDockerImage

About

The Shibboleth Identity Provider web application built using a Gradle Overlay.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published