This guide refers to using SSO to authenticate access to your endpoints. You cannot use these instructions to set up SSO for logging into your ngrok account in the dashboard.
- Restrict access to ngrok endpoints only to users authenticated via Okta
- Use Okta security policies, multi-factor authentication (MFA) authenticators (Okta Verify, FastPass, FIDO2), and ThreatInsights to control access to ngrok endpoints
- Use Okta’s Dashboard to facilitate access to ngrok apps
What you’ll need
- An Okta account with administrative rights to create apps.
- An ngrok Pay-as-you-go account with an authtoken or admin access to configure endpoints with SAML.
1. Configure Okta
In the Okta Admin Console, create a SAML 2.0 app integration for ngrok with the App Integration Wizard. For the full steps, see Okta’s guide to creating SAML app integrations. As you configure the app:- Enter temporary values such as
https://temporaryfor the Single sign-on URL and the Audience URI (SP Entity ID), and set Name ID format to EmailAddress. You replace the temporary values with ngrok’s values in a later step. - After you finish the wizard, open the app’s Sign On tab and download the IdP metadata XML from the active SHA-2 certificate’s View IdP metadata action. You use it in the ngrok policy below.
2. Configure ngrok
Once you have developer preview access, create apolicy.yaml file with the following content, replacing YOUR_IDP_METADATA_XML with the IdP metadata XML from Okta:
3000 with your local web app port and YOUR_DOMAIN with your ngrok domain:
3. Update the Okta app settings
- In Okta, open your ngrok app and go to the General tab.
- In SAML Settings, click Edit, then replace the temporary values with the generated ngrok values:
- Set Single sign-on URL to your ngrok ACS URL.
- Set Audience URI (SP Entity ID) to your ngrok SP Entity ID.
- Save the changes.
4. Test the integration
- In your browser, launch an incognito window.
- Access your ngrok endpoint (for example,
https://okta-sso-test.ngrok.appor a copied URL). - When prompted, log in with your Okta credentials.
- After you log in, you see your web app.