SAP / SAP/cloud-sdk-java

Newly introduced `CsrfTokenInterceptor` is producing large amount of warning logs

Open
#1,270 3 comments 0 reactions 1 assignee View on GitHub

@ricardosrib is already working on this.

Since Sep 14, 2026.

bug
Dominant language
Java
Stars
41
Forks
33
Avg merge
18h 34m
Merged PRs (30d)
19

Description

Describe the Bug

We are consuming the com.sap.cloud.sdk.sdk-bom dependency in our CAP Java microservices. We recently upgraded to version 5.34.0 (from 5.33.0) and started to observe a large amount of warning logs of type: “Target system did not respond with a x-csrf-token header. The subsequent request may fail if a CSRF token is required.” Those seem to originate from the newly introduced CsrfTokenInterceptor.

Unfortunately, we could not find any additional information regarding this change in the release notes or similar. Apart from this, we have some concerns that this results in a big number of requests that are now emitted from this class to the request source to obtain the csrf header.

Best regards,
Felix Starke

Steps to Reproduce

As we are working on an SAP internal project, kindly reach out for further information or discussions.

Expected Behavior

Can you please clarify the need of having this Interceptor and this being an actual warning log. Furthermore, kindly clarify that the amount of HEAD-requests triggered by this is necessary.

Screenshots

No response

Used Versions
  • Java and Maven version via mvn --version: ...
  • SAP Cloud SDK version: 5.34.0
  • Spring Boot or CAP version: Spring Boot 3.5.17 with CDS Services 4.9.4
Code Examples

No response

Stack Trace

No response

Log File

No response

Affected Development Phase

Production

Impact

Impaired

Timeline

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.