From f13dac58a483a5152910a27bef92a453ef04e6a6 Mon Sep 17 00:00:00 2001 From: ngqile Date: Tue, 1 Dec 2026 12:37:51 +0800 Subject: [PATCH] docs(openspec): gateway bypass risks; tick 4.2 Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01EFUzfj5akPxyikzGc2iAHM --- openspec/changes/add-qr-self-registration/design.md | 2 +- openspec/changes/add-qr-self-registration/tasks.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/openspec/changes/add-qr-self-registration/design.md b/openspec/changes/add-qr-self-registration/design.md index 750b4a2..e2f8da8 100644 --- a/openspec/changes/add-qr-self-registration/design.md +++ b/openspec/changes/add-qr-self-registration/design.md @@ -108,4 +108,4 @@ mobile-api forwards the caller's JWT to the gateway, and a visitor has none, so - Shared venue NAT: 60 submissions per event per 10 minutes from one IP may still be hit at a very busy booth. The message tells the visitor to try later. Raise the limit if it happens. - The visitor IP is the last `X-Forwarded-For` hop, which is right whether Traefik appends to or replaces the header. Behind a second proxy in front of Traefik it would be that proxy's address; the deployment notes say so. - The default notice is a template; INS and CV must review it. -- The gateway bypass (decision 6) lets any holder of a gateway api-key read those records and register a lead without a user token. The gateway is not exposed outside the cluster, and the paths are exact, so the exposure is limited to callers that already hold a server api-key. +- The gateway bypass (decision 6) lets any holder of a gateway api-key read those records and register a lead without a user token. The gateway is not exposed outside the cluster, and the paths are exact, so the exposure is limited to callers that already hold a server api-key. Such a caller could post registrations straight to services-counter, skipping mobile-api's code, consent and rate-limit checks: choose the company, event and salesperson, and learn from the outcome whether a mobile or email is already a lead. It could also read whole event records and test user ids against `activeAdminOf`. Narrower projections or a service-to-service credential would close this if the gateway is ever exposed. diff --git a/openspec/changes/add-qr-self-registration/tasks.md b/openspec/changes/add-qr-self-registration/tasks.md index d124e41..eb09674 100644 --- a/openspec/changes/add-qr-self-registration/tasks.md +++ b/openspec/changes/add-qr-self-registration/tasks.md @@ -61,7 +61,7 @@ Waves: - Scope: `solvway-mobile-api/src/**` - Verify: `mvn -T 1C -q -pl solvway-mobile-api verify` -- [ ] 4.2 Gateway access for the public flow (decision 6), found by the live check. +- [x] 4.2 Gateway access for the public flow (decision 6), found by the live check. - Depends on: 4.1 - Tests first: - gateway: each decision-6 path passes without a user token for its method; POST `/company/1/privacyNotice`, GET `/user/findById/1`, POST `/counter/registrationLink/ensure` and a path with an extra segment still get 401;