Configuration
Environment variables, SDK options, policy setup, and identity provider configuration for SURADAR.
This reference covers the configuration options available for SURADAR SDKs, environment variables, policies, and identity provider integrations.
Environment Variables
Set these in your agent’s runtime environment:
| Variable | Required | Description |
|---|---|---|
SURADAR_ENDPOINT | No | API base URL. Defaults to https://api.suradar.dev. Override for self-hosted or staging environments. |
SURADAR_API_KEY | Yes | Your organization’s API key from the dashboard. |
SURADAR_ORG_ID | Yes | Your organization identifier. |
export SURADAR_ENDPOINT="https://api.suradar.dev"
export SURADAR_API_KEY="sk_live_abc123..."
export SURADAR_ORG_ID="org_xyz789..."
SDK Options
The SDK accepts the following options at initialization:
import { SuradarClient } from "@suradar/sdk";
const suradar = new SuradarClient({
apiKey: process.env.SURADAR_API_KEY,
orgId: process.env.SURADAR_ORG_ID,
endpoint: process.env.SURADAR_ENDPOINT, // optional
timeout: 5000, // request timeout in ms (default: 10000)
retries: 3, // automatic retry count (default: 2)
logLevel: "warn", // "debug" | "info" | "warn" | "error"
});
Policy Configuration
Policies define what your agents can and cannot do. Configure them via the admin dashboard or the API.
Dashboard
- Navigate to Settings > Policies in the SURADAR dashboard
- Click Create Policy
- Define the policy scope: specific agents, agent groups, or organization-wide
- Set rules: allowed actions, rate limits, time-of-day restrictions, escalation thresholds
- Save and activate — policies take effect immediately
API
curl -X POST https://api.suradar.dev/v1/policies \
-H "Authorization: Bearer $SURADAR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "production-rate-limit",
"scope": "org",
"rules": [
{
"type": "rate_limit",
"max_requests_per_minute": 1000
},
{
"type": "action_allowlist",
"actions": ["read", "write", "execute"]
}
]
}'
Identity Provider Setup
SURADAR federates agent identity with your existing IdP. Supported providers:
Okta
- In Okta, create a new OIDC application (machine-to-machine)
- In the SURADAR dashboard, go to Settings > Identity Providers > Add Provider
- Select Okta and enter your Okta domain, client ID, and client secret
- Map Okta groups to SURADAR agent roles
Microsoft Entra ID
- Register an application in the Azure portal under App registrations
- Add SURADAR’s redirect URI from the dashboard
- In SURADAR, select Entra ID and provide the tenant ID, client ID, and client secret
Auth0
- Create a machine-to-machine application in Auth0
- Authorize the application for the SURADAR API
- In SURADAR, select Auth0 and enter your domain, client ID, and client secret
SPIFFE
SURADAR natively supports SPIFFE IDs for workload identity. Configure your SPIRE server to issue SVIDs for your agents, then register the trust domain in the SURADAR dashboard under Settings > Identity Providers > SPIFFE.
Next Steps
- Review the full API Reference
- Set up Integrations for SIEM, CI/CD, and infrastructure