Audit Manager
A centralised audit-event service for OpenG2P. Accepts structured audit events over HTTP, buffers through Kafka, and persists them to a partitioned PostgreSQL table for long-term retention and forensi
Overview
Key capabilities
Design at a glance
┌──────────────────────┐
│ OpenG2P services │ (FastAPI services, Odoo modules, CLI tools,
│ and external tools │ external webhooks, third-party integrations)
└──────────┬───────────┘
│ HTTP POST /v1/auditmanager/events (returns 202 immediately)
▼
┌──────────────────────────────────────────────────────────────────┐
│ openg2p-audit-manager (horizontally scaled) │
│ │
│ FastAPI ingest │
│ │ │
│ ▼ │
│ asyncio.Queue (bounded — 503 on overflow, never silent drop) │
│ │ │
│ ▼ │
│ Kafka producer (aiokafka, batched, keyed by subject) │
│ │ │
│ ▼ │
│ ┌──────────────────────────────────────────────┐ │
│ │ Kafka topic: openg2p.audit.events (12 parts)│◄─────────┐ │
│ └──────────────────────────────────────────────┘ │ │
│ │ │ │
│ ▼ │ │
│ Kafka consumer (same service, same process) │ │
│ │ │ │
│ ▼ │ │
│ Batched INSERT ... ON CONFLICT DO NOTHING │ │
│ │ │ │
└─────┼───────────────────────────────────────────────────────┼───┘
▼ │
┌──────────────────────────┐ Bad message ─────────┘
│ PostgreSQL │ → openg2p.audit.dlq
│ audit_events │
│ (partitioned by month,│
│ 7-year retention) │
└──────────────────────────┘Detailed documentation
Page
Description
Versions
Helm Chart Version
Docker Image
Date
Comments
Source code
Technology stack
Component
Choice
License
Last updated
Was this helpful?