PRD 0036: Codex Auth Redaction Policy #132

Merged
didericis merged 3 commits from prd-0036-codex-auth-redaction into main 2026-06-02 04:14:31 -04:00
Collaborator

Closes #129.

Parent hotspot review: #117.

PRD: a79ef61b62/docs/prds/0036-codex-auth-redaction-policy.md

Summary

Implements the Codex auth redaction PRD. Dummy guest auth is now synthesized from explicit top-level and token-block policy instead of recursively preserving unknown auth fields.

Implementation

  • Preserves only auth_mode, nulls API keys, and synthesizes tokens.
  • Replaces access/id tokens with dummy JWTs aligned to the host access-token expiry.
  • Preserves only the non-secret selected account id in token blocks.
  • Redacts unknown scalar fields to placeholders and collapses unknown objects/lists to empty containers.
  • Adds hostile future-field fixture coverage for top-level auth fields, token-block fields, JWT custom claims, and OpenAI auth claims.

Verification

  • python3 -m unittest tests.unit.test_codex_auth
  • python3 -m py_compile bot_bottle/codex_auth.py
  • git diff --check
  • python3 -m unittest discover -s tests/unit

Changes (3 commits)

  • docs(prd): add codex auth redaction policy
  • fix(codex): harden auth redaction
  • complete(prd): mark PRD 0036 active
Closes #129. Parent hotspot review: #117. PRD: https://gitea.dideric.is/didericis/bot-bottle/src/commit/a79ef61b629bfec4c25e2109b032b6b9e8173f55/docs/prds/0036-codex-auth-redaction-policy.md ## Summary Implements the Codex auth redaction PRD. Dummy guest auth is now synthesized from explicit top-level and token-block policy instead of recursively preserving unknown auth fields. ## Implementation - Preserves only `auth_mode`, nulls API keys, and synthesizes `tokens`. - Replaces access/id tokens with dummy JWTs aligned to the host access-token expiry. - Preserves only the non-secret selected account id in token blocks. - Redacts unknown scalar fields to placeholders and collapses unknown objects/lists to empty containers. - Adds hostile future-field fixture coverage for top-level auth fields, token-block fields, JWT custom claims, and OpenAI auth claims. ## Verification - `python3 -m unittest tests.unit.test_codex_auth` - `python3 -m py_compile bot_bottle/codex_auth.py` - `git diff --check` - `python3 -m unittest discover -s tests/unit` ## Changes (3 commits) - `docs(prd): add codex auth redaction policy` - `fix(codex): harden auth redaction` - `complete(prd): mark PRD 0036 active`
didericis added 1 commit 2026-06-02 04:09:25 -04:00
docs(prd): add codex auth redaction policy
test / unit (pull_request) Successful in 35s
test / integration (pull_request) Successful in 42s
2247d730cd
didericis force-pushed prd-0036-codex-auth-redaction from 1c5d8adb55 to 2247d730cd 2026-06-02 04:09:25 -04:00 Compare
didericis added 2 commits 2026-06-02 04:10:47 -04:00
complete(prd): mark PRD 0036 active
test / unit (pull_request) Successful in 32s
test / integration (pull_request) Successful in 44s
test / unit (push) Successful in 31s
test / integration (push) Successful in 45s
a79ef61b62
didericis approved these changes 2026-06-02 04:11:56 -04:00
didericis merged commit a79ef61b62 into main 2026-06-02 04:14:31 -04:00
didericis deleted branch prd-0036-codex-auth-redaction 2026-06-02 04:14:31 -04:00
Sign in to join this conversation.