Skip to content

docs(issues): [#2993] spec for keeping secrets out of errors, logs and client replies - #2994

Merged
josecelano merged 19 commits into
torrust:developfrom
josecelano-bot:2993-secrets-and-client-error-text-spec
Nov 23, 2026
Merged

josecelano merged 19 commits into
torrust:developfrom
josecelano-bot:2993-secrets-and-client-error-text-spec

Conversation

@josecelano-bot

@josecelano-bot josecelano-bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Related to #2993, #2999 and #3000

Adds the specification of EPIC #2993, which keeps secrets out of errors, logs and client replies and makes client error text safe. It is spec-only: no code changes. It also adds the specifications of its two sub-issues, #2999 (SI-A, secrets) and #3000 (SI-B, client error text policy). The EPIC is standalone and linked to EPIC #2912; it is not a sub-issue of it.

The spec holds an inventory verified against the tree and reproduced on a running tracker: the peer key in the HTTP failure reason, in the request logs of both servers and in a DEBUG line; the admin token in the REST request log and in the REST client's transport errors; configuration errors that print a numeric password or token; and the text each protocol sends a client for each error family, including database driver text, the server clock in UDP cookie errors and a Rust type name in UDP parse errors. It also inventories the skills, ADRs and documents about handling secrets, and records the maintainer's decisions of 2026-11-22: an EPIC with two sub-issues, request-URI logging in scope, standalone from #2912, database text for clients decided in the ADR of the second sub-issue, and the principle to help the legitimate user as much as possible without revealing the secret.

Review focus: whether the scope split (secrets versus client text) and the proposed peer-key messages match what you want, and whether the SI-5 (#2917) interaction noted in the spec should be resolved by SI-5 or by the secrets sub-issue.

Checks run: the repo pre-commit gate (linter all, frontmatter validator, cspell and the rest), all passing, and the commit-id check, empty.

🤖 Generated with Claude Code

josecelano-bot and others added 2 commits November 22, 2026 13:25
…logs and client replies

Adds the EPIC specification: an inventory of the secrets held by errors and
written to logs, of what each protocol sends a client, and of the skills,
ADRs and documents about handling secrets, plus the maintainer's decisions and
two sub-issues (secrets, and the client error text policy).

Co-Authored-By: Claude Fable 5.2 <[email protected]>
@josecelano josecelano self-assigned this Nov 22, 2026
@josecelano
josecelano requested review from da2ce7 and a balanced review from Copilot November 22, 2026 13:48

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Copilot review overview

7 open issues
What changed in this PR

Adds an EPIC specification for #2993 to prevent secrets from leaking via errors/logs/client responses and to define a policy for safe client-facing error text.

Changes:

  • Introduces a new EPIC spec documenting current leak inventory and reproduction evidence.
  • Defines scope split into SI-A (secrets leak fixes) and SI-B (client error text policy via ADR).
  • Records maintainer decisions, risks, and delivery strategy for the EPIC.
File Description
docs/​issues/​open/​2993-secrets-and-client-error-text/​EPIC.md New EPIC spec documenting leak inventory, scope, and plan for sub-issues to remove secrets from outputs and standardize safe client error text.

Review effort: Lite

josecelano-bot and others added 4 commits November 22, 2026 14:07
…f the EPIC

Adds drafts for SI-A (keep secrets out of errors, logs and output) and SI-B
(define and apply the client error text policy), links them from the EPIC
table, and corrects the inventory: the health-check API server has the same
request trace layer, though its routes carry no secret.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
…and state what was reproduced

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Round 1: review 6012624473 by Copilot, seven inline comments (F1 to F7).
F1 and F4 are fixed by earlier commits of this branch, F5 needs no change
(template text), and F2, F3, F6 and F7 repeat F1 or F5. All seven threads
have a reply and are resolved.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
@josecelano

Copy link
Copy Markdown
Member

ACK 82008cf

@josecelano

Copy link
Copy Markdown
Member

ACK 226ab9c

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

josecelano-bot and others added 7 commits November 22, 2026 14:47
…entory as manual verification evidence

Co-Authored-By: Claude Fable 5.2 <[email protected]>
… a failing persisted-downloads read in SI-B

Co-Authored-By: Claude Fable 5.2 <[email protected]>
…t to SI-A as inventory item A12

Co-Authored-By: Claude Fable 5.2 <[email protected]>
…ew and maintainer checkpoint in both sub-issue drafts

Co-Authored-By: Claude Fable 5.2 <[email protected]>
…eview round 2)

Conflict in cspell.json: both evidence ignore paths are kept (torrust#2916 from develop, torrust#2993 from this branch).
…orrust#2912 merged

SI-4 (torrust#2916) removed the source locations from the tracker-core errors. Updates
the tracker-core line references, records a re-run on a build that includes it
(evidence V9), and drops the wait-for-SI-4 notes.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
@josecelano

Copy link
Copy Markdown
Member

ACK 7718d71

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot stopped reviewing on behalf of josecelano due to an error November 23, 2026 08:28
josecelano-bot and others added 2 commits November 23, 2026 08:28
…vidence files and the EPIC

The UDP probe stops with a message when no connect response arrives, instead of failing on an unpack. The probe usage comment names reproduce.sh. The EPIC proposes the key-length message with a <n> placeholder. The evidence file says the quoted reply is verbatim and why it ends in "e". The EPIC links the SI-4 spec at its archived path.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
@josecelano

Copy link
Copy Markdown
Member

ACK ef5b216

… open after their issues torrust#2999 and torrust#3000 were created

The maintainer approved both drafts. The specifications move from docs/issues/drafts/ to docs/issues/open/ with their issue numbers, their frontmatter (github-issue, spec-path, branch, status) and headings are updated, and the EPIC Subissues table links them.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

…PIC and the evidence frontmatter

The evidence file's last-updated-utc matches its latest edit. The EPIC verification bullet points A12 to section V8 of the evidence file.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Copilot stopped reviewing on behalf of josecelano due to an error November 23, 2026 11:24
@josecelano

Copy link
Copy Markdown
Member

ACK 745b386

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Human assessment is needed to weigh unpublished concerns about secret-bearing error retention and whether the reproduction steps and tests verify the intended protections.

No open issues 🎉

3 resolved since last review

Review effort: Balanced

@josecelano

Copy link
Copy Markdown
Member

ACK 745b386

@josecelano
josecelano merged commit ff3600f into torrust:develop Nov 23, 2026
22 checks passed
josecelano-bot added a commit to josecelano-bot/torrust-tracker that referenced this pull request Nov 23, 2026
…int of SI-A and SI-B

PR 3014 review: the checked box refers to torrust#2994; torrust#3014 refreshes the
specifications and must merge before implementation too.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
josecelano added a commit that referenced this pull request Nov 24, 2026
…cs against develop

e1bcbe7 docs(pr-reviews): [#2993] record review round 7 of PR 3014 (josecelano-bot)
09efe4a docs(issues): [#3000] tell the UDP parse-error reply and event texts apart (josecelano-bot)
ec4d906 docs(pr-reviews): [#2993] record review round 6 of PR 3014 (josecelano-bot)
8cd01f5 docs(issues): [#2999] name A12 once in the SI-A ownership sentence (josecelano-bot)
e06a496 docs(issues): say how the CI tools use their database URL constants (josecelano-bot)
4cfef8c docs(pr-reviews): [#2993] record review round 5 of PR 3014 (josecelano-bot)
eaf8300 docs(issues): [#2993] name the PR behind the spec-only checkpoint of SI-A and SI-B (josecelano-bot)
6baab17 docs(issues): redact the example database passwords in the CI-tools draft (josecelano-bot)
c358729 docs(pr-reviews): [#2993] record review round 4 of PR 3014 (josecelano-bot)
06eb491 docs(issues): [#3000] add the UDP health-check failure texts (josecelano-bot)
1f00028 docs(pr-reviews): [#2993] record the F10 reply and the validator run in the PR 3014 audit (josecelano-bot)
dc8ac44 docs(pr-reviews): [#2993] call the workflow-run times upper bounds on the push times (josecelano-bot)
b49144c docs(pr-reviews): [#2993] record review round 3 of PR 3014 (josecelano-bot)
d7c45ec docs(issues): take the CI-tools draft update time from the clock (josecelano-bot)
5e2bb05 docs(issues): say what the M3 baseline records in the CI-tools draft (josecelano-bot)
8ce3ce3 docs(pr-reviews): [#2993] record review round 2 of PR 3014 (josecelano-bot)
3629511 docs(issues): make the CI-tools draft scenarios runnable and say where markers enter (josecelano-bot)
15263e2 docs(issues): [#3000] limit the driver-text criterion to the servers that reach the database (josecelano-bot)
6dcacdb docs(issues): [#2999] cover the POST path rejection, malformed key segments and the client GET exceptions (josecelano-bot)
12c44a8 docs(pr-reviews): [#2993] record review round 1 of PR 3014 (josecelano-bot)
42fbf8a docs(issues): add the test loop and per-site log scenarios to the CI-tools draft (josecelano-bot)
c6e9aee docs(issues): [#3000] split the health-check reply statuses and add its verification (josecelano-bot)
62039f2 docs(issues): [#2993] update the specs now that #3001 has merged (josecelano-bot)
3a85e9f docs(issues): draft a spec to keep secrets out of the CI tools' logs (josecelano-bot)
881bd6f docs(issues): [#2993] recheck the EPIC and sub-issue specs against develop (josecelano-bot)

Pull request description:

  Related to #2993. Related to #2999. Related to #3000.

  ## Summary

  Spec-only. Before the first sub-issue of EPIC #2993 starts, the coordinator rechecked the EPIC, SI-A (#2999) and SI-B (#3000) specifications against `develop` `6bc417424` (about 150 commits after the inventory commit `bcca9764c`). Nothing in the inventory is fixed yet, but some statements were wrong and some cases were missing. The maintainer answered the open questions on 2026-11-23; this PR records the answers and the corrections.

  ## Corrections

  - The REST client already sends the token in the `Authorization: Bearer` header on every request; it also adds `?token=` on GET requests. The EPIC said it had no header form. SI-A item 6 is now "remove the query token and call `without_url` at every `reqwest` wrap site".
  - `invalid_auth_key_response` lives in `v1/context/auth_key/responses.rs`, not `v1/responses.rs`.
  - A9: `docs/containers.md` also teaches `?token=` at lines 650 and 719.
  - The EPIC Subissues row, scope and AC now say SI-A covers A1 to A10 and A12, and three servers (with the health-check API), as the SI-A spec already said.
  - Section B: the scrape database prefix and the UDP internal text (which still carries a location until #3001 merges).
  - Bookkeeping in both sub-issue specs: the spec-only PR checkbox (#2994 merged) and the progress log.

  ## Added

  - SI-A: a third `InvalidKey { key }` site in `rest-api-runtime-adapter`; the peer key in the URL of `delete_auth_key` and the other `reqwest` wrap sites; the fifth key text; the extractor that drops the parse error kind; the other places that teach `?token=` (three skills, rustdoc, a contrib README); types with a derived `Debug` that hold a key; the tests that pin today's texts.
  - SI-B: the client texts section B missed, as input for the ADR's table, and the health-check API in scope.
  - Maintainer decisions of 2026-11-23: SI-A starts after #3001 merges; marker `***` (the `****` of #3004 stays); one session at a time, Claude Fable 5.2 at high effort.
  - A draft spec, `docs/issues/drafts/ci-tools-keep-secrets-out-of-logs/ISSUE.md`, for the CI tools that log configuration and environment values. The maintainer put them out of the EPIC's scope. The draft waits for his review before a GitHub issue is created.

  ## After #3001 merged

  SI-5 of EPIC #2912 (#3001) merged while this PR was being opened. The branch was rebased onto `develop` once, before any review, and a third commit records the merge and refreshes the line numbers #3001 moved (`packages/configuration/src/lib.rs`, `packages/udp-server/src/error.rs`).

  ## Files

  - `docs/issues/open/2993-secrets-and-client-error-text/EPIC.md`
  - `docs/issues/open/2999-2993-si-a-keep-secrets-out-of-errors-and-logs/ISSUE.md`
  - `docs/issues/open/3000-2993-si-b-client-error-text-policy/ISSUE.md`
  - `docs/issues/drafts/ci-tools-keep-secrets-out-of-logs/ISSUE.md` (new)

  ## Validation

  - `linter markdown` and `linter cspell` pass; the pre-commit hook passed on both commits.
  - Every corrected line number and quoted text was read on `develop` `6bc417424`. Nothing was run on a tracker; the reproductions belong to the sub-issues.

  🤖 Generated with [Claude Code](https://claude.com/claude-code)

  <!-- This is an auto-generated comment: release notes by coderabbit.ai -->
  <!-- coderabbit-ai-generated:v1 -->

  ## Summary by CodeRabbit

  * **Documentation**
    * Updated planning documents for handling secrets in logs and errors, including REST and health-check API cases. These documents do not describe product behavior changes.
    * Expanded scope, acceptance criteria, test plans, and verification steps, and updated related work and progress records.
    * Added a review record covering findings, resolutions, and review history.
  <!-- end of auto-generated comment: release notes by coderabbit.ai -->

ACKs for top commit:
  josecelano:
    Waiving two merge-readiness checks for e1bcbe7: (1) Copilot's latest review is on ec4d906. The commits after it change 2 lines of the SI-B spec and add to the review audit record. (2) No ACK from da2ce7. This is a spec-only PR.

Tree-SHA512: 4f513d7a56a3453b5c2ed3776166a77ad47b8f6927ab7ebb5a1c2c16fb233a69a79a203e8cd475036993ecdefe9c27a84b1d330a33d7eeafc988acb276ef91dc
@da2ce7

da2ce7 commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

Post-merge note: this pull request requested a review from this account and was closed without one at its final head. A post-merge review will not be done: This pull request changed documentation only: it added the specifications of EPIC #2993 and its two sub-issues, with reproduction evidence kept in the issue folder that no build or CI step runs.

This branch was previously deployed

1 inactive deployment
coverage — 745b3869 Deployed Nov 23, 2026 by josecelano-bot via Generate Coverage Report #3388
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants