Skip to content

Okta Integration

Shoehorn supports Okta as both an authentication provider (OIDC) and an orgdata provider (Okta Management API for user/team sync). This guide walks through the exact Okta app configuration, Helm values, and troubleshooting mapped to the error codes Shoehorn emits on /auth-error.

  • An Okta organization with admin access
  • Shoehorn deployed via the Helm chart: see Helm deployment
  • Your Shoehorn domain (e.g. shoehorn.example.com) reachable from browsers that will sign in

In the Okta admin console, go to Applications → Create App Integration and select:

  • Sign-in method: OIDC – OpenID Connect
  • Application type: Web Application

Then configure the following fields exactly: the non-default values matter:

Field Value
App name Shoehorn
Client authentication Client secret
Proof of possession (PKCE) Require PKCE as additional verification
Client secrets Generate one and copy it: you will store this as OKTA_CLIENT_SECRET
Grant type ☑ Authorization Code    ☑ Refresh Token
Refresh token behavior Rotate token after every use

Refresh Token grant is required. Shoehorn requests the offline_access scope at login so it can renew your session in the background and keep you signed in for the configured session length. Without this grant, sessions drop to the access-token lifetime and users get bounced back to the sign-in screen. If you use a custom Okta authorization server, also make sure offline_access is in its allowed scopes (the default server allows it once the grant is enabled).

| Sign-in redirect URIs | https://<your-domain>/api/v1/auth/callback | | Sign-out redirect URIs | https://<your-domain>/logout | | Login initiated by | App Only | | Controlled access | Assign to the Okta groups that should have Shoehorn access |

Okta compares these URIs character for character. Keep /logout on the sign-out URI: without it, sign-out fails with “The ‘post_logout_redirect_uri’ parameter must be a Logout redirect URI in the client app settings”.

Save, then copy the Client ID: you will store this as OKTA_CLIENT_ID.

If users cannot sign in after completing the rest of this guide, check Applications → Shoehorn → Sign On → Sign On Policy. A permissive starting rule is:

  • Catch-all rule: Access = Allowed, Authentication = Any 2 factor types

Tighten this once signing in works end-to-end.

Okta does not include group membership in the ID token by default. Without this claim, Shoehorn cannot map your Okta groups to Shoehorn roles: logins will land on /auth-error?code=GROUPS_CLAIM_MISSING.

  1. Security → API → Authorization Servers: select the default authorization server (or your custom one)
  2. Claims tab → Add Claim
Field Value
Name groups
Include in token type ID Token, Always
Value type Groups
Filter Matches regex, value .*
Include in Any scope

Save. Use Okta’s Token Preview (same authorization server page) to confirm the token now carries a groups array.

3. The Tenant (okta_org) Claim Is No Longer Needed

Section titled “3. The Tenant (okta_org) Claim Is No Longer Needed”

You can skip this step. Shoehorn takes the tenant from its own configuration, not from anything in the token, on both web sign-in and MCP. Set ORGANIZATION_SLUG (or TENANT_ID) on the server and you’re done.

If you already added the claim, leave it. It’s read and then ignored, so removing it changes nothing and costs you a sign-in.

If you set this up before August 2026 and followed the old guidance, nothing is broken and there’s nothing to undo.

4. (Optional) Create an API Token for Orgdata Sync

Section titled “4. (Optional) Create an API Token for Orgdata Sync”

If you want Shoehorn to sync users and teams proactively from Okta: rather than only resolving memberships on individual logins:

  1. Security → API → Tokens → Create Token
  2. Name: Shoehorn Orgdata Sync
  3. Copy the token: you will store this as OKTA_API_TOKEN

The token runs as the creating user. If that user loses read access to users or groups, sync breaks silently: prefer creating the token as a dedicated service account.

The chart’s examples/values-okta.yaml is the canonical reference. It stays in sync with the chart schema. Copy it and fill in the CHANGE_ME markers.

The Okta-specific keys you’ll set:

Path Source
auth.provider: okta required
auth.okta.domain step 1 — bare host, no scheme
auth.okta.clientId step 1
auth.okta.clientSecretRef.key the key inside your Secret that holds the client secret
auth.okta.apiTokenSecretRef.key the key holding the Management API token, only if you enable orgdata sync (step 4)
auth.orgdata.enabled: true to sync users and teams from Okta
rbac.roleAssignment.tenantAdmin.user or .group a single email or Okta group; the matching account gets tenant:admin on first sign-in while no roles exist yet

For the secret keys (okta_client_secret, okta_api_token, session/JWT keys, postgres/valkey/meili keys), follow the secret-creation command in the chart’s README or values-okta.yaml header. Postgres and DB passwords must be URL-safe: use openssl rand -hex, not -base64.

The chart’s schema enforces that auth.okta.domain and auth.okta.clientId are set whenever auth.provider: okta. helm install refuses with a minLength: got 0, want 1 error if either is missing, and rejects the example placeholders (your-org.okta.com, 0oaXXXXXXXXXXXXXX) with a field-named error.

Once installed, a browser login flows end-to-end:

  1. User visits https://shoehorn.example.com → Shoehorn redirects to Okta
  2. User authenticates in Okta → Okta redirects back to /api/v1/auth/callback with an ID token
  3. Shoehorn verifies the ID token signature against Okta’s JWKS (fetched from auth.okta.domain), then validates issuer and audience
  4. If the user doesn’t exist in Shoehorn, it JIT-provisions them using sub, email, and groups claims
  5. Shoehorn resolves roles:
    • First it checks rbac.roleAssignment.tenantAdmin.user/.group against the user’s email/Okta groups (bootstrap path, only while the roles table is empty)
    • Then it applies Shoehorn-side group → role mappings configured under Admin → Directory → Teams
  6. If auth.orgdata.enabled, a targeted sync fires for the new user so team-based mappings resolve immediately rather than waiting for the next scheduled sync

Logout follows the OIDC RP-initiated logout spec:

  1. User clicks Sign out → browser hits /api/v1/auth/logout
  2. Shoehorn clears its session, then discovers Okta’s end_session_endpoint and redirects the browser there
  3. Okta clears its own session and redirects back to your Shoehorn domain
  4. The user lands signed-out; re-opening Shoehorn prompts Okta login afresh

When login fails, Shoehorn redirects to /auth-error?code=<CODE>. The code tells you where to look:

Symptom / code Likely cause Fix
code=GROUPS_CLAIM_MISSING Groups claim not configured on the authorization server Repeat step 2. Use Okta’s Token Preview to confirm the claim appears.
code=INVALID_CLAIMS The token is missing an issuer or a subject, or the server has no tenant configured Not the okta_org claim, despite what this table said before August 2026. Check that ORGANIZATION_SLUG or TENANT_ID is set on the server, then use Token Preview to confirm the token carries iss and sub.
code=NO_ROLES User has Okta groups, but none map to a Shoehorn role Configure a mapping under Admin → Directory → Teams, or set rbac.roleAssignment.tenantAdmin.user/.group for the bootstrap path (only fires while no roles exist yet).
code=PROVIDER_UNAVAILABLE Shoehorn couldn’t finish the login exchange with Okta: the token endpoint was unreachable, Okta returned an error, or repeated failures tripped the circuit breaker Usually transient. Try again. If it persists, check OKTA_DOMAIN (use your-org.okta.com, no scheme or slash) and your cluster’s egress path to Okta.
code=JWKS_UNAVAILABLE Shoehorn couldn’t fetch Okta’s signing keys Usually transient. If it persists, verify OKTA_DOMAIN and your cluster’s egress network path to Okta.
Login redirects back to Okta in a loop Session cookie expiring at epoch 0 (very old Shoehorn build) Upgrade to Shoehorn ≥ v0.4.3.
Test Connection fails with “invalid API token” Token was revoked or the creating user was deactivated Recreate the token as a dedicated service account.
Test Connection fails with “host unreachable” OKTA_DOMAIN contains the full URL Use your-org.okta.com, no scheme, no slash.
Sign-out fails with “The ‘post_logout_redirect_uri’ parameter must be a Logout redirect URI in the client app settings” Sign-out redirect URIs doesn’t include the exact URI Shoehorn sends Add https://<your-domain>/logout. The bare domain doesn’t match.
After logout, user is auto-signed back in end_session_endpoint not called: misconfigured app Confirm Sign-out redirect URIs in the Okta app includes https://<your-domain>/logout.

When debugging claim issues, paste the ID token into jwt.ms and check:

  • iss matches https://<domain> (or https://<domain>/oauth2/<authz-server-id> if you use a custom authorization server)
  • aud equals your OKTA_CLIENT_ID
  • groups contains the expected array
  • sub is the stable Okta user ID (e.g. 00uXXXXXXXXXXXXXX)

Once deployed, visit Admin → Integrations → External → Okta in Shoehorn. The Test Connection button calls the Okta Management API with your stored token and returns a green banner on success or the exact upstream error on failure. It’s the fastest way to verify OKTA_API_TOKEN before investigating deeper.

Shoehorn lets you mix auth and orgdata providers:

Authentication Orgdata Supported
Okta Okta ✅ Most common
Okta Zitadel ✅
Zitadel Okta ✅
Okta none (orgdata disabled) ✅ Relies on rbac.roleAssignment.tenantAdmin + in-app role assignment