All problems

Gateway Device Lookup Rejects Differently Cased Tenant Headers

Level 2 · node · API · Case-sensitive HTTP header lookup breaks tenant routing

Scenario

A fictional equipment gateway reads the X-Tenant-Id request header to select the tenant whose device status should be returned. HTTP header names are case-insensitive, but the current service only reads one exact spelling. Valid requests are rejected when an intermediary sends the header name in lowercase. Inspect the repository, service, and controller flow.

Requirements

Recognize the tenant identifier header regardless of its name's letter case. Preserve rejection of missing headers, tenant isolation, unknown-device responses, and registration input validation.

Acceptance criteria

  • A lowercase header name resolves the device.
  • A mixed-case header name resolves the device.
  • Requests without the required header are rejected.
  • Device records remain isolated between tenants.
  • Invalid tenant or device registrations are rejected.