Skip to content
Connect an agent

Single sign-on

Single sign-on with Okta

Connect an Enterprise organisation to Okta with OpenID Connect or SAML 2.0. Prove your email domain in Plotwork first, as the single sign-on guide describes.

TL;DR

Plotwork fieldWhere it comes from in Okta
Issuer URLYour Okta domain, such as https://acme.okta.com. With a custom authorization server, its issuer, such as https://acme.okta.com/oauth2/default.
Client IDThe app's General tab, Client Credentials, Client ID
Client secretThe app's General tab, Client Credentials, the secret under Client secrets
Or no secret: a private key JWTClient authentication Public key / Private key, with the JWKS URL Plotwork shows. See Use a private key JWT.
Redirect URI to give Oktahttps://api.plotwork.dev/auth/sso/callback
SAML: Single sign-on URL and Audience URI to give OktaThe ACS URL and the Entity ID on Plotwork's Single sign-on tab
SAML: Metadata URLThe app's Sign On tab, SAML Signing Certificates, the Metadata URL

1. Create the app integration

  1. In the Okta Admin Console, open Applications, then Applications, and press Create App Integration.
  2. Choose OIDC - OpenID Connect as the sign-in method and Web Application as the application type, then press Next.
  3. Fill in the form:
Okta fieldValue
App integration namePlotwork
Grant typeAuthorization Code only
Sign-in redirect URIshttps://api.plotwork.dev/auth/sso/callback
Sign-out redirect URIsLeave empty
Controlled accessThe groups that should be able to sign in to Plotwork
  1. Press Save.

2. Copy the values into Plotwork

  1. On the app's General tab, under Client Credentials, check that Client authentication is Client secret. You can also tick Require PKCE as additional verification: Plotwork always sends it.
  2. Copy the Client ID, and the secret under Client secrets.
  3. In Plotwork, open your organisation's Single sign-on tab and fill in Identity provider:
Plotwork fieldValue
Issuer URLhttps://<your Okta domain>, the address you sign in to the Admin Console with, without -admin
Client IDThe Client ID you copied
CredentialClient secret
Client secretThe secret you copied
  1. Press Save provider, then turn on Sign in with single sign-on.

3. Check the address claim

Plotwork reads the email claim of the ID token, and refuses it when email_verified is false. Okta sends both when the app asks for the email scope, which Plotwork does. The address must be on a domain you verified in Plotwork: a person whose Okta address is on another domain is refused, and the failure is recorded.

Use a private key JWT (no secret)

Instead of a client secret, Okta can check a short JWT that Plotwork signs at each sign-in with a key it keeps for your organisation. Okta holds only the public key, so there is no secret to copy or renew. This is the private_key_jwt client authentication of OpenID Connect (Okta's client authentication reference (opens in a new tab)). The same steps work at Auth0, Ping and any provider that takes private_key_jwt.

  1. Create the app integration as in step 1.
  2. In Plotwork, under Identity provider, fill in the Issuer URL and the Client ID, choose Private key JWT under Credential, and press Save provider. Plotwork makes the signing key and shows the JWKS URL, the public key and its key ID, each with a copy button.
  3. In the Okta Admin Console, on the app's General tab, under Client Credentials, press Edit and set Client authentication to Public key / Private key.
  4. Under Public keys, choose Use a URL to fetch keys dynamically and paste the JWKS URL from Plotwork. Or choose Save keys in Okta and add the public key Plotwork shows; you then paste the new one after each rotation.
  5. Press Save, then turn on Sign in with single sign-on in Plotwork and try it.

What Plotwork sends at each sign-in, as Okta expects:

ClaimValue
iss and subThe app's Client ID
audOkta's token endpoint, as the issuer's discovery document names it, such as https://acme.okta.com/oauth2/v1/token
expFive minutes after it was made
jtiNew for every sign-in, so Okta refuses one used twice
SignatureRS256, the key named by kid in the header

Rotate key, under Signing key in Plotwork, makes a new key at once and keeps the old public key published for a day. With Use a URL to fetch keys dynamically, Okta reads the new key by itself. With a saved key, add the new one in Okta before the next sign-in.

Or connect with SAML 2.0

  1. In the Okta Admin Console, open Applications, then Applications, press Create App Integration, choose SAML 2.0, and press Next.
  2. Name the app Plotwork and press Next.
  3. In Plotwork's Single sign-on tab, choose SAML 2.0 under Identity provider, then fill in Okta's Configure SAML step from it:
Okta fieldValue
Single sign-on URLThe ACS URL from Plotwork. Leave Use this for Recipient URL and Destination URL ticked.
Audience URI (SP Entity ID)The Entity ID from Plotwork
Name ID formatEmailAddress
Application usernameEmail
ResponseSigned
Assertion SignatureSigned
Signature AlgorithmRSA_SHA256
Assertion EncryptionUnencrypted
  1. Press Next, then Finish. On the app's Sign On tab, under SAML Signing Certificates, copy the Metadata URL of the active certificate.
  2. In Plotwork, paste it under Metadata URL, leave Email attribute empty, and press Save provider. Then turn on Sign in with single sign-on.
  3. Assign the people or groups who should sign in on the app's Assignments tab.

People start from Plotwork's sign-in page. Starting from the Plotwork tile on the Okta dashboard is refused, because Plotwork accepts only sign-ins it started; hide the tile under the app's General tab, App Settings, Do not display application icon to users.

Provisioning with SCIM

Okta can also add, update and deactivate your members, and push the groups that decide their roles, from the same app integration. SCIM with Okta has every step: the SCIM connector base URL and token from Plotwork, the To App settings, assigning people, pushing groups, and mapping groups to roles.

Troubleshooting

What you seeWhat to check
"The issuer could not be used: the document names a different issuer"Use the issuer exactly as https://<your Okta domain>/.well-known/openid-configuration writes it, with or without /oauth2/default.
"Your identity provider did not sign you in"The person is not assigned to the app. Add them, or their group, under Assignments.
"Your identity provider sent a sign-in Plotwork could not trust"The Client ID in Plotwork is not this app's, or the issuer belongs to another authorization server. For SAML: the Single sign-on URL or the Audience URI is not Plotwork's, Assertion Encryption is on, or Okta rotated its certificate; save the provider again with the same Metadata URL.
Okta says a user could not be created: the address is not on a verified domainThe person's Okta username is on a domain you have not verified in Plotwork. Verify it, or change the username.
With a private key JWT, "Your identity provider could not be reached or answered something unexpected"Okta refused Plotwork's assertion. Check that Client authentication is Public key / Private key and that the JWKS URL is Plotwork's for your organisation. With a saved key, the key may be from before a rotation: add the current one. Okta's System Log shows the reason.
"The link has expired or was opened in another browser" after the Okta dashboardThe person started from the Okta tile. Start from Plotwork's sign-in page instead.

See also

PageWhy
Single sign-onDomains, the switches, Require single sign-on and the way back in
SCIM with OktaAdding and deactivating members from Okta, with roles by pushed group
Single sign-on with Microsoft Entra IDThe same for Microsoft Entra ID, with a federated credential instead of a secret
Single sign-on with Google WorkspaceThe same for Google Workspace