|
| 1 | +--- |
| 2 | +tags: |
| 3 | + - administration |
| 4 | + - test |
| 5 | + - SAML |
| 6 | + - SSO |
| 7 | +--- |
| 8 | + |
| 9 | + |
| 10 | +# Test SAML SSO with Flex |
| 11 | + |
| 12 | +This guide shows how to test Flex for SAML SSO. We will be using |
| 13 | +[sptest](https://sptest.iamshowcase.com/) test service provider |
| 14 | +to complete our test. |
| 15 | + |
| 16 | +## Installing SAML IDP in the Flex Server |
| 17 | + |
| 18 | +During installation the [Flex Server](../../../../), make sure you have |
| 19 | +selected the [Jans KC](https://docs.jans.io/head/janssen-server/keycloak/) |
| 20 | +module to be installed. |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | +## Configure IDP in Flex Server |
| 25 | + |
| 26 | +Follow the steps below to create a |
| 27 | +TR and apply them in [Flex Server](../../../../): |
| 28 | + |
| 29 | +* Download the SP metadata using the following command: |
| 30 | +```bash title="Command" |
| 31 | +wget https://sptest.iamshowcase.com/testsp_metadata.xml |
| 32 | +``` |
| 33 | +* Open the Flex Admin UI and navigate to `SAML > Configuration`. |
| 34 | +* Select `Keycloak` as the IDP. |
| 35 | + |
| 36 | + |
| 37 | +* Then navigate to `Website SSO` > `Add Service Provider` |
| 38 | + |
| 39 | + |
| 40 | +* Release the required attributes (e.g., `username`, `inum`). |
| 41 | + |
| 42 | + |
| 43 | +* Finally, click Apply. |
| 44 | + |
| 45 | +## Configure SP in Iamshowcase |
| 46 | + |
| 47 | + |
| 48 | +After configuring the IDP in Flex Server, it's time to connect the service |
| 49 | +provider (SP) with the IDP: |
| 50 | + |
| 51 | +* Download the IDP metadata from the following URL: |
| 52 | +``` |
| 53 | +https://<your-janssen-server>/kc/realms/jans/protocol/saml/descriptor |
| 54 | +``` |
| 55 | +* Go to: `https://sptest.iamshowcase.com/instructions#spinit` |
| 56 | +and upload the IDP metadata. |
| 57 | +* After the metadata is uploaded, it will provide you with an |
| 58 | +SP link to test the SAML SSO flow. |
| 59 | + |
| 60 | + |
| 61 | + |
| 62 | +## Test SSO |
| 63 | + |
| 64 | +* Copy that link and open it in a browser. You can open it in |
| 65 | +incognito mode to avoid session issue. |
| 66 | + |
| 67 | +* This will redirect you to the Janssen login page. Once you log in with |
| 68 | +your user credentials, you will be redirected back to the SP’s protected page, |
| 69 | +which will display the user session details. |
| 70 | + |
| 71 | +Refer to the Janssen Server [SAML SSO](https://docs.jans.io/head/janssen-server/keycloak/keycloak-saml-sso/) documentation for further details. |
| 72 | + |
| 73 | +## FAQ |
| 74 | + |
| 75 | +Check KC scheduler log for any TR issue |
| 76 | +``` |
| 77 | +/opt/kc-scheduler/logs/scheduler.log |
| 78 | +``` |
| 79 | +Also check file directory inside |
| 80 | +``` |
| 81 | +/opt/idp/configs/keycloak/sp/metadata |
| 82 | +``` |
| 83 | + |
0 commit comments