Compare commits
14 Commits
v1.1.5
...
b6bfcc0290
| Author | SHA1 | Date | |
|---|---|---|---|
| b6bfcc0290 | |||
| 4e34267856 | |||
| 5f246d79a6 | |||
| caea64a9bf | |||
| 90369a4cd1 | |||
| e29228a84b | |||
| cd13fb8e15 | |||
| 915034315c | |||
| fb094d2e8d | |||
| e61d4a15a6 | |||
| 917246f877 | |||
| a53c765c9c | |||
| 0be6b6bcc1 | |||
| 9a4b3a19f8 |
43
pom.xml
43
pom.xml
@@ -6,7 +6,7 @@
|
||||
<groupId>com.mattrixwv.cipherstream</groupId>
|
||||
<artifactId>cipherstream-api</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>1.1.5</version>
|
||||
<version>1.1.10</version>
|
||||
<name>CipherStream API</name>
|
||||
<url>https://api.cipherstream.mattrixwv.com</url>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>3.3.2</version>
|
||||
<version>3.5.4</version>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
@@ -56,7 +56,7 @@
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>1.18.34</version>
|
||||
<version>1.18.38</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
<version>2.0.16</version>
|
||||
<version>2.0.17</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
@@ -73,7 +73,7 @@
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-layout-template-json</artifactId>
|
||||
<version>2.23.1</version>
|
||||
<version>2.24.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.lmax</groupId>
|
||||
@@ -85,14 +85,14 @@
|
||||
<dependency>
|
||||
<groupId>org.aspectj</groupId>
|
||||
<artifactId>aspectjweaver</artifactId>
|
||||
<version>1.9.22.1</version>
|
||||
<version>1.9.24</version>
|
||||
</dependency>
|
||||
|
||||
<!--My libraries-->
|
||||
<dependency>
|
||||
<groupId>com.mattrixwv</groupId>
|
||||
<artifactId>cipher-stream-java</artifactId>
|
||||
<version>1.3.6</version>
|
||||
<version>1.3.8</version>
|
||||
</dependency>
|
||||
|
||||
<!--Tests-->
|
||||
@@ -110,7 +110,7 @@
|
||||
<dependency>
|
||||
<groupId>org.simplify4u</groupId>
|
||||
<artifactId>slf4j2-mock</artifactId>
|
||||
<version>2.3.0</version>
|
||||
<version>2.4.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
@@ -125,7 +125,7 @@
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-enforcer-plugin</artifactId>
|
||||
<version>3.5.0</version>
|
||||
<version>3.6.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>enforce-maven</id>
|
||||
@@ -145,7 +145,7 @@
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-clean-plugin</artifactId>
|
||||
<version>3.4.0</version>
|
||||
<version>3.5.0</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
@@ -155,7 +155,7 @@
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.13.0</version>
|
||||
<version>3.14.0</version>
|
||||
<configuration>
|
||||
<compilerArgs>
|
||||
<arg>-Xlint:all</arg>
|
||||
@@ -167,7 +167,7 @@
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>3.3.1</version>
|
||||
<version>3.5.3</version>
|
||||
<configuration>
|
||||
<skipTests>${skip.unit.tests}</skipTests>
|
||||
<excludes>
|
||||
@@ -186,17 +186,17 @@
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-install-plugin</artifactId>
|
||||
<version>3.1.2</version>
|
||||
<version>3.1.4</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-deploy-plugin</artifactId>
|
||||
<version>3.1.2</version>
|
||||
<version>3.1.4</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-failsafe-plugin</artifactId>
|
||||
<version>3.3.1</version>
|
||||
<version>3.5.3</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<configuration>
|
||||
@@ -214,17 +214,17 @@
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-site-plugin</artifactId>
|
||||
<version>3.12.1</version>
|
||||
<version>3.21.0</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-project-info-reports-plugin</artifactId>
|
||||
<version>3.6.2</version>
|
||||
<version>3.9.0</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>versions-maven-plugin</artifactId>
|
||||
<version>2.17.1</version>
|
||||
<version>2.18.0</version>
|
||||
<configuration>
|
||||
<rulesUri>file://${session.executionRootDirectory}/version-rules.xml</rulesUri>
|
||||
</configuration>
|
||||
@@ -233,12 +233,12 @@
|
||||
<plugin>
|
||||
<groupId>org.sonarsource.scanner.maven</groupId>
|
||||
<artifactId>sonar-maven-plugin</artifactId>
|
||||
<version>4.0.0.4121</version>
|
||||
<version>5.1.0.4751</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.jacoco</groupId>
|
||||
<artifactId>jacoco-maven-plugin</artifactId>
|
||||
<version>0.8.12</version>
|
||||
<version>0.8.13</version>
|
||||
<configuration>
|
||||
<excludes>
|
||||
<exclude>**/CipherStreamAPI*</exclude>
|
||||
@@ -264,7 +264,7 @@
|
||||
<plugin>
|
||||
<groupId>org.owasp</groupId>
|
||||
<artifactId>dependency-check-maven</artifactId>
|
||||
<version>10.0.3</version>
|
||||
<version>12.1.3</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>none</phase>
|
||||
@@ -278,6 +278,7 @@
|
||||
<format>json</format>
|
||||
<format>html</format>
|
||||
</formats>
|
||||
<nvdApiServerId>nvd</nvdApiServerId>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
|
||||
@@ -37,7 +37,7 @@ public class CipherStreamLoggingAspect{
|
||||
@AfterReturning(pointcut = "cipherMethod() && postFunction()", returning = "returnedJson")
|
||||
public void getCipherInfo(ObjectNode returnedJson){
|
||||
//Extract JSON to MDC
|
||||
returnedJson.fields().forEachRemaining(entry -> {
|
||||
returnedJson.properties().forEach(entry -> {
|
||||
if(entry.getValue().isTextual()){
|
||||
MDC.put(entry.getKey(), entry.getValue().asText());
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.mattrixwv.cipherstream.config;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.StringJoiner;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.slf4j.MDC;
|
||||
import org.springframework.lang.NonNull;
|
||||
@@ -37,6 +38,9 @@ public class FullFilter extends OncePerRequestFilter{
|
||||
if(request.getHeader("X-Request-Id") != null){
|
||||
MDC.put("requestId", request.getHeader("X-Request-Id"));
|
||||
}
|
||||
else{
|
||||
MDC.put("requestId", UUID.randomUUID().toString());
|
||||
}
|
||||
|
||||
//Get IP address
|
||||
if(request.getHeader("X-Forwarded-For") != null){
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"msg_timestamp": {
|
||||
"timestamp": {
|
||||
"$resolver": "timestamp",
|
||||
"pattern": {
|
||||
"format": "yyyy-MM-dd HH:mm:ss.SSSZ"
|
||||
@@ -9,10 +9,6 @@
|
||||
"$resolver": "level",
|
||||
"field": "name"
|
||||
},
|
||||
"requestId": {
|
||||
"$resolver": "mdc",
|
||||
"key": "requestId"
|
||||
},
|
||||
"logger": {
|
||||
"$resolver": "logger",
|
||||
"field": "name"
|
||||
|
||||
@@ -56,7 +56,7 @@ public class CipherStreamControllerIntegrationTestBase{
|
||||
|
||||
protected void verifyAspectLogging(ObjectNode jsonNode){
|
||||
//Verify the MDC
|
||||
jsonNode.fields().forEachRemaining(entry -> {
|
||||
jsonNode.properties().forEach(entry -> {
|
||||
if(entry.getValue().isTextual()){
|
||||
verify(mdc, times(1)).put(entry.getKey(), entry.getValue().asText());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user