Forensic Accountability
& Metering Engine.

Achieve sub-millisecond accountability. GO-DUCK generates a forensic-grade auditing and hierarchical metering engine that tracks every action across your entire distributed ecosystem.

🔍 Row-Level Forensics

Any GDL entity marked @Audited automatically tracks "Who did What and When" at the row level—persisting exact deltas into the global audit_log.

Keycloak Role Tracking Tenant Partitioning

📊 Hierarchical SaaS Metering

Track and limit API bandwidth in real-time via Redis. Automatically enforce dynamic quotas targeted at Individual Users or Realm Roles.

X-Quota-Remaining: 984

The Forensic Loop
Immutable Evidence.

01
Interception

Middleware extracts Keycloak Role, UserID, and TenantID from the incoming request envelope.

02
Verification

The SaaS Metering engine checks Redis for remaining bandwidth. Rejects if Daily/Monthly limits are exceeded.

03
Persistence

After the mutation succeeds, the GORM hook persists the full audit delta atomically within the same silo transaction.

Audit Schema Excellence

Event Attribute Security Value
Actor IdentityCaptures the Subject (UserID) and Realm Role of the initiator.
Historical DeltaFull JSONB diff of the object before and after the mutation.
Trace PropogationLinks the audit log directly to the OpenTelemetry TraceID.
Tenant IsolationAudit logs are partitioned by Silo, ensuring no cross-tenant leakage.