Okta Integration
Okta provides identity and access management. LangGuard integrates with Okta for SSO authentication and user directory synchronization.
Overview
The Okta integration enables:
- Single Sign-On (SSO) via SAML or OIDC
- User directory sync for automatic user provisioning
- Group sync for role-based access control
- Audit logging of authentication events
Prerequisites
- Okta organization (trial or paid)
- Admin access to create applications
- LangGuard Enterprise plan (for SSO features)
Setup Options
Option 1: OIDC (Recommended)
OpenID Connect is the recommended approach for most deployments.
Create Okta Application
- Log in to Okta Admin Console
- Navigate to Applications > Applications
- Click Create App Integration
- Select OIDC - OpenID Connect
- Select Web Application
- Configure:
- App name: LangGuard
- Sign-in redirect URI:
https://your-langguard.com/auth/okta/callback - Sign-out redirect URI:
https://your-langguard.com
- Save and note the Client ID and Client Secret
Configure LangGuard
# Environment variables
OKTA_DOMAIN=your-org.okta.com
OKTA_CLIENT_ID=your-client-id
OKTA_CLIENT_SECRET=your-client-secret
OKTA_CALLBACK_URL=https://your-langguard.com/auth/okta/callback
Option 2: SAML
For enterprises requiring SAML:
- Create SAML 2.0 application in Okta
- Configure ACS URL and Entity ID
- Download SAML metadata
- Upload to LangGuard SSO settings
User Directory Sync
API Token Setup
- In Okta Admin, go to Security > API
- Click Tokens > Create Token
- Name it "LangGuard Sync"
- Copy the token
Configure in LangGuard
- Navigate to Settings > Integrations
- Add Okta integration
- Enter:
- Domain:
your-org.okta.com - API Token: Your token
- Domain:
Sync Behavior
| Okta Entity | LangGuard Mapping |
|---|---|
| Users | User accounts |
| Groups | Roles (Admin, Editor, Viewer) |
| User status | Account status |
Group Mapping
Map Okta groups to LangGuard roles:
| Okta Group | LangGuard Role |
|---|---|
LangGuard-Admins | Admin |
LangGuard-Editors | Editor |
LangGuard-Viewers | Viewer |
Security Considerations
Token Security
- Store API token securely (encrypted in LangGuard)
- Use tokens with minimal permissions
- Rotate tokens regularly (90 days)
- Monitor token usage in Okta logs
Network Security
- Configure IP allowlists in Okta if required
- Use HTTPS for all communications
- Enable MFA in Okta for admin accounts
Troubleshooting
SSO Redirect Issues
- Verify redirect URIs match exactly
- Check for protocol mismatches (http vs https)
- Ensure application is active in Okta
User Sync Failures
- Verify API token is valid
- Check token has required permissions
- Ensure users are assigned to the Okta app
Group Mapping Issues
- Verify group names match exactly
- Check users are members of groups
- Ensure group sync is enabled
Next Steps
- Troubleshooting - Get help with common issues