Audit4j microservice is developed to fix following limitations in Audit4j Core.
- Audit4j core is not supported to embed in applications developed other than Java.
- Audit4j core is not suitable for component based enterprise applications (Ex: SOA) which required to store Audit logs in a central location.
You need the following installed and available in your $PATH:
- Java 8 (http://java.oracle.com)
- Apache maven 3.0.4 or greater (http://maven.apache.org/)
Execute below two maven goals.
mvn clean package
mvn assembly:single
- Copy and extract
audit4j-microservice-1.0.0-distribution.tar.gz
undertarget
directory - Go to bin directory
- execute
start.bat
Dashboard: http://localhost:8080
- 8080 - Dashboard and REST api
- 9091 - WebSocket transport
- 9092 - RPC transport
Configurations files are located in conf directory, Audit4j core configurations and Server configurations are served as seperately.
We have developed client api consists of two types of transports for various requirements.
RPC transport is the fastest transport and the protocol is consists of binary and compressed messages. The transport is developed on top of Apache thrift which added out-of-the-box support for various languages.
conf/server.config.yml
!ServerConfiguration
transports:
- !org.audit4j.microservice.transport.thrift.ThriftTransportServer
serverPort = 9999 #server port set to 9999 Default 9092
serverHost = localhost
multiThreadded = true #Server to initialize as multithreadded server default is single threadded.
- Download and install Apache Thrift Compiler.
- Copy Audit4j microservice api to a desired location.
- Generate client stub using below command.
thrift --gen <language> api.thrift
Securing Audit traffic is only recommended if the traffic is exposed as a public service. Using below steps, RPC communication can be secured via SSL.
-
Creating key store for server
keytool -genkeypair -alias certificatekey -keyalg RSA -validity 7 -keystore keystore.jks
-
Export certificate
keytool -export -alias certificatekey -keystore keystore.jks -rfc -file cert.cer
-
Creating trust store for client
keytool -import -alias certificatekey -file cert.cer -keystore truststore.jks
-
Configure RPC transport
!ServerConfiguration
transports:
- !org.audit4j.microservice.transport.thrift.ThriftTransportServer
secureServer = true
secureKeyStore = conf/trust/keystore.jks
secureKeyPassword = 123456 #Given password while creating the keystore
The following methods are available to obtain support:
- The Audit4j Google Group - This would normally be your first stop to get support for Audit4j. Here you can find previously asked question, and ask new ones. When asking a question, please provide as much information as you can regarding the environment you use (development language, library, versions.
- The Issues tab - Please open feature requests and bugs here. If you're not sure you encountered a bug, or if it's a general usage question, please use the Google Group mentioned above.