SSO with Okta
Okta can use Trowyn in two ways:
- As an identity provider (users sign in to Okta by approving on their phone), with OpenID Connect (recommended) or SAML.
- As an MFA factor ("IdP authenticator"): users sign in to Okta as usual, then approve in Trowyn as their second factor.
Okta's menus change from time to time. If a label below doesn't match, see Okta's guide to adding an external identity provider.
Before you start
- Link each user's phone in Trowyn with their Okta username (usually their email) as the
external_user_id. - Create the app in a test environment first, with a test user, then repeat in live.
Option A: OpenID Connect identity provider
- In the Trowyn console, open SSO → Add app → OpenID Connect, client type Confidential. For now, put any https URL as the redirect URI; you'll replace it in step 4. Save the client secret shown once.
- In the Okta Admin Console go to Security → Identity Providers → Add identity provider → OpenID Connect IdP.
- Fill in:
- Scopes:
openid profile email- Client ID and Client secret: from step 1. Client authentication: client secret. - Issuer, Authorization endpoint, Token endpoint, JWKS endpoint, Userinfo endpoint: copy them from the Trowyn console (SSO page). - IdP username:idpuser.preferred_username(oridpuser.email), Match against: Okta username. Choose what happens for users who don't exist yet (usually redirect to the Okta sign-in page, so no one is created by accident). - Save, then copy the Redirect URI Okta shows for the new IdP (it looks like
https://<your-okta-domain>/oauth2/v1/authorize/callback). In the Trowyn console, edit the app and replace its redirect URI with exactly that URL. - In Okta, go to Security → Identity Providers → Routing rules and send the right users to Trowyn (for example a group, or users of your domain). Test with one user first.
Option B: SAML identity provider
- In Okta, Add identity provider → SAML 2.0 IdP. Okta shows its Assertion Consumer Service URL and Audience URI after you save; you'll need both.
- In the Trowyn console, SSO → Add app → SAML: Entity ID = Okta's Audience URI, ACS URL =
Okta's ACS URL. NameID format:
unspecifiedoremailAddress. - In Okta's IdP settings, set:
- IdP Issuer URI: your Trowyn issuer (Entity ID)
- IdP Single Sign-On URL: the Trowyn SAML SSO URL, binding HTTP POST or Redirect
- IdP Signature Certificate: download it from the Trowyn console (
certificate.pem) - IdP username:idpuser.subjectNameId, matched against the Okta username - Add a routing rule as in option A.
Option C: Trowyn as an MFA factor
Create the IdP as in option A or B but set IdP Usage to Factor only. Then add it under Security → Authenticators → Add authenticator → IdP Authenticator, and require it in your authentication policies. Users sign in to Okta as before, then approve on their phone.
Check it
Open your Okta sign-in page in a private window and sign in as the test user. You should land on
trowyn.com/signin, get the push, approve, and come back signed in. The Trowyn console's audit log
shows sso_authorize, sso_signin_approved and sso_token_issued (OIDC).