The interconnected digital landscape your organization is operating in mandates the secure and trusted exchange of user identity information between the applications and services you’re using. You frequently need to share user data, such as login status or profile details, between client-side applications and backend systems, or between server side components.
JSON Web Tokens (JWT) offer a robust, standardized solution to protect against tampering and unauthorized access by enabling secure and efficient identity transfer within your SAP Customer Data Cloud environment.
JWTs help you safeguard sensitive user data and streamline authentication and authorization workflows.
What is a JSON Web Token (JWT)?

A JSON Web Token (JWT) is an open standard (RFC 7519) that defines a compact and self-contained way to securely transmit information between parties using JSON objects. The information JWTs carry can be verified and trusted because it is digitally signed. This digital signature protects the token from tampering and ensures its authenticity.
JWTs can be signed using different cryptographic algorithms. Common methods include using a shared secret key with the HMAC (Hash-based Message Authentication Code) algorithm or employing a public/private key pair using RSA (Rivest–Shamir–Adleman) for asymmetric encryption. The choice of algorithm depends on the security requirements and the environment in which the JWT is used.
For more information, refer to the Introduction to JSON Web Tokens documentation.
Why use JSON Web Tokens?
The primary motivation for using JWTs revolves around enhancing security and efficiency in identity management. Here are key reasons and benefits:
- Preventing Attacks – JWTs are designed to prevent man-in-the-middle attacks and data tampering. The digital signature ensures that once a token is issued, any alteration to its content will invalidate the signature, making the tampering detectable.
- Customer Data Cloud Support – SAP Customer Data Cloud (CDC) supports the generation of JWTs, both on the client SDK and through its REST API. This integration allows for seamless incorporation of JWTs into your CDC-powered applications.
- Client-Side Customization – Client-side JWTs can be requested after a user logs in, allowing for the inclusion of custom claims (additional fields and an expiration time). This flexibility is valuable for tailoring the token to specific application needs.
- Integration and Efficiency – JWTs are lightweight, small, and quick to process, making them an excellent integration option for various systems. They are widely adopted by major platforms and devices, including Google apps, Amazon Alexa, and IoT devices, highlighting their versatility and reliability.
- Avoiding Extra API Calls – By embedding relevant user information (claims) directly within the JWT, applications can avoid making additional calls to CDC to retrieve basic user details (like UID or profile fields). This reduces network overhead and improves performance.
JWT Use Example

Call the accounts.getJWTPublicKey API with a site's API Key to retrieve a Public Certificate in JWK format. You can then use the same Public Key for signature validation.
You can also manually test whether a JWT is valid by using the Gigya id_token Validator






