Skip to content

Instantly share code, notes, and snippets.

@imShakil
Created January 23, 2025 08:37
Show Gist options
  • Save imShakil/965d4d1ba9bd5a446ff3aac42e1978a8 to your computer and use it in GitHub Desktop.
Save imShakil/965d4d1ba9bd5a446ff3aac42e1978a8 to your computer and use it in GitHub Desktop.
jans saml SSO testing with SP

Testing Jans SAML SSO with sptest

Installing SAML IDP in Janssen Server

During installation the Janssen Server, make sure you have selected Jans KC to be installed.

Screenshot 2025-01-23 at 11 51 30

Or You can install Jans KC with the following command:

python3 /opt/jans/jans-setup/jans_setup.py

Configure IDP [Janssen Server]

In this tutorial, we are going to use Iamshowcase as a service provider. Lets create a TR, Apply following steps in Janssen Server:

  • Download sp metadata: wget https://sptest.iamshowcase.com/testsp_metadata.xml
  • Open Jans TUI and navigate to Jans SAML > Service Providers > Add Service Provider: Screenshot 2025-01-23 at 14 05 07
  • Release some attributes, for example: email, username, transientID Screenshot 2025-01-23 at 14 07 27
  • Finally Save it.

Configure SP [IAMShowcase]

Since We are done at Janssen Server side, now let's connect SP with the IDP:

Test SSO

Copy that link and open it in a browser. You can open it in incognito mode to avoid session issue. So, It will redirect you to janssen login page. Once you logged in with user credentials it will redirect back to the SP's protected page and show the user session details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment