feat: add audit middleware to webhooks server#154
Conversation
Wire httpaudit.Middleware from go-libs/v5 into the webhooks HTTP handler to capture and publish audit events via the existing Watermill publisher infrastructure. This was lost when the upgrade PR was squash-merged. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (4)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
The publisher is already provided by the worker module. Adding it again in serve.go causes an fx "already provided" conflict. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Move publish.FXModuleFromFlags to serve.go so the publisher is available in both server-only and worker modes. Previously it was only in the worker module, causing a missing dependency when running without --worker. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat: add audit middleware to webhooks server Wire httpaudit.Middleware from go-libs/v5 into the webhooks HTTP handler to capture and publish audit events via the existing Watermill publisher infrastructure. This was lost when the upgrade PR was squash-merged. * fix: remove duplicate publish module registration The publisher is already provided by the worker module. Adding it again in serve.go causes an fx "already provided" conflict. * fix: move publish module from worker to serve Move publish.FXModuleFromFlags to serve.go so the publisher is available in both server-only and worker modes. Previously it was only in the worker module, causing a missing dependency when running without --worker. --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
httpaudit.Middlewarefromgo-libs/v5into the webhooks HTTP handler to capture and publish audit eventspublish.FXModuleFromFlagsto the serve command's fx options to provide amessage.Publisherin the DI containermodule.goand intonewServerHandler()inhandler.goThese audit commits were lost when the upgrade PR was squash-merged.
Test plan
audit-eventstopic when HTTP requests are made🤖 Generated with Claude Code