SSO with Okta

Okta can use Trowyn in two ways:

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

Option A: OpenID Connect identity provider

  1. 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.
  2. In the Okta Admin Console go to Security → Identity Providers → Add identity provider → OpenID Connect IdP.
  3. 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 (or idpuser.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).
  4. 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.
  5. 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

  1. 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.
  2. In the Trowyn console, SSO → Add app → SAML: Entity ID = Okta's Audience URI, ACS URL = Okta's ACS URL. NameID format: unspecified or emailAddress.
  3. 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
  4. 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).