Skip to content

Commit

Permalink
Feat/logging btp (#51)
Browse files Browse the repository at this point in the history
* feat: logging on BTP

* fix: owasp checks
  • Loading branch information
jurosens authored Jun 9, 2021
1 parent fcbf382 commit b696daf
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 2 deletions.
4 changes: 4 additions & 0 deletions owasp/suppressions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,8 @@
<cve>CVE-2018-1272</cve>
<cve>CVE-2020-5421</cve>
</suppress>
<suppress>
<!-- Vulnerability impacts WebFlux apps only and can be ignored here. -->
<cve>CVE-2021-22118</cve>
</suppress>
</suppressions>
6 changes: 5 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<bcpkix.version>1.68</bcpkix.version>
<okhttp.version>4.9.1</okhttp.version>
<shedlock.version>4.23.0</shedlock.version>
<dgc.lib.version>0.4.5</dgc.lib.version>
<dgc.lib.version>0.5.0</dgc.lib.version>
<!-- plugins -->
<plugin.checkstyle.version>3.1.2</plugin.checkstyle.version>
<plugin.sonar.version>3.6.1.1688</plugin.sonar.version>
Expand Down Expand Up @@ -256,6 +256,10 @@
<groupId>com.sap.cloud.sdk.cloudplatform</groupId>
<artifactId>scp-cf</artifactId>
</dependency>
<dependency>
<groupId>com.sap.hcp.cf.logging</groupId>
<artifactId>cf-java-logging-support-logback</artifactId>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ private boolean trustListItemSignedByCa(TrustListItemDto certificate, X509Certif
try {
return dcs.isSignatureValid(verifier);
} catch (RuntimeOperatorException | CertException e) {
log.debug("Could not verify that certificate was issued by ca. Certificate: {}, CA: {}",
log.trace("Could not verify that certificate was issued by ca. Certificate: {}, CA: {}",
dcs.getSubject().toString(), ca.getSubject().toString());
return false;
}
Expand Down
25 changes: 25 additions & 0 deletions src/main/resources/logback-spring.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<configuration debug="false" scan="false">

<springProfile name="!btp">
<include resource="org/springframework/boot/logging/logback/defaults.xml"/>
<include resource="org/springframework/boot/logging/logback/console-appender.xml"/>

<logger name="eu.europa.ec" level="DEBUG"/>
<root level="INFO">
<appender-ref ref="CONSOLE"/>
</root>
</springProfile>

<springProfile name="btp">
<appender name="STDOUT-JSON" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="com.sap.hcp.cf.logback.encoder.JsonEncoder"/>
</appender>

<root level="${LOG_ROOT_LEVEL:-WARN}">
<appender-ref ref="STDOUT-JSON"/>
</root>

<logger name="eu.europa.ec" level="DEBUG"/>
</springProfile>

</configuration>

0 comments on commit b696daf

Please sign in to comment.