Okta SSO Setup Guide
This guide will walk you through setting up Okta Single Sign-On (SSO) authentication with DreamFactory.
Prerequisites
- An Okta account (create one at https://www.okta.com if needed)
- Access to your DreamFactory admin application
Step 1: Okta Initial Configuration
1.1 Create Account and Access Admin Panel
- Create an account on https://www.okta.com (if you do not have one yet) and sign in
- Open the admin tab, the button for this should be located in the top right of the Dashboard
1.2 Add New Application
- Navigate to Applications and click "Create App Integration"
- Select "SAML 2.0" as the application type
1.3 Configure Application
- Fill in the General Settings page as you see fit, at a minimum a unique name for your new App
- When configuring SAML the first time the Single sign-on URL and Audience URI will be placeholders (until you create the service in DreamFactory) you can put just the base URL for your DreamFactory Instance for now. You will also need to change Name ID format to EmailAddress, Application username to Email, and Response to Unsigned. When complete the page should look like this:
-
Hit next and on the Feedback page select the radio button for "This is an internal app that we have created" and hit finish
-
On the right hand side of your new applications Sign On page you should have a button that says "View SAML setup instructions" select this and keep the tab open, you will need this information to setup the DreamFactory service for Okta SAML 2.0
Step 2: DreamFactory Configuration
2.1 Access DreamFactory Admin
- Open your DreamFactory admin WEB Interface in a new tab and sign in
2.2 Create User Role
- Create a role for users who will sign in via Okta SSO
- If you already have appropriate roles, you can use them
- For full access, create a role with the below permissions
2.3 Create API Key
- Go to API Generation & connections > API Keys
- Create a new API key and assign the previously created role to this key
2.4 Create SAML 2.0 Service
- Navigate to Security > Authentication and create a new SAML 2.0 service
-
You will need to fill in the Namespace field, this will become part of the URI structure for the service
-
The Label of the service will become the text in the button to login with Okta at the main login page for your DreamFactory instance
-
You will need to use the SAML setup instructions page from the Okta admin tab to populate the new service
-
"Identity Provider Single Sign-On URL" will need to be entered into the IdP SSO service URL field
-
"Identity Provider Issuer" will need to be entered into the "IdP EntityId" field
-
"X.509 Certificate" including the BEGIN and END lines will need to be entered into the "IdP x509cert" field
-
Finally the relay state needs to be filled in with the URL the service should return the JWT token to, typically this is https://your.instance.url/dreamfactory/dist/#/auth/login?jwt=_token_
-
Once configured your service should look like:
2.5 Configure Service
- Info Tab: Configure basic service information
- Config Tab: Configure according to your Okta Setup instructions
- API Docs Tab: Review the new endpoints for Okta integration
Step 3: Okta Second Configuration
3.1 Assign Application to Users
- In your Okta admin app, go to the Application page
- Select your DreamFactory application from the list
- Assign this application to the People/Group who will use it
3.2 Update Application Settings
- Go to the General tab and click the Edit button next to SAML settings
- Update the following fields with your DreamFactory endpoints:
- Single sign on URL this should look like: https://your.domain.url/api/v2/YourServicenameHere/acs
- Audience URI (SP Entity ID) this should look like: https://your.domain.url/api/v2/YourServicenameHere/metadata
- Save your changes
Step 4: Application Configuration
4.1 Configure SSO Endpoint
You can now sign in by going to the /sso
endpoint (see DreamFactory configuration > Step 2.5). Since we used the SAML 2.0 you should now see on the login landing page for your DreamFactory instance a new button below the normal login credentials fields, clicking this should redirect you to the Okta SSO page and proceed with requesting users to authenticate.
4.2 Configure CORS
Important: Don't forget to add your application and Okta domains to DreamFactory > Config > CORS. For detailed instructions on configuring CORS settings, see our CORS and SSL documentation.
Next Steps
Your Okta SSO integration is now complete! Users can sign in through Okta and access DreamFactory with the appropriate permissions based on their assigned roles.