Skip to content

Admin Allowlist Contract Verification

Last verified: 2026-06-25.

Scope

EP7-T1 verifies that the admin allowlist contract is usable from web-admin against the launch backend:

  • backend local route: /v1/admin/access-allowlist
  • generated OpenAPI contract for list, create, and update
  • integration backend exposure
  • web-admin list, create, save-note, and revoke flows

No backend or web-admin code change was required during this verification.

Contract

Backend exposes:

Operation Method Path Purpose
List entries GET /v1/admin/access-allowlist?q=&status=&page=&size= Returns paged allowlist rows.
Create entry POST /v1/admin/access-allowlist Adds or reactivates an allowlist email.
Update entry PATCH /v1/admin/access-allowlist/{id} Updates note or revokes the row.

web-admin calls the same paths through src/lib/api.ts with a bearer token from the Cognito admin pool. The visible UI supports:

  • loading active entries on the Access Allowlist view
  • adding an email and note
  • saving an edited note
  • revoking the active entry

Local Verification

Backend local integration test:

mvn -q -Dtest=AccessAllowlistAdminIntegrationTest test

The test covers:

  • admin can create an allowlist row
  • admin can list the row by query and status
  • admin can patch the row to REVOKED
  • admin can recreate the same email after revocation
  • owner role receives 403
  • invalid email returns 400

Generated OpenAPI contains:

/v1/admin/access-allowlist
/v1/admin/access-allowlist/{id}

web-admin focused tests:

pnpm test -- src/__tests__/api.test.ts src/__tests__/App.test.tsx

Result:

Test Files  3 passed (3)
Tests       81 passed (81)

The API client tests assert exact backend URLs for list/create/update, and the App test covers search, pagination, create, note save, and revoke from the active allowlist table.

Integration Browser Verification

Tooling:

  • agent-browser
  • disposable Cognito admin user in mamnajem-integration-admin-userpool
  • disposable allowlist row using @mamnajem-e2e.invalid

Live checks against:

  • web-admin: https://admin-integration.mamnajem.pl/#access-allowlist
  • backend: https://integration.mamnajem.pl/v1/admin/access-allowlist

Observed network calls:

GET   /v1/admin/access-allowlist?page=0&size=20                         200
POST  /v1/admin/access-allowlist                                        201
GET   /v1/admin/access-allowlist?page=0&size=20                         200
PATCH /v1/admin/access-allowlist/{id}                                   200
GET   /v1/admin/access-allowlist?page=0&size=20                         200
PATCH /v1/admin/access-allowlist/{id}                                   200
GET   /v1/admin/access-allowlist?page=0&size=20                         200

Browser-visible result:

  • initial list loaded active integration rows
  • new test row appeared as ACTIVE
  • note changed from EP7-T1 browser create to EP7-T1 browser updated
  • revoke removed the row from the active list
  • final browser eval confirmed the test email was absent from page text

Cleanup:

  • disposable Cognito admin user deleted
  • disposable allowlist row revoked through web-admin
  • browser session closed

Notes

Integration /v3/api-docs returns 404, so OpenAPI exposure was verified from the generated local backend/openapi.json. Runtime route exposure on integration was verified by unauthenticated request returning 401 instead of 404, and by authenticated browser calls returning the expected success statuses.