augustd / owasp-security-logging

OWASP Security Logging library for Java
https://www.owasp.org/index.php/OWASP_Security_Logging_Project
Apache License 2.0
115 stars 35 forks source link

security-logging-logback is not compatible with logback-classic version 1.3.x (partially) #78

Closed friedeas closed 1 year ago

friedeas commented 1 year ago

In version 1.3.0 of logback-classic the method isCyclic() was introduced for the interface ch.qos.logback.classic.spi.IThrowableProxy, trying to use the org.owasp.security.logging.mask.CRLFThrowableConverter in this environment will result in the following error message:

java.lang.AbstractMethodError: Receiver class org.owasp.security.logging.mask.CRLFThrowableProxy does not define or inherit an implementation of the resolved method 'abstract boolean isCyclic()' of interface ch.qos.logback.classic.spi.IThrowableProxy.

Spring Boot 3.1 is using logback-classic 1.4.7, this prevents the usage of the CRLFThrowableConverter in the current version 1.1.7.

I think a new release of security-logging-logback using logback-classic 1.4.x could address this issue.

friedeas commented 1 year ago

I tried to do the necessary changes here: https://github.com/augustd/owasp-security-logging/compare/master...friedeas:owasp-security-logging:develop

I needed to change more than expected because of the related changes

augustd commented 1 year ago

This is awesome! Thank you @friedeas !

Can you please send a pull request?

friedeas commented 1 year ago

Sure, please review my changes https://github.com/augustd/owasp-security-logging/pull/79 I did just one test with a Spring Boot 3.1.2 project, using this converters CRLFThrowableConverter, CRLFConverter and MaskingConverter