Audit log does not cover non-HTTP events, starting with email sends
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Da chiarire
- Stato di attività
- Tranquilla
- Stack tecnologico
- typescript
- Ambito
- backend
Direzione di ricerca
Read AuditLog.ts and the cited ParticipantsController.ts and SurveysController.ts entry points to understand the existing HTTP and manual audit writes; compare them with Invite.status and Invite.sentAt. The issue leaves core design decisions open, including event storage and partial-batch outcomes, so there is no defined implementation or test to start with. Done requires those decisions to be settled before a scope and acceptance criteria can be set.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
The audit log is HTTP request logging. auditLog writes one row per PATCH/DELETE/POST/PUT carrying the resource path, the method, and whether the response was 2xx. It has no concept of anything that is not an HTTP request, so nothing it records says anything about email.
Raised by @ignatiusm while reviewing #936:
There are possibly other non-http request things we'll want to have auditlogs for. Designing all of that and thinking through the implications might blow up the scope of current PR.
So this is that design question pulled out of #936, with email as the first case rather than the whole scope.
What is wrong today
- Inviting 500 participants writes one audit row saying an admin POSTed to the invites endpoint. No recipients, no per-message outcome.
successon that row is the HTTP status, not the operation result.AuditLog.ts:45is200 <= res.statusCode <= 299.resendPendingInvitesreturns 204 andcreateInvitesreturns 200 regardless of how many sends failed, so a batch where every email failed is audited as a success.- The single-invite resend is the only honest path,
ParticipantsController.ts:862throws a 502. - The only manual audit write in the codebase is
SurveysController.ts:495, for answer recalculation, so there is no established pattern for non-HTTP events to copy.
What is recorded elsewhere
Invites are covered by Invite.status and Invite.sentAt, which give recipient and outcome per row. OTP, password reset and contact-us have nothing. OTPToken and PasswordResetToken record that a token was issued for a userId, not that an email went out.
Open decisions
- Should
successmean the HTTP status or the operation outcome? If the latter, how is a partially-failed batch represented? - Do non-HTTP events write to
AuditLogwith a syntheticresource, or get their own model? - What else belongs here beyond email? Background jobs and scheduled work have the same gap.
- Does the retention story change? If Sent Items on the M365 mailbox gets a cleanup policy, the app becomes the only record of what was sent.
Related: #936
- Lingua principale
- TypeScript
- Stelle
- 4
- Fork
- 0
- Merge medio
- 14h 50m
- PR unite (30g)
- 5
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Garvan-Data-Science-Platform/ctrl
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 82/100
-
admin-client backend bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
-
backend bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
Garvan-Data-Science-Platform/ctrl#970 · 1 commento ·
-
backend bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
backend bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
Tutte le issue di Garvan-Data-Science-Platform/ctrl
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
paperclipai/paperclip#16785 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
code-yeongyu/senpi#3661 ·
I maintainer di solito rispondono entro 1 giorno
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
lingdojo/kana-dojo#32731 · 1 commento · 5 reazioni ·
I maintainer di solito rispondono entro 1 giorno
-
bug status: needs triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
mastra-ai/mastra#27538 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
Yeachan-Heo/oh-my-codex#3822 ·
I maintainer di solito rispondono entro 1 giorno