CSV Connector
The CSV connector reads directory data from files and normalizes it into Roster users, groups, and memberships.
Storage Modes
Section titled “Storage Modes”| Mode | Use case |
|---|---|
local |
Files mounted into the Roster data volume. |
s3 |
Files read through an object-storage reader. |
sftp |
Files read through an SFTP storage reader. |
Required Files
Section titled “Required Files”users.csv
external_id,user_name,primary_email,display_nameuser-001,user001,user001@example.com,User 001groups.csv
external_id,display_name,mailgroup-001,Engineering,engineering@example.comuser-groups.csv
user_external_id,group_external_iduser-001,group-001The connector uses external_id as the stable provider key. The membership
file links user external IDs to group external IDs.
To express subgroups, use the following typed membership format in the same configured membership file. Existing files require no conversion.
group_external_id,member_type,member_external_idgroup-001,user,user-001group-001,group,group-002group-002,user,user-002The parent always references groups.csv; member_type is user or group
and selects the corresponding profile file for member_external_id. This makes
identical ID strings in the user and group files unambiguous. References must
exist, typed headers must be complete, and legacy user_external_id values must
not be mixed into typed rows. Duplicate edges are collapsed while distinct
parents of a shared group are retained. Resolve follows nested groups up to
10 subgroup levels by default, with the attached root at level 0;
ROSTER_DIRECTORY_GROUP_MAX_DEPTH configures the server limit.
Mounted Volume Path
Section titled “Mounted Volume Path”For mounted-volume storage mode (local), mount files under the Roster data
volume:
${ROSTER_DATA_DIR}/connectors/csvIn Docker, mount that directory through the /data volume used by Roster.
local storage is for standalone deployments. ROSTER_DEPLOYMENT_MODE=ha
rejects enabled local-file CSV connectors because replica-local files can
diverge; use S3 or SFTP for high-availability
deployments.
SFTP Host Key Verification
Section titled “SFTP Host Key Verification”SFTP connectors can pin the server host key’s SHA-256 fingerprint in the
SHA256:<base64> format printed by OpenSSH. Obtain the fingerprint from the
SFTP administrator or another authenticated, out-of-band channel. Do not trust
a fingerprint collected for the first time over the same network path that
Roster will use.
Set the optional value in SFTP host key SHA-256 fingerprint in the connector
form, or use sftp_host_key_sha256 through REST or MCP. Roster rejects malformed
fingerprint values when saving and, when a pin is configured, rejects a changed
host key before authenticating or reading CSV data. For a planned server key
rotation, verify the new fingerprint through the same trusted channel before
updating the connector.
Existing connectors without a fingerprint continue to synchronize for upgrade compatibility. Leaving the value blank does not authenticate the remote server, so those connections remain vulnerable to server impersonation by an attacker who can intercept or redirect SFTP traffic.
Field Mappings
Section titled “Field Mappings”Connector field mappings are stored on the provider connection config as
field_mappings, with users and groups objects. The keys are normalized
Roster fields and the values are source CSV column names.
{ "field_mappings": { "users": { "external_id": "employee_id", "user_name": "login", "primary_email": "email", "display_name": "name" }, "groups": { "external_id": "team_id", "display_name": "team_name", "mail": "team_email" } }}Production Notes
Section titled “Production Notes”- Use durable storage for CSV files.
- Keep source files under operational change control.
- Refresh on a predictable schedule.
- Validate source column names before changing field mappings.