---
id: TST-PFM-SEC-269
title: Front door unit checks
kind: unit
product_area: platform
module: security
revision: 1
status: draft
source_sha:
  services-platform: ad3f6a6582843008ed0f5a17b131878d15829af1
repository: services-platform
files:
  - modules/security/tests/unit/authorizer/front-door.spec.ts
implements: []
environment: mock
implementation_state: implemented
latest_result: not-run
latest_run_at: null
latest_run_ref: null
conformance: not-verified
estimated_minutes: 1
isolation: >-
  Use the file’s run-owned input objects and test doubles; restore changed environment values and
  installed dependencies after each case.
assertion_evidence:
  - provenance: test
    source: >-
      services-platform:modules/security/tests/unit/authorizer/front-door.spec.ts#reads the header,
      method ARN and request context of a REQUEST event
  - provenance: test
    source: >-
      services-platform:modules/security/tests/unit/authorizer/front-door.spec.ts#finds the
      Authorization header whatever its casing, and prefers the canonical one
  - provenance: test
    source: >-
      services-platform:modules/security/tests/unit/authorizer/front-door.spec.ts#never throws on a
      malformed event, and treats an empty header as absent
  - provenance: test
    source: >-
      services-platform:modules/security/tests/unit/authorizer/front-door.spec.ts#reads the token
      the way V1 did, dropping a |suffix
  - provenance: test
    source: >-
      services-platform:modules/security/tests/unit/authorizer/front-door.spec.ts#decodes header and
      payload without any key
  - provenance: test
    source: >-
      services-platform:modules/security/tests/unit/authorizer/front-door.spec.ts#returns undefined
      for anything that is not a compact JWS with an object payload
  - provenance: test
    source: >-
      services-platform:modules/security/tests/unit/authorizer/front-door.spec.ts#accepts a user
      pool issuer and refuses every look-alike
  - provenance: test
    source: >-
      services-platform:modules/security/tests/unit/authorizer/front-door.spec.ts#admits a Cognito
      bearer token, keeping the raw header
  - provenance: test
    source: >-
      services-platform:modules/security/tests/unit/authorizer/front-door.spec.ts#refuses what it
      cannot read, and a non-Cognito issuer with issuer_unregistered (there is no legacy branch)
  - provenance: test
    source: >-
      services-platform:modules/security/tests/unit/authorizer/front-door.spec.ts#reads the tenant
      the path names, and nothing from a claim or a header
evidence:
  - 'services-platform:modules/security/tests/unit/authorizer/front-door.spec.ts'
  - >-
    Static review at the recorded source revision; executable results remain not-run and conformance
    remains not-verified.
examiner: codex
examined_at: '2026-10-23'
final_text: OpenAI
dependency_review:
  provenance: test
  source: 'services-platform:modules/security/tests/unit/authorizer/front-door.spec.ts'
  explicit_no_doubles: false
  identified_double_boundaries: []
dependency_evidence: >-
  The file exercises its imported production code with controlled inputs. Source inspection
  identifies the test entry and assertions; it does not establish a live database, provider or
  deployed workflow.
binding_note: >-
  The file has no scenario binding established by this examination. Its executable checks remain
  registered without assigning them broader acceptance coverage.
---
# Front door unit checks

## Verification Boundary

The file evaluates production helpers with controlled inputs in-process. The assertion references identify the source checks for front door.

## What This Suite Proves

The file supplies executable engineering checks for the named subject. No complete acceptance scenario is inferred from the file’s existence.

## What It Does Not Prove

This examination does not run the suite. Passing behavior, deployed conformance and the behavior of substituted dependencies require separate execution evidence.

## Real Dependencies and Test Doubles

The file exercises its imported production code with controlled inputs. Source inspection identifies the test entry and assertions; it does not establish a live database, provider or deployed workflow.

## Must Not Be Doubled

Keep the production helper, schema, matcher or declaration under examination real. Substituting the decision itself would remove the behavior the assertions exercise.
