Files
co-lite/openspec/changes/stop-gateway-body-logging/tasks.md
T

1.5 KiB

Tasks

Design: design.md. One serial task: the filter and its redactor change together.

1. Gateway

  • 1.1 Stop logging request bodies (design decisions 1 to 3).

    Tests first, in RequestBodyLoggerFilterTest:

    • a lead update PUT (name, mobile, email, notes): none of the values in the log, method and path present, downstream body unchanged;
    • customer login, password change and form login: no body field name or value in the log, downstream body unchanged (rewrites the three masked-body tests);
    • an empty POST is logged and forwarded (rewrites emptyBody);
    • a GET with ?q=aisyah: the term is not in the log;
    • header and JWT-path masking and the skip list keep their existing tests unchanged.

    Run them red, then change the filter to log method, masked path and masked headers for every method without reading the body. Delete LogRedactor.body and everything only it uses, with the eight body-only LogRedactorTest cases named in design decision 2.

    Live check: rebuild the gateway, capture and update a made-up lead through the portal, and confirm with docker compose logs api-gateway that the lead's name, mobile and email are absent while the request lines are present.

    • Scope: solvway-api-gateway/src/**/filter/RequestBodyLoggerFilter*, solvway-api-gateway/src/**/filter/LogRedactor*
    • Verify: mvn -T 1C -B -q -pl solvway-api-gateway -am verify.

Workflow follow-up

  • Whole-branch review, push, PR to main and merge, then archive on its own branch.