Skip to content

[M2.2c5] Redact sensitive HTTP error diagnostics - #52

Merged
samuelmbabhazi merged 1 commit into
mainfrom
fix/m2.2c5-http-secret-boundaries
Nov 5, 2026
Merged

samuelmbabhazi merged 1 commit into
mainfrom
fix/m2.2c5-http-secret-boundaries

Conversation

@samuelmbabhazi

Copy link
Copy Markdown
Collaborator

HTTP diagnostics could expose credentials despite header redaction: the request serializer kept URL query strings, the problem instance echoed them, and framework/parser exceptions or unexpected driver errors could include sensitive input.

Request logs and problem instances now keep only the URL path. HTTP exceptions retain status/code but use fixed status text; domain and DTO validation retain their reviewed public messages. Error logs include only request ID, path and status, excluding raw exceptions.

Validation: API lint/typecheck and all 94 unit tests pass. New regression tests send malformed credential JSON through the HTTP pipeline and inject query tokens/raw exception secrets, asserting that responses and diagnostic logs do not contain the values. Existing domain/validation status contracts remain covered.

Security: closes credential reflection and logging paths without a new dependency, command mutation or migration. Plan/threat model updated. Stacked on the HTTP idempotency branch; no merge requested.

  • M2.2c5 regression cases covered
  • Lint, typecheck and API unit tests pass
  • No new shell invocation, business mutation or secret exposure path
  • Security documentation updated

@samuelmbabhazi
samuelmbabhazi force-pushed the feat/m2.2c4c2-auth-http-retries branch from 06d806c to 7606393 Compare November 4, 2026 11:36
@samuelmbabhazi
samuelmbabhazi force-pushed the fix/m2.2c5-http-secret-boundaries branch from 507e9e2 to 42f35ba Compare November 4, 2026 11:36
@samuelmbabhazi
samuelmbabhazi force-pushed the feat/m2.2c4c2-auth-http-retries branch from 7606393 to 4467aa9 Compare November 5, 2026 12:31
@samuelmbabhazi
samuelmbabhazi changed the base branch from feat/m2.2c4c2-auth-http-retries to main November 5, 2026 12:31
@samuelmbabhazi
samuelmbabhazi force-pushed the fix/m2.2c5-http-secret-boundaries branch from 42f35ba to 98423a7 Compare November 5, 2026 12:31
@samuelmbabhazi
samuelmbabhazi merged commit ec04c34 into main Nov 5, 2026
9 checks passed
@samuelmbabhazi
samuelmbabhazi deleted the fix/m2.2c5-http-secret-boundaries branch November 5, 2026 12:32
samuelmbabhazi added a commit that referenced this pull request Nov 5, 2026
MFA persistence now keeps either an encrypted pending TOTP seed or an
active seed. Pending enrollment lasts ten minutes, is tied to the
account security version, and cannot activate after expiry, a password
change or account disablement. An active seed cannot be overwritten by
staging another enrollment.

TOTP counters only advance, recovery hashes are consumed once, and all
mutations join the existing user transaction. Removing MFA cascades its
recovery records. Schema constraints enforce paired fields, ciphertext
bounds, counter range and enrollment lifetime. Commands/HTTP wiring
follow in M2.2d2/d3.

Validation: API lint/typecheck and all 51 real PostgreSQL/TLS SMTP
integration tests pass. Four new PostgreSQL tests cover encrypted round
trips, expiry/version/disabled-account rejection, concurrent claims
across connections, cascade cleanup, invalid hash batches and
audit-failure rollback.

Security: raw seeds and recovery values never enter the new tables. The
adapter only accepts ciphertext; envelope associated data binds it to
the user. Application commands must hold the existing per-user lock.
This PR introduces persistence only and does not yet enable MFA
enrollment publicly. Stacked on #52; no merge requested.

- [x] M2.2d1 criteria met
- [x] Migration and concurrent claims tested on PostgreSQL
- [x] Audit rollback preserves proof availability
- [x] Plan and security parameters updated
- [x] No new shell invocation or secret exposure path
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant