Overview
The Baton-HTTP connector is a generic connector for applications that expose HTTP/REST APIs. If you have back-office, home-grown, or on-prem applications that have an HTTP API but don’t have a dedicated Baton connector, use the Baton-HTTP connector to bring those apps’ access data into ConductorOne. This connector allows you to:- Sync users, groups, roles, and custom resource types from any HTTP API
- Define custom mappings using YAML configuration
- Configure authentication methods including OAuth2, API keys, and basic auth
- Enable provisioning actions for granting and revoking access
Configuration overview
The Baton-HTTP connector is configured using a YAML file that defines:- Application metadata
- HTTP API connection details and authentication
- Resource types to sync (users, groups, roles, etc.)
- Entitlements that can be granted to resources
- Grants that define which principals have which entitlements
- Provisioning rules for granting/revoking access
Configuration options
The connector accepts the following command-line flags and environment variables:| Flag | Environment variable | Description |
|---|---|---|
--config-path | BATON_CONFIG_PATH | Path to the YAML configuration file |
--token | BATON_TOKEN | OAuth2 token for authentication |
--api-key | BATON_API_KEY | API key for authentication |
--username | BATON_USERNAME | Username for basic authentication |
--password | BATON_PASSWORD | Password for basic authentication |
--client-id | BATON_CLIENT_ID | OAuth2 client ID for client credentials flow |
--client-secret | BATON_CLIENT_SECRET | OAuth2 client secret for client credentials flow |
-p, --provisioning | BATON_PROVISIONING | Enable provisioning actions |
-f, --file | BATON_FILE | Path to the output c1z file (default “sync.c1z”) |
Configuring the YAML file
The basic structure of a Baton-HTTP connector configuration file includes:API connection configuration
Theconnect section defines how to connect to your HTTP API:
Authentication methods
The HTTP connector supports several authentication methods.Bearer token authentication
Use this method when the API requires a bearer token:API key authentication
Use this method when the API requires an API key in a header:Basic authentication
Use this method when the API requires username/password authentication:OAuth2 client credentials
Use this method for APIs requiring OAuth2 client credentials flow:Resource type configuration
Resource types define the entities you want to sync to ConductorOne. Common resource types include users, groups, and roles. Basic structure:Listing resources
Thelist section defines how to query resources from your API:
Mapping resources
Themap section defines how to transform API response data into ConductorOne resources:
Pagination
Thepagination section defines how to handle large result sets:
Entitlements
Entitlements define permissions that can be granted to resources.Static entitlements
Static entitlements are predefined and don’t require an API call:Dynamic entitlements
Dynamic entitlements are fetched from the API:Grants
Grants define which principals (users/groups) have which entitlements:skip_if field uses an expression to determine whether to skip a grant mapping.
Provisioning
Provisioning defines how to implement entitlement changes:Running the connector
To run the connector locally:Using command line arguments
Provide credentials via flags for one-time syncs:Using environment variables
Using Docker
Deploying to ConductorOne
To integrate the connector with ConductorOne, follow the self-hosted connector deployment pattern:Step 1: Set up a new HTTP connector
1
In ConductorOne, navigate to Connectors > Add connector.
2
Search for Baton and click Add.
3
Choose how to set up the new connector:
- Add the connector to a currently unmanaged app
- Add the connector to a managed app
- Create a new managed app
4
Set the owner for this connector.
5
Click Next.
6
In the Settings area of the page, click Edit.
7
Click Rotate to generate a new Client ID and Secret.Carefully copy and save these credentials.
Step 2: Create Kubernetes configuration files
Secrets configuration
ConfigMap for the YAML configuration
Deployment configuration
Step 3: Deploy the connector
1
Apply the configuration files to your Kubernetes cluster.
2
Check that the connector data uploaded correctly in ConductorOne under Applications > Managed apps.
Example configurations
Example: Custom internal application
Example: SaaS application with OAuth2
Troubleshooting
Authentication errors
If you receive 401 or 403 errors:- Verify your API credentials are correct
- Check that your token hasn’t expired
- Ensure the API user has sufficient permissions
- For OAuth2, verify the token URL and scopes are correct
Pagination issues
If the connector isn’t syncing all resources:- Check the pagination configuration matches your API’s behavior
- Verify the
items_pathcorrectly points to the array of items - For cursor pagination, ensure the cursor path is correct
Mapping errors
If resources aren’t mapping correctly:- Validate your JSONPath expressions against sample API responses
- Check for null values that might cause mapping failures
- Use the
--log-level debugflag to see detailed mapping information