Validating Custom Widget Integrity

Objective

After completing this lesson, you will be able to perform validations on the custom widget package to ensure file integrity and secure loading in SAP Analytics Cloud.

Integrity Validation

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:

  1. use integrity values for the widget files
  2. create a new file (sign.js)
  3. apply the integrity configuration
  4. 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.