Audit log — record who did what and when
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Quiet
- Tech stack
- go
- Domain
- api, authentication, authorization, backend, databases
Research direction
Start by reading related issues #2 and #3, then map the mutating handlers for snaps, API keys, and login. Done means the specified actions create audit_log entries and GET /audit returns paginated results only to admins; the optional UI activity surface is not required.
Written by the indexing model from the issue text.
Description
Once authentication (#2) lands, actions like snap deletion, rename, and API key creation should be logged for accountability.
What needs to be done
audit_logtable:id,user_id(nullable — system actions),action(e.g.snap.created,snap.deleted,snap.renamed),target_id,metadata JSONB,created_at.- Middleware or explicit calls in handlers write a row after each mutating action.
GET /audit(admin only) returns paginated log entries.- Optionally surface recent activity in the UI header.
Actions to log
| Action | Metadata |
|---|---|
snap.created |
snap_id, lat, lng, photo_count |
snap.deleted |
snap_id, name |
snap.renamed |
snap_id, old_name, new_name |
api_key.created |
key_name |
api_key.revoked |
key_name |
user.login |
method (password/google/apple), ip |
Related
- #2 Authentication (user_id comes from here)
- #3 Authorization (audit access is admin-only)
- Dominant language
- Go
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from williamokano/SentinelSnap
-
enhancement infrastructure security
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
williamokano/SentinelSnap#36 ·
-
enhancement infrastructure
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
williamokano/SentinelSnap#35 ·
-
improvement low priority
Difficulty 5/5 Over a week Newbie friendliness 38/100
williamokano/SentinelSnap#75 ·
-
chore low priority
Difficulty 3/5 1-2 days Newbie friendliness 72/100
williamokano/SentinelSnap#74 ·
-
ci enhancement infrastructure security
Difficulty 4/5 3-5 days Newbie friendliness 48/100
williamokano/SentinelSnap#46 ·
All issues in williamokano/SentinelSnap
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 84/100
-
enhancement needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
kind/cleanup
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
kubernetes-sigs/kueue#15947 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
sympozium-ai/sympozium#627 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100