PhenixID

Step by Step – Cambio Cosmic (desktop client) SSO with PhenixID Authentication Services

Summary

This document will guide you through the steps to provide Single-Sign-On and Single Logout to Cambio Cosmic (desktop client, “digital biljett”) using SAML with PhenixID Authentication Services as SAML IdP.

 

System Requirements

  • PhenixID Authentication Services 2.0 or higher
  • Information about the Cambio Cosmic environment: Assertion Consumer Location URL, entity ID, signing certificate, Single Logout URL (normally, the Single Logout URL is the same as Assertion Consumer Location URL).
  • Cambio Cosmic test account

Instruction

Set up PhenixID Authentication Services as SAML IdP

  1. Setup PhenixID Authentication Services as a SAML IdP using one of the Federation scenarios described here. (If the desired authentication method is not provided by a scenario, use the documentation for the SAML authenticator here). Make sure to fetch the Cosmic userID (hsaID or other attribute) during authentication.
  2. Modify the execution flow in order to create the SAML assertion properly:
    1. Make sure you have an item property named hsaid (fetched from previous valve in the pipe, for example an LDAP search or a certificate attribute).
    2. Add a valve to include the property role with the value cosmic-user. Make sure to place it before the AssertionProviderValve.
    3. Add a valve to include the property http://sambi.se/attributes/1/employeeHsaId with the hsaiD value. Make sure to place it before the AssertionProviderValve.
    4. Click Save
    5. Click Advanced
    6. Click Pipe Valves
    7. Locate the AssertionProvider valve used in the flow.
    8. Edit the AssertionProvider valve.
      Set these params:
      – nameIDAttribute = hsaid
      – additionalAttributes=role,http://sambi.se/attributes/1/employeeHsaId
      – misc object:
      * excludeSubjectNotBefore=true
      * nameIdFormat = urn:oasis:names:tc:SAML:2.0:nameid-format:persistent
      Example:

      {
       "id": "23bef445-5170-4a01-a806-c40d5c92ae39",
       "name": "AssertionProvider",
       "enabled": "true",
       "config": {
       "targetEntityID": "cc5332ed-6c3d-445f-ba77-0450e1f13dc1",
       "userNameAttribute": "sAMAccountName",
       "sourceID": "urn:dt-test:demo.phenixid.net",
       "nameIDAttribute": "http://sambi.se/attributes/1/employeeHsaId",
       "guide_ref": "4881ddc5-2b18-4423-b765-72de5d0a0751",
       "additionalAttributes": "http://sambi.se/attributes/1/employeeHsaId,role",
       "misc": {
       "excludeSubjectNotBefore": "true",
       "nameIdFormat": "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent"
       }
       },
       "created": "2018-05-07T20:25:44.929Z",
       "modified": "2018-05-07T20:27:55.131Z"
       },
  3. Click Stage Changes
  4. Click Commit Changes.
  5. Download the IdP SAML Metadata and provide it to the technical contact from Cambio Cosmic.
  6. Configure Cambio Cosmic to trust the IDP [Not documented here].

 

Add Cambio Cosmic SAML SP Metadata to PhenixID Authentication Services

  1. Ask the Cosmic administrator for SAML SP XML Metadata url or file.
  2. Upload the metadata url/file using this Federation Scenario.

 

Test

  1. Open the Cosmic client and click Login.
  2. You should be redirected to the Idp (PhenixID Authentication Services)
  3. Authenticate
  4. You should be redirected back to Cosmic
  5. You are now logged in to Cosmic.

Troubleshooting

1. Set PhenixID Server logging to DEBUG mode following this guide.

2. Open PhenixID server.log and find the log row which displays the return values from the execution pipe. Example:

2018-05-28 21:59:49,218 [PipesVerticle] DEBUG: Response: {“success”:true,”items”:[{“id”:”xxx”,”properties”:{“role”:[“nova-user”],”binding”:[“urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST”],”SAMLResponse”:[“PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c2FtbDJwOlJlc3BvbnNlIHhtbG5zOnNhbWwycD0idXJuOm9hc2lzOm5hbWVzOnRjOlNBTUw6Mi4wOnByb3RvY29sIiB4bWxuczp4cz0iaHR0cDovL3d3dy53My5vcmcvMjAwMS9YTUxTY2hlbWEiIERlc3RpbmF0aW9uPSJodHRwczovL25vdmEtdGVzdC5jYW1iaW8uc2Uvbm92YS1hdXRoL3NhbWwiIElEPSJfMjA1NGY5NmU2YTI2OGIwNGNhYzBhNWQyODA5M2EwYTMiIEluUmVzcG9uc2VUbz0iSURfOWM3ODI0ZGEtZTFhMy00NWQxLTliMWUtMmQ3NjA2ZDU2ZWVmIiBJc3N1ZUluc3RhbnQ9IjIwMTgtMDUtMjhUMTk6NTk6NDlaI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mQ0ZTg5YTNjYiI+PHNhbWwyOkF1dGhuQ29udGV4dD48c2FtbDI6QXV0aG5Db250ZXh0Q2xhc3NSZWY+dXJuOm9hc2lzOm5hbWVzOnRjOlNBTUw6Mi4wOmFjOmNsYXNzZXM6UGFzc3dvcmRQcm90ZWN0ZWRUcmFuc3BvcnQ8L3NhbWwyOkF1dGhuQ29udGV4dENsYXNzUmVmPjwvc2FtbDI6QXV0aG5Db250ZXh0Pjwvc2FtbDI6QXV0aG5TdGF0ZW1lbnQ+PHNhbWwyOkF0dHJpYnV0ZVN0YXRlbWVudD48c2FtbDI6QXR0cmlidXRlIE5hbWU9InJvbGUiIE5hbWVGb3JtYXQ9InVybjpvYXNpczpuYW1lczp0YzpTQU1MOjIuMDphdHRybmFtZS1mb3JtYXQ6dXJpIj48c2FtbDI6QXR0cmlidXRlVmFsdWUgeG1sbnM6eHNpPSJodHRwOi8vd3d3LnczLm9yZy8yMDAxL1hNTFNjaGVtYS1pbnN0YW5jZSIgeG1sbnM6eHM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hIiB4c2k6dHlwZT0ieHM6c3RyaW5nIj5ub3ZhLXVzZXI8L3NhbWwyOkF0dHJpYnV0ZVZhbHVlPjwvc2FtbDI6QXR0cmlidXRlPjwvc2FtbDI6QXR0cmlidXRlU3RhdGVtZW50Pjwvc2FtbDI6QXNzZXJ0aW9uPjwvc2FtbDJwOlJlc3BvbnNlPg==”],”hsaid”:[“SE162321000024-0050617″],”target”:[“https://nova-test.cambio.se/nova-auth/saml”]}}]}

3. Fetch the SAMLResponse value and base64 decode the value.

4. Verify that the nameID value, the role and hsa-sambi attribute are present in the SAML Assertion. Example extract:


DISCLAIMER
Information provided in this document is for your information only. PhenixID makes no explicit or implied claims to the validity of this information. Any trademarks referenced in this document are the property of their respective owners.

The origin of this information may be internal or external to PhenixID. PhenixID makes all reasonable efforts to verify this information.

PhenixID - support.phenixid.se