14 Commits

Author SHA1 Message Date
b6bfcc0290 Update version number 2025-08-10 11:27:41 -04:00
4e34267856 Fix broken logging 2025-08-10 11:27:20 -04:00
5f246d79a6 Update snapshot version 2025-08-10 11:07:55 -04:00
caea64a9bf Update dependencies 2025-08-10 11:01:39 -04:00
90369a4cd1 Update logging 2025-08-09 23:30:42 -04:00
e29228a84b Update snapshot version 2025-05-25 14:51:03 -04:00
cd13fb8e15 Update dependencies and plugins 2025-05-25 14:47:08 -04:00
915034315c Update snapshot version 2025-02-17 14:33:16 -05:00
fb094d2e8d Update dependencies 2025-02-17 14:31:59 -05:00
e61d4a15a6 Update snapshot version 2025-01-11 12:27:51 -05:00
917246f877 Update version number 2025-01-11 12:25:24 -05:00
a53c765c9c Update dependencies and plugins 2025-01-11 12:22:12 -05:00
0be6b6bcc1 Update with nvd api key 2024-08-16 23:34:39 -04:00
9a4b3a19f8 Update snapshot version 2024-08-12 21:31:55 -04:00
5 changed files with 29 additions and 28 deletions

43
pom.xml
View File

@@ -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>

View File

@@ -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());
}

View File

@@ -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){

View File

@@ -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"

View File

@@ -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());
}