Skip to main content
HS
HiSETSuccess
LeetCode Prep

AI & FDE Interview Room

Role paths, mocks, cost studio, chapters, cases, and staff-level depth.

Case study · FDE · 35 min

Secure Data Connector with ACL Propagation

Build a connector that syncs enterprise documents and faithfully propagates source ACLs into the retrieval layer.

FDEACLconnectors

Interview opener

Promised APIs vanish; nested AD ACLs with no API.

  1. 1.What do you tell the steering committee Thursday?
  2. 2.Smallest trustworthy cohort you can still ship?
  3. 3.How do you avoid becoming the permanent integration team?

Strong signals

Hit 0/3

Weak signals (avoid)

  • Hide the blocker
  • Promise full ACL anyway

Requirements

  • Sources: SharePoint Online + Box; delta sync; delete propagation
  • ACL: users + nested groups; external sharing flags; break-glass deny
  • Lag: p95 change-to-searchable < 20 min
  • Compliance: customer-managed keys; audit every ACL decision

Back-of-envelope Estimation

MetricCalculationResult
Corpus3M files3M
Daily churn2%60K files/day
ACL principals/file avg824M rows
Sync workers60K / (8h×3600) × 2s each~4.2 CPU
IdP group members15K groups × 50750K edges

API Design

EndpointMethodDescription
POST /v1/connectorsPOSTRegister OAuth app + site list
POST /v1/connectors/{id}/syncPOSTForce delta sync
GET /v1/acl/checkGET{ user, docId } → allow/deny + reason

Data Model

EntityKey fieldsNotes
connector_statecursor, last_success, errorPer source
documentsdoc_id, source_id, etag, deletedTombstones retained 30d
acl_entriesdoc_id, principal, permReplace-on-write per doc
group_expandgroup_id, member_idRefreshed from IdP

High-level Design

Connector architecture
Source APIs → Auth vault → Delta crawler → Parse/chunk
                              └─► ACL extractor → acl_entries
IdP SCIM/webhooks → group_expand cache
Retriever → expand user groups → filter docs by acl_entries
Deletes → tombstone → remove vectors within 5 min

Deep Dive: Nested Groups

  • Expand groups offline into member sets; cap recursion depth
  • On IdP change, recompute affected users' ACL fingerprints
  • Deny by default if ACL sync stale beyond SLO
  • Red-team: user removed from group must lose access within 15 min

Bottlenecks at Scale

  • API throttling — adaptive backoff + priority for ACL-only updates
  • ACL write amplification — batch replaces; partition by doc_id
  • Group storms — debounce IdP webhooks 30s

Failure Modes & Monitoring

SLOTargetAlert
Sync lag p95< 20 minPage if > 1h
ACL red-team100% passBlock release
Orphan vectors0Nightly reconcile
Auth token refresh99.99%Page on fail

Attempt the case aloud first. Then unlock a staff model answer outline.