cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to Log Client IP Addresses Correctly in SAP CDC Audit Logs

SAPSupport
Employee
Employee
0 Kudos
841
Hi, we are facing an issue where we are expecting the Client app IP address to be logged correctly in the Audit logs. Instead of logging the client IP address, it is currently logging the Content Delivery Network (CDN) (for example: Cloudflare) IP address, which is not desired. Somehow, we are losing the client IP.
Please guide us to resolve this issue, "how to log client mobile App IP correctly in CDC?

------------------------------------------------------------------------------------------------------------------------------------------------
Learn more about the SAP Support user and program here.
View Entire Topic
SAPSupport
Employee
Employee
0 Kudos

Why is it not logging client IP in CDC Audit logs?

  • When using a Content Delivery Network (CDN) like Cloudflare, the IP address captured by CDC is the IP address of the CDN server that forwarded the request, not the client's IP address. This is because the request is proxied through the CDN, which masks the client's original IP address.

How can we log client IP correctly in CDC Audit Logs?

  • To log the client's IP address correctly in CDC audit logs, you can include a custom header named "X-Gigya-Client-IP" in your API requests to CDC.
  • Here's an example of how to add this header using our PHP SDK: Auditing User's IP Address from REST Calls.

By including the "X-Gigya-Client-IP" header in API requests, you should be able to log the client's IP address correctly in CDC audit logs. You then see this value available in the audit.search endpoint under "httpReq.Headers".