Login into the Web Console as an Organization Admin
Click on System and select Identity Providers
Click on New Identity Provider
Provide a name, select "Custom" from the IdP Type drop down
Enter the domain for which you would like to enable SSO
Important
Within an org, the domain of an IdP cannot be used for another IdP. A domain existing in an org can be used in multiple orgs (for one IdP in each org)
Optionally, toggle Encryption if you wish to send/receive encrypted SAML assertions
Provide a name for the Group attribute
Optionally, toggle "Include Authentication Context" if you wish to send/receive auth context information in assertion
Click on Update & Continue
Important
Encrypting SAML assertions is optional because privacy is already provided at the transport layer using HTTPS. Encrypted assertions provide an additional layer of security on top ensuring that only the SP (Org) can decrypt the SAML assertion.
The IdP configuration wizard will display critical information that you need to copy/paste into your KeyCloak Org. Provide the following information to your KeyCloak administrator.
Mappers allows the users to add the required details to the SAML data
Select Mappers tab and click Create
Provide a Name and select Group List from Mapper Type drop-down
Copy/Paste the Group Attribute Name from the Controller SP Configuration page
Disable the below options and click Save
Single Group Attribute
Full group path
The Group configuration step is critical because it will ensure that KeyCloak sends the groups the user belongs to as part of the SSO process. The controller uses the group information to transparently map users to the correct group/role.
Once your Org and KeyCloak are integrated using the steps documented above, customers need to create and assign "Groups" in KeyCloak to the application. Multiple KeyCloak users can be added/removed from this group.
An identically named group needs to be created on your Org. Ensure that this group is mapped to the appropriate Projects with the correct privileges.
It is important to add user(s) to the KeyCloak group(s).
If the IdP registration results in an error, the issue will be observed during the login process. In such cases, export the Clients file from the screen below and edit the following parameters to resolve the issue: