Supported Tags and Respective
For more information about this image, the source code, and its history, please see the GitHub repository.
What is Logback Audit Server?
The Consent2Share (C2S) application uses Logback Audit as a centralized audit repository in backend services, particularly in the Access Control Service components. Logback Audit can be configured to use relational databases for persistence.
C2S currently uses a fork of the Logback Audit project. This fork is fundamentally the same as the original Logback Audit implementation. However, it has some dependency version updates and column size modifications in the database tables. It also includes an SQL script for database creation and a generated Logback Audit Server project that can be built and deployed on an application server such as Apache Tomcat.
This image provides the runtime environment for the generated Logback Audit Server application.
For more information and related downloads for Consent2Share, please visit Consent2Share.
How to Use This Image
Start a Logback Audit Server Instance
Be sure to familiarize yourself with the repository's README.md file before starting the instance.
docker run -d --name=logback-audit-server.c2s.com --link=audit-service-db.c2s.com -e "CATALINA_OPTS=-Daudit.datasource.url=jdbc:mysql://audit-service-db.c2s.com:3306/audit?autoReconnect=true -Daudit.datasource.username=root -Daudit.datasource.password=admin -Daudit.listen.port=9630 -DC2S_PROPS=/java/C2S_PROPS -DAUTO_SCAN=true -DSCAN_PERIOD='60 seconds'" -v "/path/to/config/root/on/dockerhost:/java/C2S_PROPS" bhits/logback-audit-server:latest
NOTE: In order for this API to fully function as a microservice in the Consent2Share application, it is required to setup the dependency microservices and support level infrastructure. Please refer to the Consent2Share Deployment Guide for instructions to setup the Consent2Share infrastructure.
This API depends on certain environment variables to be available in Tomcat and a logback-audit-config-logback_included.xml to be mounted in the container. Please see the following environment variables for configuration.
logback-audit-server can be configured by providing the following environment variables.
This should be the location of the root directory for externalized configuration. The default value is
logback-audit-server will try to load
This environment variable can be overriden by passing through CATALINA_OPTS. Make sure you put the configuration file under the new configured path.
docker run -d --name=logback-audit-server.c2s.com --link=audit-service-db.c2s.com -e "CATALINA_OPTS=-DC2S_PROPS=/new/path -v "/path/to/config/root/on/dockerhost/logback-audit/config-template/logback-audit-config-logback_included.xml:/new/path/logback-audit/config-template/logback-audit-config-logback_included.xml" bhits/logback-audit-server:latest
This variable is used to configure logback auto scan feature, so the expected value for this property is
AUTO_SCAN=true, logback will scan for changes in the included external configuration file and reconfigure itself when it detects a change. The default value is
docker run -d --name=logback-audit-server.c2s.com -e "CATALINA_OPTS=-DAUTO_SCAN=true" bhits/logback-audit-server:latest
This variable is used to configure logback auto scan period configuration. If
SCAN_PERIOD=30 seconds, logback will scan the external file for changes for every 30 seconds. The default value is
docker run -d --name=logback-audit-server.c2s.com -e "CATALINA_OPTS=-DSCAN_PERIOD='30 seconds'" bhits/logback-audit-server:latest
This is the URL for the database connection. There is no default value for this configuration, so it must be provided.
docker run -d --name=logback-audit-server.c2s.com --link=audit-service-db.c2s.com -e "CATALINA_OPTS=-Daudit.datasource.url=jdbc:mysql://audit-service-db.c2s.com:3306/audit?autoReconnect=true" bhits/logback-audit-server:latest
This is the username for the database connection. There is no default value for this configuration, so it must be provided.
docker run -d --name=logback-audit-server.c2s.com -e "CATALINA_OPTS=-Daudit.datasource.username=root" bhits/logback-audit-server:latest
This is the password for the database connection. There is no default value for this configuration, so it must be provided.
docker run -d --name=logback-audit-server.c2s.com -e "CATALINA_OPTS=-Daudit.datasource.password=admin" bhits/logback-audit-server:latest
This is the port number that the audit server will listen to and communicate with audit clients. This port number is NOT the same as the application server port number. There is no default value for this configuration, so it must be provided. However, the default expected value in several audit clients is
docker run -d --name=logback-audit-server.c2s.com -e "CATALINA_OPTS=-Daudit.listen.port=9630" bhits/logback-audit-server:latest
Supported Docker Versions
This image is officially supported on Docker version 1.12.1.
Support for older versions (down to 1.6) is provided on a best-effort basis.
Please see the Docker installation documentation for details on how to upgrade your Docker daemon.
The Logback Audit license can be found at http://audit.qos.ch/license.html.
Documentation for this image is stored in the bhits/logback-audit GitHub repository. Be sure to familiarize yourself with the repository's README.md file before attempting a pull request.
If you have any problems/questions about this image or Consent2Share modifications on Logback Audit, please contact us through the BHITS Logback Audit GitHub Issues page. For issues related to the core Logback Audit framework, please use Logback Audit GitHub Issues page.