Git Product home page Git Product logo

saml2-sample-java-webapp's Introduction

Spring Security SAML2 - Sample Web Application

A sample application protected by Spring Security Saml2.

Configuration

Context

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" 
      metadataFile="/path/to/sp-metadata.xml"/>

IdP Metadata

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

Build

gradlew build

Deploy

Embedded

The application can be run using an embedded Jetty instance:

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

External

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.

Test

  • The application has been tested with Shibboleth IdP 3.x, 4.x.
  • The application has been tested with Apereo CAS 5.x, 6.x.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.