Skip to main content

jEAP Audit

jEAP Audit is a library for the standardized creation and delivery of audit records in Spring Boot services built on the jEAP framework. Distributed government systems need comprehensive audit trails for compliance, security and operational transparency, and jEAP Audit provides the building blocks to produce them consistently across microservices. It offers:

  • A fluent builder (CreateAuditRecordCommandBuilder) for the Avro CreateAuditRecordCommand
  • A Spring-managed factory (CreateAuditRecordCommandBuilderFactory) that fills the trigger from the jEAP security token (user) or from a consumed message (system)
  • Reliable, at-least-once delivery of audit commands through the jeap-messaging-outbox transactional outbox
  • Consumer support that converts a received CreateAuditRecordCommand into a plain Java AuditRecord model for downstream processing and centralized audit-log aggregation

The audit command is an Avro message type (create-audit-record-command) sent over Kafka. jEAP Audit builds on jeap-messaging for serialization, contracts and delivery.

Documentation

Start with Getting started, then follow the links below.

TopicFile
Getting started (add a dependency, build & send a command)docs/getting-started.md
Architecture & audit-record modeldocs/architecture.md
Building the command (CreateAuditRecordCommandBuilder)docs/building-the-command.md
Sending via transactional outboxdocs/transactional-outbox.md
Consuming audit commandsdocs/consuming-audit-commands.md
Configuration reference (jeap.audit.*)docs/configuration.md

Modules

Group id for all modules is ch.admin.bit.jeap; the version is managed by the jEAP Spring Boot parent. A consuming service depends on the module(s) matching its use case.

ModulePurpose
jeap-audit-command-builderFluent CreateAuditRecordCommandBuilder and Spring CreateAuditRecordCommandBuilderFactory
jeap-spring-boot-audit-starter-transactional-outboxSpring Boot starter registering CreateAuditRecordCommandTransactionOutboxSender to send via the outbox
jeap-audit-command-consumerAuditRecordFactory converting a CreateAuditRecordCommand into the plain AuditRecord model
jeap-audit-command-builder-nojeapsecurity-testInternal test module verifying the builder works without jEAP security on the classpath