The integrity value defined in the JSON file is a hash of the JavaScript file (for example, main.js). It is used to ensure that the file has not been modified, corrupted, or replaced.
During development, integrity validation is typically disabled (ignoreIntegrity: true).
In production scenarios, integrity validation should be enabled to ensure that only trusted and unchanged files are loaded.
Exercise
In this exercise, you will use integrity values for your custom widget files and observe how SAP Analytics Cloud validates them.
You will:
- use integrity values for the widget files
- create a new file (sign.js)
- apply the integrity configuration
- verify that the widget loads correctly based on integrity settings
Result
The custom widget is ready for production use with integrity validation enabled. If the integrity value does not match the file content, the widget will not load.
Summary
Integrity validation ensures that widget resources are unchanged and trusted, which is important for production scenarios.