Currently we have implemented the plugin framework in FE.
This CL make the original audit log logic pluggable.
The following classes are mainly implemented:
1. AuditPlugin
The interface of audit plugin
2. AuditEvent
An AuditEvent contains all information about an audit event, such as a query, or a connection.
3. AuditEventProcessor
Audit event processor receive all audit events and deliver them to all installed audit plugins.
This CL implements two audit module plugins:
1. The builtin plugin `AuditLogBuilder`, which act same as the previous logic, to save the
audit log to the `fe.audit.log`
2. An optional plugin `AuditLoader`, which will periodically inserts the audit log into a Doris table
specified by the user. In this way, users can conveniently use SQL to query and analyze this
audit log table.
Some documents are added:
1. HELP docs of install/uninstall/show plugin.
2. Rename the `README.md` in `fe_plugins/` dir to `plugin-development-manual.md` and move
it to the `docs/` dir
3. `audit-plugin.md` to introduce the usage of `AuditLoader` plugin.
ISSUE: #3226
74 lines
2.4 KiB
XML
74 lines
2.4 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
xmlns="http://maven.apache.org/POM/4.0.0"
|
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
<parent>
|
|
<groupId>org.apache</groupId>
|
|
<artifactId>doris-fe-plugins</artifactId>
|
|
<version>1.0-SNAPSHOT</version>
|
|
</parent>
|
|
<modelVersion>4.0.0</modelVersion>
|
|
|
|
<artifactId>auditloader</artifactId>
|
|
<packaging>jar</packaging>
|
|
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>org.apache</groupId>
|
|
<artifactId>doris-fe</artifactId>
|
|
</dependency>
|
|
|
|
<!-- https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-api -->
|
|
<dependency>
|
|
<groupId>org.apache.logging.log4j</groupId>
|
|
<artifactId>log4j-api</artifactId>
|
|
</dependency>
|
|
|
|
<!-- https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-core -->
|
|
<dependency>
|
|
<groupId>org.apache.logging.log4j</groupId>
|
|
<artifactId>log4j-core</artifactId>
|
|
</dependency>
|
|
|
|
<!-- https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-slf4j-impl -->
|
|
<dependency>
|
|
<groupId>org.apache.logging.log4j</groupId>
|
|
<artifactId>log4j-slf4j-impl</artifactId>
|
|
</dependency>
|
|
|
|
<!-- https://mvnrepository.com/artifact/log4j/log4j -->
|
|
<dependency>
|
|
<groupId>log4j</groupId>
|
|
<artifactId>log4j</artifactId>
|
|
</dependency>
|
|
</dependencies>
|
|
|
|
|
|
<build>
|
|
<finalName>auditloader</finalName>
|
|
|
|
<plugins>
|
|
<plugin>
|
|
<artifactId>maven-assembly-plugin</artifactId>
|
|
<version>2.4.1</version>
|
|
<configuration>
|
|
<appendAssemblyId>false</appendAssemblyId>
|
|
<descriptors>
|
|
<descriptor>src/main/assembly/zip.xml</descriptor>
|
|
</descriptors>
|
|
</configuration>
|
|
<executions>
|
|
<execution>
|
|
<id>make-assembly</id>
|
|
<phase>package</phase>
|
|
<goals>
|
|
<goal>single</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
|
|
</project>
|