Solves the audit needs for any JVM based application

Overview

Auditor-v1

Solves the audit needs for any JVM based application.

Version

The latest release version is

Motivation

Auditing is a cross-cutting concerns of many applications supporting business process/workflows. There are some solutions out there like Javers, Audit4J, Log4j Audit etc.. that aims to provide auditing functionality for java applications. However, most of them focus on capturing the audit information amd storing in some sort of database or filesystem. While this is desirable in most traditional use cases, it becomes a challenge when microservices are serving high request throughput. There are other challenges when aggregating audit information generated from hundreds of microservices. In such cases, there's a need to decouple audits from business flows yet guarantee eventual consistency and performance. Auditor-v1 is an attempt to solve this.It offers a client library, and an app server that captures audit events at high throughput in distributed way.

Highlights

  • It's easily pluggable: A client library that can be integrated into any jvm application, directly or via spring boot starter module. Client library offers simple one liner api for seamless integration.
  • It's async: Auditing happens asynchronously on a separate thread pool with retries to ensure eventual consistency
  • It's efficient: Auditor uses Project reactor behind the scene to utilize system's hardware efficiently
  • It's performant: Auditor uses jackson-afterburner for serialization needs which is both fast and performant.
  • It's scalable: It leverages Kafka as event streaming platform so benefit from the inherent scalability feature of kafka
  • It's configurable: Highly configurable to meet different application custom needs ranging from logging, filtering, decorating(static data and dynamic templating) audit events. Supports both startup as well as runtime/dynamic configurations.

Architecture

image info

Modules

The project is composed of following modules:

  • core: Contains reusable code across other modules, primarily mappers, openapi spec auto genrated code etc.
  • client: Contains api and implementation code for the auditor library that will get plugged into applications thats needs audit feature.
  • client-spring-boot-starter: It's a spring boot starter over client api(s). Useful for application that uses spring boot.
  • client-example: Example application to showcase standalone client usage
  • client-example-springboot: Example application to showcase spring boot starter usage
  • app: Contains deployable app that will listen to kafka and inserts the audit events and logs to elastic search.

Integration:

You will have to point the maven/gradle repo to Maven release repository: link to download any of the client libraries.

Gradle:
<>") } }">
repositories {
    maven {
        url = uri("<>")
    }
}
Maven:

   
    
    
      
     
      //todo artifactory-id
     
      
     
      //todo artifactory-name
     
      
     
      //todo artifiactor-url
     
    
    
  
   



Using auditor-v1 client library

It can be integrated in either of following two ways.

  • Standalone mode:

    Refer the client module's README.md for how to use the client in standalone mode
  • Spring boot starter mode:

    Spring boot starter module is built for applications that uses spring boot framework and comes with additional benefit of pre-initialized Auditor instance. Refer the client-spring-boot-starter module's README.md for how to use the spring-boot-starter mode

Examples: Integration & Configurations

you can refer to the example modules:

on how to integrate with auditor client apis. Auditor client configurations: AuditorEventConfig.kt can be provided both at startup time and during runtime. You can also refer the application.yml in example modules to understand how to use different configurations at startup time. Runtime configurations can be also seen in examples modules code.

Refer the client-spring-boot-starter's README.md to see full configuration options.

Using auditor-v1 app server

Auditor server is present inside app module. Refer the app module's README.md for how to use the app server.

Contributing: local-setup, development and testing:

Setup

All commands mentioned below are expected to be run from your project root location.

After cloning the repository in your local, you need to run the following command to install ktlintFormat git pre-commit hook:

./gradlew addKtlintFormatGitPreCommitHook

This ensures the files are formatted before checking in.

Build and test

To build the project, you need to run the following:

 ./gradlew clean build

This will build and test all the modules(core, client, app, etc). If you need to run test specifically, run following commands as per your needs:

./gradlew clean test -> Runs all unit tests
./gradlew clean integrationTest -> Runs all integrataion tests
./gradlew clean functionalTest -> Runs all functional tests

Adding/Updating dependencies

We are using refreshVersions to manage version upgrades. When you add a new dependency, please run the following:

./gradlew refreshVersionsMigrate

This will migrate the versions to versions.properties. To upgrade a specific dependency or all dependencies, run the following:

./gradlew refreshVersions

Above command will fetch the latest versions of all dependencies used in the project. you should pick the appropriate version to upgrade to. It can be done by copying the given version under comments and putting it against the said dependency property key.

Pull requests

Pull requests are always welcomed! Once your local setup is completed, and you have tested out your changes, you can raise PR against master branch.

For any queries/community support reach out to stack overflow channel:

Running the app sever

Refer the app module's README.md for how to run the app server locally

Comments
  • Upgrade dependencies to latest(stable) versions.

    Upgrade dependencies to latest(stable) versions.

    As part of this change:

    • Upgrade all the external dependencies to their latest and stable versions. This can be done by ./gradlew refreshVersions and fixing any issues if occurs during build/tests liefcycle
    maintenance 
    opened by ankur4u007 1
  • Adding Issue & PR Templates

    Adding Issue & PR Templates

    Fixes #10 Fixes #11

    Type of change

    Please delete options that are not relevant.

    • [x] This change requires a documentation update

    Checklist:

    • [x] My code follows the style guidelines of this project
    • [x] I have performed a self-review of my own code
    • [x] I have commented my code, particularly in hard-to-understand areas
    • [x] I have made corresponding changes to the documentation
    • [x] My changes generate no new warnings
    • [x] I have added tests that prove my fix is effective or that my feature works
    • [x] New and existing unit tests pass locally with my changes
    • [x] I have added examples for the new scenarios in the relevant modules
    opened by vasanthm7 1
  • chore: skip test coverage publish on PR builds

    chore: skip test coverage publish on PR builds

    Description

    Skiping test coverage publishing while building a PR

    Fixes https://github.com/lowes/auditor/issues/30

    Type of change

    Please delete options that are not relevant.

    • [x] Bug fix (non-breaking change which fixes an issue)

    Checklist:

    • [x] My code follows the style guidelines of this project
    • [x] I have performed a self-review of my own code
    • [x] I have commented my code, particularly in hard-to-understand areas
    • [x] I have made corresponding changes to the documentation
    • [x] My changes generate no new warnings
    • [x] I have added tests that prove my fix is effective or that my feature works
    • [x] New and existing unit tests pass locally with my changes
    • [x] I have added examples for the new scenarios in the relevant modules
    opened by ankur4u007 0
  • Skip test coverage publishing while building a PR

    Skip test coverage publishing while building a PR

    Is this a regression?

    Yes

    Description

    With the PR: https://github.com/lowes/auditor/pull/25 , Code climate push has been enabled for PR building step as well. This should be only run when a PR is merged or main branch is built. Hence we should remove the publishing step from PR build process

    Please provide the exception or error you saw

    No response

    Anything else?

    No response

    opened by ankur4u007 0
  • docs(readme): Fix the todo

    docs(readme): Fix the todo

    Description

    Fixes a minor todo in README.md

    Type of change

    Please delete options that are not relevant.

    • [x] This change requires a documentation update

    Checklist:

    • [x] My code follows the style guidelines of this project
    • [x] I have performed a self-review of my own code
    • [x] I have made corresponding changes to the documentation
    • [x] My changes generate no new warnings
    • [x] New and existing unit tests pass locally with my changes
    opened by ankur4u007 0
  • Integrate with Github actions

    Integrate with Github actions

    Running Builds(along with functional, integration and unit tests) should be enabled on each of following actions:

    • Any new raised PR
    • Merge to master. Keep the builds step for now. Once #1 is done, we can release and upload artifacts to maven central on each merge.
    CI 
    opened by ankur4u007 0
  • Upload artifacts to maven central

    Upload artifacts to maven central

    Build a pipeline to upload the app,client,springboot-client-starter jars to maven central. Refer the steps mentioned here: https://dzone.com/articles/publish-your-artifacts-to-maven-central and https://maven.apache.org/repository/guide-central-repository-upload.html for implementation details.

    CI 
    opened by ankur4u007 0
  • Implement jacoco code coverage checks for PR builds

    Implement jacoco code coverage checks for PR builds

    As part of this issue:

    • Implement a rule check to fail PR builds if the new code coverage is less < 80 percent. Refer - https://docs.gradle.org/current/userguide/jacoco_plugin.html for details
    CI 
    opened by ankur4u007 5
Releases(v1.1.0)
  • v1.1.0(Dec 9, 2022)

    What's Changed

    • chore: Added CODEOWNERS by @spoorthinb1 in https://github.com/lowes/auditor/pull/21
    • docs: Update README.md with additional badges by @ankur4u007 in https://github.com/lowes/auditor/pull/22
    • Adding Issue & PR Templates by @vasanthm7 in https://github.com/lowes/auditor/pull/26
    • docs(readme): Fix the todo by @ankur4u007 in https://github.com/lowes/auditor/pull/27
    • docs: enable coverage reports upload to code climate by @ankur4u007 in https://github.com/lowes/auditor/pull/25
    • chore: skip test coverage publish on PR builds by @ankur4u007 in https://github.com/lowes/auditor/pull/31
    • Fix #28: Upgrading dependencies to latest stable version by @Razdeep in https://github.com/lowes/auditor/pull/29

    New Contributors

    • @vasanthm7 made their first contribution in https://github.com/lowes/auditor/pull/26

    Full Changelog: https://github.com/lowes/auditor/compare/v1.0.2...v1.1.0

    Source code(tar.gz)
    Source code(zip)
  • v1.0.2(Mar 24, 2022)

    What's Changed

    • docs: Update badges with relevant links by @ankur4u007 in https://github.com/lowes/auditor/pull/18
    • docs: Readme Files Update by @akhilsunilkumar in https://github.com/lowes/auditor/pull/16
    • build: adding starts with 'v' check for build tags by @akhilsunilkumar in https://github.com/lowes/auditor/pull/20

    Full Changelog: https://github.com/lowes/auditor/compare/v1.0.1...v1.0.2

    Source code(tar.gz)
    Source code(zip)
  • v1.0.1(Mar 21, 2022)

    What's Changed

    • docs: rectified typos in README.md by @Razdeep in https://github.com/lowes/auditor/pull/6
    • docs: Update readme with badges by @ankur4u007 in https://github.com/lowes/auditor/pull/8
    • build: Updating the publish action to push to release by @akhilsunilkumar in https://github.com/lowes/auditor/pull/12

    New Contributors

    • @Razdeep made their first contribution in https://github.com/lowes/auditor/pull/6
    • @ankur4u007 made their first contribution in https://github.com/lowes/auditor/pull/8

    Full Changelog: https://github.com/lowes/auditor/compare/v1.0.0...v1.0.1

    Source code(tar.gz)
    Source code(zip)
  • v1.0.0(Mar 21, 2022)

    What's Changed

    • build: Added gradle.yml by @spoorthinb1 in https://github.com/lowes/auditor/pull/4
    • feat: Added github actions script to auto build and publish on tag re… by @akhilsunilkumar in https://github.com/lowes/auditor/pull/7

    New Contributors

    • @spoorthinb1 made their first contribution in https://github.com/lowes/auditor/pull/4

    Full Changelog: https://github.com/lowes/auditor/commits/v1.0.0

    Source code(tar.gz)
    Source code(zip)
Owner
Lowe's
Lowe's Companies, Inc. - Technology
Lowe's
Com.hhvvg.anytext - An application provides features to modify any TextView in any other applications

AnyText What's this This application provides features to modify any TextView in

null 6 Dec 2, 2022
Simple(vanilla) yet 'Do it all' place picker for your place picking needs in Android

Vanilla Place Picker Vanilla Place Picker provides a UI that displays an interactive map to get the place details and Autocomplete functionality, whic

MindInventory 115 Dec 21, 2022
fusion4j - declarative rendering language for the JVM based on Neos.Fusion

fusion4j - declarative rendering language for the JVM based on Neos.Fusion Supports the Neos Fusion syntax/semantic as described in the official Neos

sandstorm 2 May 3, 2022
Create an application with Kotlin/JVM and Kotlin/JS, and explore features around code sharing, serialization, server- and client

Practical Kotlin Multiplatform on the Web 본 저장소는 코틀린 멀티플랫폼 기반 웹 프로그래밍 워크숍(강좌)을 위해 작성된 템플릿 프로젝트가 있는 곳입니다. 워크숍 과정에서 코틀린 멀티플랫폼을 기반으로 프론트엔드(front-end)는 Ko

SpringRunner 14 Nov 5, 2022
Create an application with Kotlin/JVM and Kotlin/JS, and explore features around code sharing, serialization, server- and client

Building a Full Stack Web App with Kotlin Multiplatform 본 저장소는 INFCON 2022에서 코틀린 멀티플랫폼 기반 웹 프로그래밍 핸즈온랩을 위해 작성된 템플릿 프로젝트가 있는 곳입니다. 핸즈온 과정에서 코틀린 멀티플랫폼을

Arawn Park 19 Sep 8, 2022
🔴 A non-deterministic finite-state machine for Android & JVM that won't let you down

HAL is a non-deterministic finite-state machine for Android & JVM built with Coroutines StateFlow and LiveData. Why non-deterministic? Because in a no

Adriel Café 73 Nov 28, 2022
:blowfish: An Android & JVM key-value storage powered by Protobuf and Coroutines

PufferDB PufferDB is a ⚡ key-value storage powered by Protocol Buffers (aka Protobuf) and Coroutines. The purpose of this library is to provide an eff

Adriel Café 94 Dec 7, 2022
🚟 Lightweight, and simple scheduling library made for Kotlin (JVM)

Haru ?? Lightweight, and simple scheduling library made for Kotlin (JVM) Why did you build this? I built this library as a personal usage library to h

Noel 13 Dec 16, 2022
A injection minecraft cheat using jvm attach api

Luminous A injection minecraft cheat using jvm attach api Website: https://lumi.getfdp.today Build We used a thing called Wrapper to make development

null 24 Dec 21, 2022
Yet Another Native Loader for the JVM.

yanl - yet another native loader Yet another Native library extractor/loader for the JVM, written in Kotlin. why other libraries simply don't fit my n

Stardust Enterprises 5 Dec 23, 2022
A Template for a Github Actions Pipeline for building and publishing Gradle-JVM Applications

github-actions-cd-template-jvm A Template for a Github Actions Pipeline for building and publishing Gradle-JVM Applications It build a executable shad

Raphael Panic 0 Dec 5, 2021
Run Kotlin/JS libraries in Kotlin/JVM and Kotlin/Native programs

Zipline This library streamlines using Kotlin/JS libraries from Kotlin/JVM and Kotlin/Native programs. It makes it possible to do continuous deploymen

Cash App 1.5k Dec 30, 2022
Yaspeller-kt - Asynchronous Yandex.Speller API wrapper for Kotlin/JVM.

yaspeller-kt Asynchronous Yandex.Speller API wrapper for Kotlin/JVM. Installation repositories { maven { url 'https://jitpack.io' }

Mikhail Koshkin 6 Jun 27, 2022
Port immer for kotlin/jvm

1. kimmer Port https://github.com/immerjs/immer for kotlin/jvm (requires kotlin 1.5+). Immer is the winner of the "Breakthrough of the year" React ope

null 37 Dec 9, 2022
Blog implemented via the Storyblok Kotlin Multiplatform SDK (Android, JVM)

storyblok-mp-SDK-blog ... a showcase of using the Storyblok Kotlin Multiplatform Client to build a blog application (Android, JVM) What's included ??

Mike Penz 5 Sep 28, 2022
A property/method accessor library for the JVM, written in Kotlin

unlok - unlock your JVM a property/method accessor library for the JVM, written in Kotlin. how to import you can import unlok from maven central just

xtrm 2 Oct 27, 2022
A Kotlin library providing a simple, high-performance way to use off-heap native memory in JVM applications.

native_memory_allocator A library which uses sun.misc.Unsafe to allocate off-heap native memory. Motivation The goal of this project is to provide a s

Target 5 Dec 8, 2022
🎑 Up to date IANA timezone database library for Kotlin (JVM, JS, Native)

?? IANA Timezone Library for Kotlin Multiplatform Up to date IANA timezone database library for Kotlin (JVM, JS, Native) Usage import org.noelware.ian

Noelware 3 Jun 18, 2022
A simplified interface for interacting with in-memory cache implementations on the JVM

This library provides a simplified interface for interacting with in-memory cache implementations on the JVM. Think: "SLF4J but for caching"

null 5 Nov 29, 2022