Design a system for managing access to office buildings, including guests, parking, and calendar integrations.
Asked at
AI answer
Architecture
Separate the system into a cloud control plane and a local access environment:
- API and web interface for employees, administrators, and security staff.
- Identity and policy service: users, roles, zones, schedules, and access rules.
- Visitor and parking service: invitations, reception check-in, passes, and parking spaces.
- Calendar adapters (for example, Microsoft 365 and Google Calendar), operating through OAuth and webhooks.
- Database for current state and an event queue for integrations, auditing, and notifications.
- Local door and gate controllers: receive signed permission updates, cache them to keep working if connectivity is lost, and forward access events when the connection is restored.
Core entities
Person, Building, Zone, Credential, AccessPolicy, Visit, ParkingReservation, CalendarConnection, AccessEvent. Access rights are defined by a combination of subject, zone, time interval, and conditions; for a guest, they are limited to a specific visit.
Core workflows
- An employee creates an invitation with a date, time, building, zones, and parking if needed.
- The system checks limits and availability, creates a visit, and sends the guest a link or QR code with a short expiration period.
- At the entrance, reception confirms the visit and issues a temporary pass; the controller checks the authorization locally or through a secure service.
- When the visit ends, the pass is revoked, the parking space is released, and events are recorded in the audit log.
Calendar integration
A calendar event may offer to create a visit, but must not by itself grant physical access. Use minimal OAuth permissions, verify webhook signatures, and process duplicate and out-of-order notifications idempotently. Changes to or cancellation of an event update the visit according to predefined rules; store the source event ID and a change log.
Security and operations
Use SSO/MFA, RBAC, encryption for data and secrets, short-lived and revocable credentials, protection against QR code reuse, and a complete audit trail of administrative operations. Limit the retention of personal data and define a deletion period for guest data. During a network outage, controllers use a time-limited local cache; define the fail-open/fail-closed policy separately for each zone, while ensuring emergency exits always meet fire safety requirements. Monitor synchronization latency, controller status, calendar integration errors, and the queue of unsynchronized events.
Also asked at Andersen
- Which company did you work for and what projects did you handle?
- How do you work with Linux at the system administration level?
- What databases do you have experience working with?
- How is a container built and run from a Dockerfile?
- How did you deploy the Kubernetes cluster and how did you manage it? What tools did you use for rollout?
Similar questions
- Design a system for managing access to a sports complex, with memberships and offline access control.
- Design an access control system for buildings serving 1 million employees and 50,000 doors, with offline operation and instant badge revocation.
- Design a distributed system for managing access to parking facilities with subscriptions, one-time visits, and offline terminals.
- Design a system for booking meeting rooms and workspaces across 5,000 offices, with rules, conflict handling, and calendar integrations.
- Design a system for managing access to a warehouse, with zones, roles, and an audit of every operation.