Audit hooks on JSON/RPC and SSH commands using Gerrit plugins.
New @Audit annotation to enable invocation of
AuditService injected on GerritGlobalModule.
Annotation applies to JSON/RPC interfaces whilst
on the SSH side audit is "hooked" directly into
SshLog class.
Enables the integration of Audit plugins through
the implementation of audit-listeners.
Dynamic loading and unloading of audit plugins is supported
through the @Extension/@Listener association and
automatically loaded and unloaded using Plugin
module self-registration.
In order to implement a new AuditListener implementation
you only to:
1) Define an implementation of AuditListener and annotate
as:
@Listener
public class MyAuditTrail extends AuditListener
2) Define a Plugin Module to bind your Audit implementation
in the configure() method as:
DynamicSet.bind(binder(), AuditListener.class)
.to(MyAuditTrail.class);
Change-Id: Iaa26c4687a4ef4cbe27fe8396a5e0b8f6627536f
Signed-off-by: Luca Milanesio <luca.milanesio@gmail.com>
20 files changed