Skip to content
A sample Java application that is protected by Spring Security SAML2.
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
gradle/wrapper added gradlew and gitignore file Aug 31, 2017
src/main Doc updates Jan 24, 2017
.gitignore added gradlew and gitignore file Aug 31, 2017
LICENSE added lic May 9, 2015 Update Aug 30, 2017
build.gradle updated Sep 13, 2016
gradlew added gradlew and gitignore file Aug 31, 2017
gradlew.bat added gradlew and gitignore file Aug 31, 2017
settings.gradle added build config May 9, 2015


A sample application protected by Spring Security Saml2.

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.



App is available by default at https://hostname[:port]/sp.

SP Metadata

The SP metadata is available under src\main\resources\metadata. Deploy the application, and use the Metadata Administration tab to generate new metadata for the SP. Copy the content and paste them into the sp-metadata.xml file.

The newly generated SP metadata needs to be loaded by the IdP, in the metadata-providers.xml file. For example:

<MetadataProvider id="LocalMetadata"  xsi:type="FilesystemMetadataProvider" 

IdP Metadata

The IdP metadata is referenced inside the file. While you are reviewing this file, also adjust the property. This should be pointed to FQDN of the server that hosts the sample application.


gradlew build



The application can be run using an embedded Jetty instance:

gradlew build jettyRunWar
  • The sample application will be available at: https://hostname[8081|9443]/sp
  • Remote debugging via the embedded Jetty deployment option is available under port 5005


The build script is able to automatically deploy the sample to $CATALINA_HOME, via:

gradlew deploy

Note that deploy will automatically build the sample application as well. For this work, you must define the $CATALINA_HOME environment variable to point to your Tomcat installation directory.


  • The application has been tested with Shibboleth IdP 3.3.
You can’t perform that action at this time.