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 to only users who authenticated via Curity
- Use Curity security policies and multi-factor authentication (MFA) authenticators, including BankId, SITHS, and WebAuthn, to control access to ngrok endpoints
- Use Curity’s Dashboard to facilitate access to ngrok apps
What you’ll need
- A Curity account with administrative rights to create clients.
- An ngrok Pay-as-you-go account with an authtoken or admin access to configure endpoints with OpenID Connect.
1. Configure Curity
In the Curity Identity Server admin UI, create an OAuth client that uses the code flow and OpenID Connect. For the full steps, including setting up an authenticator and generating a client secret, follow Curity’s Configure a Client tutorial. While configuring the client, set these values so it works with ngrok:- Add
https://idp.ngrok.com/oauth2/callbackas a Redirect URI. - Under Client Authentication, select secret and generate a secret. Copy the secret, since you can’t retrieve it later.
- Under Scopes and Claims, add the
openidscope. - On the Token Service > General page, enable the Expose Metadata toggle.
ngrok calls the
/.well-known/openid-configurationendpoint at Curity to pull the configuration for your Authorization Server.
https://acme.com/oauth/v2/oauth-anonymous), to configure ngrok.
2. Configure ngrok
Secure your endpoint with the OpenID Connect Traffic Policy action.This step assumes you have an app running locally (for example, on
localhost:3000) with the ngrok agent installed.policy.yaml file with the following content, replacing the placeholder values with those copied from Curity Identity Server:
https://curity-sso-test.ngrok.app).
3. Test the integration
- In your browser, open an incognito window.
- Access your ngrok endpoint (for example,
https://curity-sso-test.ngrok.appor using a copied URL). - When prompted, log in with your Curity credentials.
- After you log in, you see your web app.