Skip to content

UC-007: Emergency Access (Landlord / Fire Department)

Actor: Landlord, Fire Department, or other authorized emergency contact Priority: Must Status: Implemented (protocol + firmware allow-list evaluation)

Summary

An emergency keyholder (landlord, fire department) can enter the space at any time, with immediate notification sent to the hackerspace board.

Preconditions

  • Emergency keyholder is registered with access type EMERGENCY
  • Allow-list header has the HAS_EMERGENCY flag set
  • Board members have push notifications enabled

Main Flow

  1. Landlord scans emergency NFC card at the terminal
  2. ESP32 finds entry: EMERGENCY
  3. Access granted immediately (no time or schedule restrictions)
  4. Door unlocks, green LED + distinct buzzer pattern (different from normal access)
  5. ESP32 immediately connects to the network (breaks normal sync schedule)
  6. Emergency access event sent to backend: {"event": "emergency_access", "uid": "...", "timestamp": ...}
  7. Backend pushes alert notification to all board members
  8. Network disconnects, BLE resumes (WiFi only)

Alternative Flows

A1: Network unavailable for notification

  1. At step 5, network connection fails
  2. Access was already granted at step 3 (offline-first: never block emergency access)
  3. Emergency event queued in notification queue
  4. Event sent during next successful sync

A2: Stale allow-list

  1. Allow-list has expired (valid_until passed)
  2. EMERGENCY entries are still honored even with stale data
  3. Access granted, notification queued

Error Flows

E1: Emergency card not in list

  1. Card UID is not found in the allow-list
  2. Access denied — even emergency access requires a registered card
  3. Red LED + denial buzzer

Postconditions

  • Door unlocks immediately
  • Board is notified as soon as possible (immediately if network available, next sync otherwise)
  • Full audit trail of emergency access

Access Rule

  • Access type: EMERGENCY
  • Time slots: None (24/7)
  • Notifications: NOTIFY_ON_USE (always, by definition)
  • Grace period: N/A

Notes

  • Emergency access is never blocked by time restrictions, expired allow-lists, or stale data. Safety takes priority over security policy.
  • The distinct buzzer pattern (compared to normal access) alerts anyone inside that an emergency key was used.
  • Board notification is best-effort but not a gate — the door opens regardless.
  • Number of emergency keys should be kept to a minimum and reviewed regularly.