Configure Human Approval with Okta
Set up human approval for a gateway that signs users in through Okta.
Overview
This guide sets up human approval for gateways that sign users in with Okta. You’ll create an approval app integration in your Okta org and add its client ID to your gateway configuration.
Before you start, your gateway must already use Okta as its identity provider. See Configure Okta.
Register the approval app in Okta
Create a new app integration in the same Okta org that signs users in to your gateway. Don’t reuse an AI client’s app integration.
-
In the Okta Admin Console, go to Applications and Resources → Applications and select Create App Integration.
-
Set Sign-in method to OIDC - OpenID Connect and Application type to Single-Page Application, then select Next.
-
Fill in the app settings:
- App integration name: for example
Dtwo Human Approval. People see this name when they sign in to approve a request, so pick one they’ll recognize. - Client definition: Use Okta-generated client ID
- Grant type: Authorization Code
- Sign-in redirect URIs: the Approval callback URL from your gateway’s Overview tab in the Dtwo UI
- Controlled access: assign the same users or groups who use the gateway. Only assigned users can approve actions.
- App integration name: for example
-
Select Save. From the General tab, copy the Client ID. Then go to Vault in the Dtwo UI, select Add entry, and fill in:
- Name:
OKTA_APPROVAL_CLIENT_ID - Value: the Client ID you copied
- Used by: All gateways, so every gateway in this Okta org can use the same approval app. Choose a single gateway instead if only one gateway needs it.
The client ID isn’t a secret, so you don’t need to turn on Encrypted value.
- Name:
-
Go to Security → API → Authorization Servers and open the authorization server your gateway uses. On the Access Policies tab, check that your policy is assigned to All clients. If it’s assigned to specific clients, edit it and add
Dtwo Human Approval.
One approval app can serve several gateways in the same Okta org. Add each gateway’s approval callback URL to the app’s Sign-in redirect URIs exactly as written — don’t use wildcards.
Configure your Dtwo gateway
Go to your gateway in the Dtwo UI and open Configuration → Advanced. In the gateway section, add a session_control entry next to your existing authentication entry:
session_control:
client_id: <<OKTA_APPROVAL_CLIENT_ID>>
redirect_uri: "<ApprovalCallbackURL>"
clearing:
enabled: true
<<OKTA_APPROVAL_CLIENT_ID>> pulls the client ID from the Vault entry you added in step 4. If you named the entry something else, use that name instead.
Replace <ApprovalCallbackURL> with the Approval callback URL from your gateway’s Overview tab, the same URL you added in step 3.
Save and deploy your gateway.
Test an approval
In your AI client, ask the agent to do something that needs approval. For example, invoke a policy that enables a dynamic safeguard and ask to disable the safeguard. The agent returns a link.
Open the link. Okta asks you to sign in again even if you’re already signed in — that’s expected. Sign in as the same user your AI client is signed in as, then approve the action.
If Okta shows an error that you aren’t assigned to the app, assign yourself (or a group you belong to) to
Dtwo Human Approvalunder Assignments.