This article explains configuring Single Sign-On (SSO) in CodeScan with Okta as your SAML 2.0 Identity Provider.
To allow users to log in via SAML SSO, CodeScan must be able to trust and rely on Okta to authenticate users wanting to log in. To establish this trust relationship, you must configure Okta and CodeScan so both parties can exchange authentication information.
When SSO is enabled, users and groups logging into CodeScan are redirected to the Okta login page. After successful authentication, they are redirected to the AutoRABIT Dashboard.
Who can use this feature
- Only Organization Admins can set up SAML SSO.
- You will need an existing Okta account to set up SAML SSO with Okta.
Step 1: Enabling Single Sign-On in CodeScan
Before configuring SSO in OKTA, you must enable SSO in CodeScan.
In CodeScan, click on the
Profileicon on the right corner of the screen and select your organization (under
Administration > SAML Connections.
Connection namefield, enter the identity provider name as you want to appear (use only Latin characters without spaces and any special characters).
Enter a valid domain name of the organization in the
Corporate domainfield that can be authenticated in the Identity Provider. This property cannot be updated after SAML Connection creation.
Example- In case of
firstname.lastname@example.org, the corporate domain will be
Enforce SSOcheckbox unchecked for now. You can enable Enforce SSO later when your domain has been confirmed. Once enabled, only SSO authentication will be allowed for email addresses of your corporate domain.Point to Note:
- Enforcing SSO affects both login and signup. Existing Auth0 users won't be able to login.
- Signup with email domain same as corporate domain won't be allowed.
- If the
Enforce SSOis enabled prematurely, it will prevent all users in their organisation from accessing CodeScan. Consider enforcing SSO only after admins have logged in to CodeScan using SSO.
SAML Connection statuscheckbox as
Enabledand click on
You will be able to see the
Metadata URLgenerated for your SSO configuration. Keep the current page open while you continue to add the CodeScan app to OKTA.
Step 2: Adding CodeScan as an App in OKTA
Set up the CodeScan application to provide necessary configuration information for CodeScan.
Sign in to Okta. You must have the Applications
If you don’t have an Okta organization, you can create a free Okta Developer Edition organization here: https://developer.okta.com/signup/
Navigate to the
From the main menu, go to
Applications > Applications.
Create App Integration.
In the next auto-populated dialog box, select the second option, i.e.,
SAML 2.0, and click on
General Settings, enter
CodeScanin the App name field, upload the
CodeScan logoand click on the
Configure SAMLtab, do the following:
Single sign on URL: Enter the same
URLin the below format:
For example: If your instance URL is
https://app.codescan.ioand the connection_id is
OKTA-SAML, your SSO URL would be
Audience URI (SP Entity ID): Enter your connection_id in this field. Example:
Your connection id will be available in the
Metadata URL generated inside CodeScan.
- On the same screen, in the
Attribute Statementspanel, add the following attributes (mandatory) and map to corresponding OKTA properties:
Feedbacksection, select the option:
I'm an Okta customer adding an internal appand click the checkbox next to the text
"This is an internal application that we created", and click on the
Navigate your mouse to the
Assignmenttab, and click
Assign > Assign to People.
Next, select the listed
usersand click on
After you assign the user, click
Save and Go Backand then click
Step 3: Configuring SAML Connection in CodeScan
Once the application is created, you will need to enter the identity provider data from OKTA into CodeScan.
In OKTA, go to the
Sign Ontab and navigate to the
SAML Signing Certificatessection.
For SHA-2, click on
Actions > Download Certificate.
Open the downloaded certificate in Notepad. You will need to copy the content of the certificate into the
X509 Signing Certificatefield of CodeScan SAML connection [Step 7.c below].
Click on the
Actions > View IdP metadata.
A new tab will open, which displays the IdP metadata file in XML format.
In CodeScan, on the
SAMLpage, go to
Actionsand click on
Enter the following values:
Provider Entity Id: Copy the entityID value and paste it into
Provider Entity Idinside CodeScan.
Sign In URL: Copy the SingleSignOnService Location value and paste it into the
Sign In URLinside CodeScan.
Copy the content of the downloaded certificate [refer to Step 2 above to download the certificate] into the
X509 Signing Certificatefield of Codescan SAML connection.
Updateon the CodeScan page.
The next step is to confirm your corporate domain to get the SSO working. You can confirm domain by raising a request via Codescan Support.
Step 4: Testing the Single Sign-On Configuration
Log out of the CodeScan Console, and then log back in using the
Log in with SAML2option.
Enter the corporate domain name you have configured when enabling SSO inside CodeScan in the
Your Company emailfield. For example-
You should successfully redirect to the CodeScan
Organizationpage after authentication.