guides
Intended Documentation
Connector SDK
Build custom connectors with the Intended Connector SDK to extend authorization enforcement to downstream systems, data stores, and third-party services.
Connector SDK#
The Connector SDK is production-ready and enforces fail-closed decision-token validation before adapter execution.
The Intended Connector SDK lets you build custom connectors that extend Intended authorization enforcement to downstream systems -- databases, object stores, SaaS APIs, message queues, or any service that should respect Intended decision tokens before executing operations.
A connector acts as an enforcement bridge: it receives a verified decision from the Intended runtime, translates it into the access-control primitives of the target system, and reports the enforcement outcome back to Intended for audit.
Architecture Overview#
Installation#
Info
Use pinned versions in production environments to keep connector behavior deterministic across releases.
Connector Interface Contract#
Every connector must implement the IntendedConnector interface. This contract defines the methods the Intended runtime calls during the connector lifecycle.
Lifecycle Hooks#
The Intended runtime manages connectors through a defined lifecycle. Each hook is called at a specific phase.
initialize
Called once when the connector is first loaded. Use this to set up connections, validate configuration, and allocate resources. If initialization fails, the connector is marked unhealthy and not used for enforcement.
enforce
Called on every enforcement request routed to this connector. Receives the verified decision context and must return an EnforcementResult indicating whether enforcement succeeded.
healthCheck
Called periodically by the runtime (default: every 30 seconds). Return a HealthStatus indicating whether the connector and its downstream system are operational.
shutdown
Called when the connector is being deregistered or the runtime is shutting down. Clean up connections, flush buffers, and release resources.
Registration#
Info
Connector registration is stable and backed by versioned capability manifests.
Register your connector with the Intended runtime by submitting a connector manifest:
Registration Request#
Registration Response#
Error Handling#
Connectors must handle errors gracefully and report them through the EnforcementResult:
| Error Scenario | enforced | action | Runtime Behavior |
|---|---|---|---|
| Decision allowed, downstream applied | true | allowed | Audit logged as success |
| Decision denied, downstream blocked | true | denied | Audit logged as denied |
| Downstream unreachable | false | error | Retry if retryable: true; escalate otherwise |
| Connector bug or crash | false | error | Runtime marks connector unhealthy after threshold |
Info
Retry behavior and circuit-breaker thresholds are versioned and deterministic: 3 retries with exponential backoff, circuit opens after 5 consecutive failures.
Testing Your Connector#
Use the SDK test harness to validate your connector locally before registration:
Troubleshooting#
| Problem | Cause | Remediation |
|---|---|---|
Connector stuck in pending health | initialize failed silently | Check logs for initialization errors; verify credentials |
enforce returns error consistently | Downstream system unreachable | Verify network connectivity; check health endpoint |
| Runtime does not route to connector | Intent mismatch | Ensure registered intents match the intents from evaluation |
| Connector deregistered unexpectedly | Health check failures exceeded threshold | Review healthCheck implementation; increase timeout if needed |
Next Steps#
- Enforcement SDK -- understand the enforcement layer that feeds decisions to connectors
- API Quickstart -- review how evaluation and decision tokens work
- Error Patterns -- handle errors across the integration stack