Communication architecture
- Connectors poll for tasks (pull model, not push)
- Tasks include: Sync, Grant, Revoke, CreateAccount, DeleteResource, RotateCredential
- Results upload via streaming (c1z files in 512KB chunks)
- Heartbeats keep tasks alive during long operations
BatonServiceClient
The client interface used by connectors:Task types
Sync tasks
Full or targeted data sync from the external system:Grant task
Provision access to a user:Revoke task
Remove access from a user:CreateAccount task
Provision a new user account (JIT):DeleteResource task
RotateCredential task
Task lifecycle
Polling loop
Heartbeat intervals
Task completion
Upload mechanism
Sync results (c1z files) upload via streaming:- Streaming (not buffered in memory)
- 512KB chunks
- Resumable on network errors
- Compressed c1z format
Authentication
Client credentials
Connectors authenticate using OAuth2 client credentials:- Token acquisition from ConductorOne’s OAuth endpoint
- Token refresh before expiration
- Token injection into request metadata
Host identification
Connectors identify themselves to ConductorOne:Error handling
Retryable vs non-retryable
Error flow
| Connector Error | SDK Handling | ConductorOne Action |
|---|---|---|
| Temporary failure | Retry with backoff | Task stays queued |
| Permanent failure | FinishTask(FAILED) | Task marked failed |
| Heartbeat timeout | Task abandoned | Reassign to other instance |
| Cancelled by ConductorOne | Stop processing | Task cancelled |
Annotations for error context
Return annotations to provide context:Debugging API communication
Enable debug logging
- Task received notifications
- Heartbeat timing
- Upload progress
- API response codes
Common issues
| Symptom | Likely Cause | Solution |
|---|---|---|
authentication error | Invalid client credentials | Verify client-id/secret |
task heartbeat failed | Processing too slow | Optimize or add heartbeats |
connection refused | Network/firewall issue | Check connectivity to ConductorOne |
task cancelled | Task timeout or user cancel | Check task duration |
upload failed | Large c1z or network issue | Check file size, retry |
Quick reference
Daemon mode checklist
Task processing flow
- Hello - Connector identifies itself
- GetTask - Poll for work (returns task or empty)
- Process - Execute sync/grant/revoke/etc
- Heartbeat - Keep task alive during processing
- FinishTask - Report success or failure
- Upload - Send c1z file (sync tasks only)
SDK handles
- OAuth2 token management
- Connection pooling
- Heartbeat scheduling
- Chunk-based uploads
- Retry with backoff
- Error classification