SAML with Jumpcloud - Users and Admins
The following example assumes your Knocknoc instance is located at https://demo.knoc.cloud. Wherever you see that, please substitute it for your own instance URL.
Setting Up the IdP
Creating An Application
-
Login to your JumpCloud tenant as an administrator.
-
From the left-hand menu, select the "SSO" option (under "User Authentication").
-
Click the "Get Started" button.
-
Click Select on Custom Application in the bottom right of the Featured Applications pane and click Next.
-
Click Manage Single Sign-On, and then Configure SSO with SAML and click Next.
-
Enter a Name for your application under Display Label (e.g Knocknoc)
-
Scroll down and click Advanced Settings
-
Enter a semi-unique URL for the SSO IdP URL (e.g papercompany-knocknoc)
-
Click Save Application.
- Click Configure Application.
-
Single Sign-On Configuration Settings;
- Set the IdP Entity ID to "Knocknoc" Note: this is a default, if you intend to run multiple instances, choose something unique.
- Set the SP Entity ID to https://demo.knoc.cloud/api/saml/metadata
- Set the ACS URL to https://demo.knoc.cloud/api/saml/acs
- Generate a new certificate and key, this can be done on a Linux host using the below command.
openssl req -new -x509 -days 3650 -nodes -subj /CN=Knocknoc/ -out user-demo-knoc-cloud.crt -keyout user-demo-knoc-cloud.key
- Click 'Upload SP Certificate' and choose the certificate (.crt) just generated.
- Set SAMLSubject NameID to "username"
- Set the SAMLSubject NameID Format to "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent"
- Leave the Signature Algorithm as RSA-SHA256
- Check Sign Assertion
- Leave Default RelayState blank
- Enter the Login URL as https://demo.knoc.cloud/api/login/saml
- Check Declare Redirect Endpoint
- Set IDP URL to
https://sso.jumpcloud.com/saml2/knocknoc
Note: this is a default, if you intend to run multiple instances, choose something unique as in step 11.1. - Under User Attributes click Add Attribute.
- Set Service Provider Attribute Name to "realName"
- Set JumpCloud Attribute Name to "fullname"
- Under Constant Attributes click Add Attribute.
- Set Service Provider Attribute Name to "sessionDuration"
- Set Value to however many minutes SAML users' sessions should last (e.g 480 for 8 hours)
- Check include Group Attribute
- Change memberOf to groups
- Click Save.
- Go back into the newly-created SSO application.
- Click on the "SSO" heading,
- Click "Export Metadata" and save as an XML File.
- Click Copy Metadata URL and save this it will be required for the Knocknoc SAML Config
Group and User Configuration
- Login to the JumpCloud admin panel.
-
Select "User Groups" from the left-hand menu under User Management.
-
Click the Green + to create a new group.
- Under Name enter the group name (e.g ConfluenceUsers). Note: The name must match group name in Knocknoc to allow ACL assignment to be automated.
- Click Users and Check the appropriate users.
- Click Applications and check the newly created Application (e.g Knocknoc)
- Click Save.
Knocknoc SAML Config
- Login In the Knocknoc admin interface.
- Click on Settings on the left.
- Under Public URL enter your knocknoc url. Note: do not add a / at the end of the URL.
- For the SAMLMetaDataFile, upload the xml file you downloaded from JumpCloud.
- For the SAMLCertFile, upload the certificate (.crt) file created in the Creating an Application section.
- For the SAMLKeyFile, upload the key (.key) file created in the Creating an Application section.
- For the SAMLMetadataUrl, paste the Metadata URL copied in Step 21 of the Creating an Application section.
- Click Save.
Final Testing
Assuming you granted your own user permission to one or more Knocknoc groups in JumpCloud, you should now be able to login to Knocknoc using SSO.
- Browse to https://demo.knoc.cloud
- There should now be an "SSO Login" button.
- Click this, if you are not already authenticated to your IdP you should now be directed to the IdP login page. Note: If you are already authenticated you'll simply be redirected to an authenticated Knocknoc session.
- If ACLs have already been added you should also see these now say Granted.
If this all works, congratulations! You've successfully run the SAML gauntlet.