Audit log does not cover non-HTTP events, starting with email sends
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- typescript
- Lĩnh vực
- backend
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- TypeScript
- Star
- 4
- Fork
- 0
- Merge trung bình
- 14 giờ 50 phút
- Pull request đã merge (30 ngày)
- 5
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Garvan-Data-Science-Platform/ctrl
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 82/100
-
admin-client backend bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
backend bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Garvan-Data-Science-Platform/ctrl#970 · 1 bình luận ·
-
backend bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
backend bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Tất cả issue của Garvan-Data-Science-Platform/ctrl
Issue tương tự
-
Create/import wallet form shows raw "password must be at least 1 characters" instead of the translated messageCó thể đã có người làm @CapThunder19 đã nhận hôm nay. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
joinmarket-webui/jam#1538 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
t0ggles
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
nolimits4web/swiper#8240 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
modelcontextprotocol/inspector#2723 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
status:approved type:bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 70/100
egdev6/quorb#109 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày