Salesforce SAML 2.0
SSO integration using SAML requires FlexDeploy to be available from a HTTPS url.
Salesforce support SSO as an identity provider meaning you can log into an external service provider (i.e FlexDeploy) or relying party with your Salesforce credentials.
The following documentation is referenced from Salesforce. See Salesforce Single Sign-On documentation for more information.
To set up this SSO configuration, follow these instructions:
1. Enable Salesforce as an identity provider
Determine which certificate you want to use to enable your org to communicate with the service provider. You can use the default certificate or create your own. See Certificates and Keys.
By default, a Salesforce identity provider uses a self-signed certificate generated with the SHA-256 signature algorithm. If you want to use the default certificate, proceed to step 2.
To create a new self-signed certificate, follow the instructions in Generate a Self-Signed Certificate. These instructions will be using a self-signed certificate.
To create a CA-signed certificate, follow the instructions in Generate a Certificate Signed by a Certificate Authority
From Setup, in the Quick Find box, enter Identity Provider, then select Identity Provider.
Click Enable Identity Provider.
Select a certificate from the dropdown menu.
Save your changes.
Click Download Certificate. This is typically .crt file. FlexDeploy will use the certificate to connect to Salesforce.
Copy the URL of Salesforce Identity (SF_METADATA_URL) as this will be used to connect to Salesforce.
2. Integrate FlexDeploy as a SAML-enabled connected app
Use the New Connected App wizard to define a connected app.
In Lightning Experience, you use the App Manager to create connected apps. From Setup, enter App in the Quick Find box, then select App Manager. Click New Connected App.
In Salesforce Classic, from Setup, enter Apps in the Quick Find box, then select Apps. On that page under Connected Apps, click New.
Configure settings for the connected app.
Under Basic Information
Name your app - i.e FlexDeploy
Enter your own email address
Under Web App Settings
Select Enable SAML.
For Entity Id, enter https://HOST:PORT/flexdeploy/callback?client_name=SAML2Client
For ACS URL, enter https://HOST:PORT/flexdeploy/callback?client_name=SAML2Client
For Start URL, enter https://HOST:PORT/flexdeploy
For Subject Type, select Username.
For Name ID Format, select urn:oasis:names:tc:SAML:2.0:nameid-format:persistent.
For Issuer, keep the default value, your subdomain.
In the field IdP Provider Certificate, keep the default (unselected).
For Verify Request Signatures, keep the default (unselected).
Click Save.
Under Profiles or Permission Sets, add the profiles or permissions sets of the users who can access this connected app
3. Import SSO Certificate from Salesforce into FlexDeploy keystore
You can use the same keystore which was created as part of the HTTPS configuration, or create one using the below command: This will also create a PrivateKeyEntry
keytool -genkey -alias flexdeploy -keyalg RSA -keystore /u01/flexdeploy/sso/flexdeploy.keystore
Import the certificate from step 1 into the keystore (adjust parameters below as appropriate).