Skip to content

feat: add HTTP audit middleware#104

Merged
gfyrag merged 3 commits into
mainfrom
feat/audit-middleware
May 22, 2026
Merged

feat: add HTTP audit middleware#104
gfyrag merged 3 commits into
mainfrom
feat/audit-middleware

Conversation

@gfyrag
Copy link
Copy Markdown
Contributor

@gfyrag gfyrag commented May 22, 2026

Summary

  • Wire the go-libs audit middleware into the wallets HTTP router
  • Add messaging infrastructure (publish flags + messagingfx module) for audit event publishing
  • Captures request/response data and publishes audit events via Watermill

Depends on: formancehq/go-libs#604

Test plan

  • Module compiles successfully
  • CI passes

🤖 Generated with Claude Code

Wire the go-libs audit middleware into the wallets HTTP router to capture
request/response data and publish audit events via Watermill.
Adds messaging infrastructure (publish flags + messagingfx module).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 22, 2026

Warning

Rate limit exceeded

@gfyrag has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 1 minute and 32 seconds before requesting another review.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 27571c74-7953-45ba-a3fa-18ce46b1029e

📥 Commits

Reviewing files that changed from the base of the PR and between 4192647 and 484fbfc.

⛔ Files ignored due to path filters (2)
  • go.mod is excluded by !**/*.mod
  • go.sum is excluded by !**/*.sum, !**/*.sum
📒 Files selected for processing (3)
  • cmd/serve.go
  • pkg/api/router.go
  • pkg/api/utils_test.go
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/audit-middleware

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

gfyrag and others added 2 commits May 22, 2026 10:38
Update import from pkg/transport/httpserver/audit to pkg/audit/httpaudit
following go-libs package restructure for protocol independence.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@gfyrag gfyrag marked this pull request as ready for review May 22, 2026 09:33
@gfyrag gfyrag requested a review from a team as a code owner May 22, 2026 09:33
@gfyrag gfyrag merged commit 81c594a into main May 22, 2026
6 checks passed
@gfyrag gfyrag deleted the feat/audit-middleware branch May 22, 2026 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants