- List resources (users, groups, roles, apps, projects, and so on)
- Define entitlements (the permissions you can grant on those resources)
- Emit grants (the facts of who currently holds which entitlements)
Where connectors fit
Most people work with connectors in one of three ways:- Deploy an existing connector. You configure it and don’t write code.
- Build a connector without writing Go. Use C1AI custom connectors or a configuration-driven connector.
- Build or extend a connector in Go. You write code against
baton-sdk, which is what the rest of this section covers.
Sync and provision
Connectors do two things: Sync (read) pulls access data from your systems into C1:- Who exists? What groups? What roles?
- What permissions are available?
- Who has what access right now?
- Grant: Give someone access they’ve been approved for.
- Revoke: Remove access that has been terminated.
- Create account: Provision a new account, for example just in time.
- Delete resource: Remove accounts entirely.
The special role of identity providers
Identity providers (IdPs) such as Okta, Azure AD, and Google Workspace are often the source of truth for who your users are. Most connectors sync users from the target system. IdP connectors do more:- They define the canonical user identities.
- Other systems’ users are correlated back to IdP users.
- User lifecycle events (join, move, leave) often originate in the IdP.
Understand the tools
The C1 ecosystem has several SDKs and CLIs with different purposes.For connector developers
baton-sdk is the Go library you import when you build a connector. It provides:
- The syncer interfaces you implement
- Pagination helpers for API calls
- Resource, entitlement, and grant builders
- HTTP client utilities
.c1z files. After your connector runs, use it to verify the output:
-o json for machine-readable output. Install baton with Homebrew:
For C1 users (not connector development)
cone is the C1 CLI for end users and administrators. It handles access management workflows:
cone commands.
Which tool do I need?
cone and baton are separate tools for separate purposes. You don’t use cone to build connectors, and you don’t use baton to manage access requests.The connector binary
When you build a connector, you produce a standalone binary, such asbaton-okta or baton-github. This binary:
- Embeds the SDK. It’s compiled with
baton-sdkand doesn’t depend on it at runtime. - Is self-contained. It has no runtime dependencies except the target system’s API.
- Runs independently. You don’t need any other C1 tools installed.
- Produces a sync file. The output is a
.c1zfile.
The minimum contract
A connector has two parts. The connector itself implementsConnectorBuilderV2, which declares its metadata, validates its credentials, and lists its resource builders:
Metadata(ctx): the connector’s display name and descriptionValidate(ctx): confirms the configured credentials workResourceSyncers(ctx): returns one resource builder per resource type
ResourceSyncerV2:
ResourceType(ctx): defines the type and traits of a resource (for example, “user” with the traitTRAIT_USER)List(ctx, parentResourceID, opts): lists instances of that resource type, one page at a timeEntitlements(ctx, resource, opts): lists the entitlements a resource offersGrants(ctx, resource, opts): lists who holds those entitlements
When to build and when to reuse
- Use an existing connector when one exists and meets your needs. The cost is configuration and deployment.
- Use a C1AI custom connector when the application has an HTTP API with published documentation and you only need to sync access data. C1 builds, tests, and hosts the connector, and you write no code. Custom connectors are in early access and don’t support provisioning or custom actions.
- Use a configuration-driven connector when you want to write configuration instead of Go: baton-http for REST APIs, baton-sql for SQL databases, or baton-scim for SCIM-enabled applications.
- Build a connector with the SDK when the other options can’t do what you need, such as custom business logic, a protocol they don’t speak, or an authentication method they don’t support.
What a working connector looks like
baton-demo is an example connector with sample data that demonstrates a fully runnable sync. It needs no API credentials, so you can try it now.
baton-demo writes its sync output to sync.c1z in the current directory, and baton reads that file by default. You can also run both from Docker:
baton resources prints one row for each resource, with the columns ID, Display Name, Resource Type, and Parent Resource. baton grants prints one row for each grant, with the columns ID, Resource Type, Resource, Entitlement, and Principal. Use baton stats to see how many resources a sync produced for each resource type.
What “working” doesn’t guarantee
- Running locally doesn’t mean it’s safe in production. You still need to handle pagination, retries, and rate limits, and verify that you do.
- Syncing doesn’t imply provisioning. Many connectors are read-only or partially provisionable. Check each connector.
- Documentation tables aren’t the contract. Capability tables on the docs site are a directory for people. Use the connector’s own capability manifest and the SDK interfaces as ground truth.
Prerequisites for building
To build a connector in Go, you need:
Go version requirements change with SDK releases. Check the
go directive in baton-sdk’s go.mod for the minimum version.
You also need:
- Access to the system you want to connect to
- API credentials with read permissions
- An IDE with Go support, such as VS Code or GoLand