Error messages put members' email addresses and forum usernames into the console's logs #250

Open
opened 2026-10-22 23:04:08 +00:00 by cgalo5758 · 1 comment
Owner

What happens

When a request to the forum fails, times out or is cancelled, the forum client returns the HTTP library's error, whose text repeats the request address. For the lookup of a forum user by email, that address carries the email in its query (internal/integrations/discourse/client.go, do). The error reaches the linkage path's resolve and confirmation steps.

The targeted reconcile's add and remove errors name the forum username, and the forum's own error text can repeat it, for example when a user is already a member of a group (internal/integrations/discourse/workflows/activities.go).

These errors are written to the console's logs: the reconcile sweep's warning line and the worker's activity-error log. Nothing on the logging path removes personal data, and no rule says what a log line may carry. The copies Temporal keeps in its failure messages are tracked by #162.

What should happen

A log line names a person by id, never by email address, username or name, and an error that wraps a request address drops its query. The rule is written in docs/go-conventions.md, so new code follows it.

Where

internal/integrations/discourse/client.go (do), internal/integrations/discourse/linkage/linkage.go, internal/integrations/discourse/workflows/activities.go

Why it matters

Logs are kept, shipped and read with fewer controls than the database, and an address in a log line outlives the person's erasure.

### What happens When a request to the forum fails, times out or is cancelled, the forum client returns the HTTP library's error, whose text repeats the request address. For the lookup of a forum user by email, that address carries the email in its query (`internal/integrations/discourse/client.go`, `do`). The error reaches the linkage path's resolve and confirmation steps. The targeted reconcile's add and remove errors name the forum username, and the forum's own error text can repeat it, for example when a user is already a member of a group (`internal/integrations/discourse/workflows/activities.go`). These errors are written to the console's logs: the reconcile sweep's warning line and the worker's activity-error log. Nothing on the logging path removes personal data, and no rule says what a log line may carry. The copies Temporal keeps in its failure messages are tracked by #162. ### What should happen A log line names a person by id, never by email address, username or name, and an error that wraps a request address drops its query. The rule is written in `docs/go-conventions.md`, so new code follows it. ### Where `internal/integrations/discourse/client.go` (`do`), `internal/integrations/discourse/linkage/linkage.go`, `internal/integrations/discourse/workflows/activities.go` ### Why it matters Logs are kept, shipped and read with fewer controls than the database, and an address in a log line outlives the person's erasure.
cgalo5758 added the
kind
bug
area/discourseprivacy
labels 2026-10-22 23:04:08 +00:00
Author
Owner

One more place, on the success path: when the reconcile sweep removes members from a managed group, it logs their forum usernames in the "discourse managed-group drift corrected" line, as its removed attribute (internal/integrations/discourse/workflows/activities.go, at the end of the group's reconcile). Some of those accounts belong to no member the console knows, such as someone an administrator added by hand, so nothing the console erases can reach them.

The line follows openspec/specs/discourse-group-sync/spec.md:42, which asks for a correction to be "logged with the observed discrepancy". The fix should change that sentence to log the number added and removed, and the forum user ids at most.

One more place, on the success path: when the reconcile sweep removes members from a managed group, it logs their forum usernames in the "discourse managed-group drift corrected" line, as its `removed` attribute (`internal/integrations/discourse/workflows/activities.go`, at the end of the group's reconcile). Some of those accounts belong to no member the console knows, such as someone an administrator added by hand, so nothing the console erases can reach them. The line follows `openspec/specs/discourse-group-sync/spec.md:42`, which asks for a correction to be "logged with the observed discrepancy". The fix should change that sentence to log the number added and removed, and the forum user ids at most.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: wiki-cafe/member-console#250