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>
This commit is contained in:
committed by
Edwin Kempin
parent
d5e87c3aad
commit
27ba2ac5e6
@@ -228,7 +228,7 @@ class CommandFactoryProvider implements Provider<CommandFactory> {
|
||||
}
|
||||
|
||||
/** Split a command line into a string array. */
|
||||
static String[] split(String commandLine) {
|
||||
static public String[] split(String commandLine) {
|
||||
final List<String> list = new ArrayList<String>();
|
||||
boolean inquote = false;
|
||||
boolean inDblQuote = false;
|
||||
|
||||
Reference in New Issue
Block a user