CXH-1251: document BambooHR roles/access-levels API limitation #35
All Vouch review confidence checks passed
Residual risk 0.21 = Change Risk (0.52) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.52 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.388
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #35"
general
weight: 0.35
c1-squire-dev[bot]
CXH-1251: BambooHR roles as entitlements — investigated; API cannot express them, documented instead of forcing a partial sync
Linear: CXH-1251 — BambooHR: Sync roles as an entitlement capability
What was asked
A customer asked for BambooHR roles to be synced as an entitlement capability, in addition to the accounts the connector already syncs. The ticket's own action was to investigate first whether BambooHR's API exposes roles in a way C1 can consume as entitlements, and update the ticket with the finding either way. This PR is that finding: the investigation is complete, the answer is no (details below), and per the agreed acceptance criteria the PR documents exactly what the API cannot express instead of forcing a partial sync.
What changed
A docs-only diff — three files, prose and a comment only, no Go behavior change (verified:
git diff main...shows exactly these files;baton_capabilities.json,config_schema.json,specs/openapi.jsonand the config regeneration are untouched and regenerate identically):1.
docs/connector.mdx— one paragraph of prose below the existing Capabilities table (the table itself is byte-identical) stating that BambooHR's public API exposes no roles/access-levels surface for C1 to sync, with vendor-doc citations and the pending-live-confirmation caveat pointing at the README section below.2.
README.md— a### Not synced: roles / access levelssubsection under# Data Model, the canonical in-repo copy: the three negative findings with citations, the 2026-10-23 checked date, and the two re-verification triggers a future engineer should watch (the per-tenant Datasets catalogGET /api/v1_2/datasets; any future endpoint adopting theaccess_levelOAuth scope).3.
pkg/connector/connector.go— a four-line factual doc comment aboveResourceSyncers, the exact site the next contributor would edit to add a roles builder, pointing at the README section.The finding (why roles cannot be synced)
GET /api/v1/meta/users, returns id, employeeId, name, email, status (enabled/disabled) andlastLogin— no access-level or role attribute.POST /api/gateway.php/{domain}/v1/reports/custom, documented as deprecated in favor of Datasets). Its requestable field catalog (the documented field-names list) contains noaccessLevel/role/permission field of any kind — so no per-employee access level can even be requested to turn into entitlements.access_levelscope exists but no documented endpoint uses it. The OpenAPIsecuritySchemesdeclareaccess_level("View and manage User Access Levels"), but no documented endpoint requires or consumes the scope. A scope without an endpoint is not an API surface a connector can call.GET /api/v1_2/datasetsreturns "the catalog of datasets available ... the current account has access to" — account-specific, not part of the documented cross-customer contract; even a live hit on C1's own test tenant would not generalize.How far this is verified
credentials.json:incomplete_configuration); the only tenant hint in the vault (c1feb26, from the sibling LOGIN item's URL) returns 404 for every documented API path shape on both hosts, and a deliberately-invalid key returns the identical 404 — the gateway rejects the tenant path before auth, so live validation could not complete. Remediation for a human: add aCompany Domainfield carrying the API key's actual tenant subdomain to the vault item; the discovery/mapping machinery itself worked. This caveat is stated in the repo docs as "pending", not papered over.SMOKE PASS (partial)—cmd/baton-bamboohrbuilds and starts; this repo declares no mock, so no sync was exercised — the change is unproven against a live or mocked upstream by the smoke gate. Connector-eval (advisory) adds the execution evidence: the head was recorded against a mock of the vendor API built from its official docs — verdict clean, 0 resources/entitlements/grants lost or gained vsmain(c90364b), 0 id changes — i.e. the docs/comment diff provably does not alter sync output.What to look at hardest
docs/connector.mdxaddition is the only CI-verified docs surface in the diff: the repo's connector-docs workflow runs an MDX linter (syntax + allowed component set, fetched from ConductorOne/github-workflows on 2026-10-23) — the addition is plain prose below the byte-identical Capabilities table, but that workflow is this diff's real gate.access_levelscope adoption) read as complete and accurate.Full evidence blocks (quoted verbatim from the batch's research)
F1 — No public endpoint lists roles or access levels
The complete official API reference index enumerates these API groups: Account Information, Alerts, Applicant Tracking, Benefits, Change Tracking, Company Files, Company Profile, Compensation, Compensation Benchmarking, Compensation Planning, Custom Fields, Custom Reports, Datasets, Employee Files, Employee Tables, EmployeeVerification, Employees, Goals, Holidays, Hours, Locations, Login, Time Tracking, Onboarding, Pay Grades & Bands, Photos, Reports, Scheduling, Time Off, Total Rewards, Training, Webhooks, Calendar Events, Public API, Custom Tables, Recognition Settings. There is no "Roles", "Access Levels" or "User Permissions" group, and no endpoint anywhere in the index returns a user→role/access-level membership edge.
The only user-account endpoint is
GET /api/v1/meta/users(List Users) — user id,employeeId, first/last name, email, account status (enabled/disabled) andlastLogin. No access-level or role attribute. Support admin accounts are always excluded.F2 — The employee field catalog has no access-level/role field
The custom-report API (the connector's current sync mechanism,
POST /api/gateway.php/{domain}/v1/reports/custom— documented as "Request Custom Report", marked Deprecated, use Datasets > Get Data from Dataset) can only return fields from the documented field-names catalog: noaccessLevel, norole, no user-permission field of any kind exists. All six "access" hits in the table are prose about "accessing" other tables.F3 — An OAuth scope for access levels exists, but no endpoint uses it
The OpenAPI
securitySchemesdeclare the OAuth scopeaccess_level: "View and manage User Access Levels" (plusaccess_level.write). No documented endpoint requires or uses that scope. The scope names a capability of the BambooHR product (admin UI), not a public API surface. A scope without an endpoint is not consumable by a connector.F4 — Datasets are account-specific and undocumented per tenant
GET /api/v1_2/datasets(List Datasets v1.2) returns "the catalog of datasets available ... the current account has access to". Whether any account exposes a users/access dataset is per-tenant, discoverable only by a live authenticated call, and is not part of the documented API contract a connector can rely on across customers.F5 — Live confirmation is currently blocked at the credential boundary
The reviewed credential profile
bamboohrresolved the API key from the vault item "BambooHR" (API_CREDENTIAL) via itscredentialfield, but that item carries no Company Domain field, soBATON_COMPANY_DOMAINresolves nothing (credentials.json:incomplete_configuration). Using documented precedence (env > file > vault), the non-secret domain was supplied from the sibling LOGIN item's URL (c1feb26.bamboohr.com): discovery then succeeded but the independent preflight failed (preflight_http_error). Live probes (status codes only; secret values never printed or persisted) showed every documented API path shape on both hosts —https://api.bamboohr.com/api/gateway.php/{d}/v1/...,https://{d}.bamboohr.com/api/gateway.php/{d}/v1/...,https://{d}.bamboohr.com/api/v1/...— returns 404 for tenantc1feb26, and a deliberately-invalid key returns the identical 404, i.e. the gateway rejects the tenant path before auth. The one tenant hint in the vault is therefore not an API tenant.What a human can do to complete the live half: add a
Company Domainfield (carrying the API key's actual tenant subdomain) to the "BambooHR" vault item, or supply the correct tenant out-of-band. The 1P discovery/mapping machinery itself worked.Pagination notes
For the surface that exists:
meta/usersis unpaginated (single object keyed by user id); the legacyreports/customcall the connector uses is unpaginated (newUnPaginatedURLin pkg/connector/client/request.go); the Datasets API (v2) is cursor-paginated but exposes only per-account reporting datasets (F4). There is no paginated roles collection because there is no roles collection.