Integrating Salesforce with CalNet SSO (SAML)
Background
Integrating Salesforce with single sign-on (SSO) is a multi-step process using the SAML protocol. You will need to establish a custom domain in Salesforce, generate a self-signed certificate, and coordinate with the CalNet team to establish a trusted relationship between your Salesforce org and the CalNet system.
Part 1: Establish a custom "My Domain" in Salesforce
A custom subdomain allows you to better manage login authentication and brand your org (e.g., https://berkeley-department.my.salesforce.com). These steps assume you have administrator access to Salesforce.
- From Setup, enter "My Domain" in the Quick Find box, then select My Domain.
- Select Edit next to My Domain Details.
- Enter your desired subdomain name. It can include up to 40 letters, numbers, and hyphens.
- Click Check Availability, then click Register Domain.
- You will receive an email when your domain is ready for testing.
Test and Deploy Your Domain
- Log in via the link in the Salesforce confirmation email, or return to the My Domain setup page.
- Verify that the URL in your browser address bar reflects the new subdomain.
- Check your UI for "hard-coded references" (links pointing to old instances like na1.salesforce.com) and update them.
- Once verified, click Deploy to Users.
Part 2: Generate a Self-Signed Certificate
Salesforce requires a specific certificate container format. If you do not feel comfortable with the command line, reach out to CalNet for help during your service request.
SECURITY NOTE: The keystore file you will generate contains a sensitive private key. Do not attach this file to tickets or emails. After uploading to Salesforce, delete the file from your computer.
- Ensure Java is installed to access the
keytoolapplication. - Run the following command, replacing the alias name with a unique identifier (no spaces or special characters):
keytool -genkeypair -keyalg RSA -keysize 4096 -validity 3650 -alias mysalesforcesite -keystore keystore.jks -storetype jks
- Set a strong keystore password and store it securely.
- When prompted for "first and last name," enter the alias used in step 2. You may fill out the OU (IT), Org (UC Berkeley), and Location (Berkeley, CA, US) as prompted.
- When prompted for a "key password," simply press RETURN (leave it the same as the keystore password).
- Login to your Salesforce Service Console, click the Gear Icon, and select Setup.
- Navigate to Settings > Security > Certificate and Key Management.
- Select Import from Keystore. Select your
keystore.jksfile, enter your password, and click Save.
Part 3: Add Single-Sign Configuration to Salesforce
- Go to Setup > Settings > Security > Remote Site Settings.
- Select New Remote Site and enter:
- Name: Production_IDP_Metadata_CalNet
- URL:
https://mdq.incommon.org/entities/urn:mace:incommon:berkeley.edu - Active: Checked
- In Quick Find, search for Single Sign-On Settings. Click New from Metadata URL.
- Enter the InCommon URL from step 2 and click Create.
- On the settings page, configure the following:
| Field | Requirement/Value |
|---|---|
| Name / API Name | CalNet SSO / CalNet_SSO |
| Issuer | urn:mace:incommon:berkeley.edu |
| Request Signing Certificate | Select the certificate imported in Part 2 |
| SAML Identity Type | Assertion contains the Federation ID from the User object |
| SAML Identity Location | Identity is in the NameIdentifier element of the Subject statement |
| Custom Logout URL | https://shib.berkeley.edu/idp/logout |
Click Save, then select Download Metadata. Keep this file for Part 4.
Part 4: Request SSO Integration from CalNet
- Open an SSO Service Request in ServiceNow.
- Select "New SSO integration".
- Choose SAML as the protocol and provide your Entity ID.
- Attach the **XML Metadata** file you downloaded at the end of Part 3.
Part 5: Enable CalNet Authentication
- In Salesforce, return to My Domain setup.
- Scroll to Authentication Configuration and click Edit.
- Check the box next to CalNet SSO. (Keep "Login Page" active for now while testing).
- Click Save.
Part 6: Map Users (UIDs)
- Gather the UIDs for users who need access from
directory.berkeley.edu. - In Salesforce, go to Setup > Administration > Users > Users.
- Edit a user and paste their UID into the Federation ID field under Single Sign-On Information.
- Click Save.
Part 7: Finalize and Enforce SSO
IMPORTANT: Ensure you have a non-SSO administrator account or a backup password set before disabling the login form. If SSO breaks, you can bypass it by adding ?login to your URL (e.g., https://your-domain.my.salesforce.com/?login).
- Return to My Domain > Authentication Configuration > Edit.
- Uncheck Login Form and click Save. CalNet will now be the only login option for your users.