Skip to content

lsd-consulting/lsd-distributed-interceptors

Repository files navigation

semantic-release

lsd-distributed-interceptors

GitHub Codecov

CI Nightly Build GitHub release Maven Central

A set of interceptors gathering information from distributed sources for the LSD library.

Interceptor diagram

Here is a sample of an LSD that this library can generate:

LSD

along with the source for the LSD:

LSD Source

It also generates a component diagram:

Component diagram

Usage

To use the lsd-distributed-interceptors library just add one or more of the available modules (depending on the technology used by the project) to the production dependencies:

implementation "io.github.lsd-consulting:lsd-distributed-interceptors-feign:<version>"
implementation "io.github.lsd-consulting:lsd-distributed-interceptors-rabbitmq:<version>"
implementation "io.github.lsd-consulting:lsd-distributed-interceptors-spring-messaging:<version>"
implementation "io.github.lsd-consulting:lsd-distributed-interceptors-spring-web:<version>"

and one of the storage dependencies:

implementation "io.github.lsd-consulting:lsd-distributed-http-connector:<version>"

or

implementation "io.github.lsd-consulting:lsd-distributed-mongodb-connector:<version>"

or

implementation "io.github.lsd-consulting:lsd-distributed-postgres-connector:<version>"

and then configure through the available properties.

Properties

The following properties can be overridden by setting System or Environment properties.

Property Name Default Required Description
lsd.dist.obfuscator.sensitiveHeaders None NO A comma delimited list of header names that will be removed before storing in the database, eg. Authorization, JWT
lsd.dist.threadPool.size 16 NO corePoolSize of the ThreadPoolExecutor for enqueueuing intercepted interactions. maximumPoolSize is set as corePoolSize * 10

Obfuscation

If there is need to obfuscate sensitive information sent through HTTP headers, it's possible to set the headers to be obfuscated through a property:

lsd.dist.obfuscator.sensitiveHeaders=Authorization, SomeOtherHeaderName

If the value is not set or empty, there will be no obfuscation applied.