Validation of Easy Event
The easy events are validated before processing and there is a chain of validation based on what type of event it is. If the validation for the easy event passes then the event can be processed otherwise the validation failure of the event is captured and the event cannot be processed.
The figure below represents the validation chains for the Repository and Extension events.
Figure | Easy Event Validation Chain
Validators in Repository Event Validation Chain
The repository validation chain is applicable to repository events. Refer to the Repository Events documentation to know the supported repository events.
The validators in the repository validation chain does the following type of validations:
Validate if Easy is Enabled
This validation checks if the Easy Extension Framework is enabled in the running system. This check is done by evaluating the property easy.enabled
if the value of the property is true
then the validation heck passes otherwise fails. The validator class AbstractEasyEventValidator
represents this validation.
Validate if Repository Hash is valid
This validation evaluates the security of Easy Repository configurations against the configured checksum hash for the Easy repository. If the checksum hash matches then the validation passes otherwise this validation fails. The validator class EasyRepositoryHashValidator
represents this validation. For information on how to secure and Easy Repository refer to the Securing the repository configurations documentation.
Validators in Extension Event Validation Chain
The extension validation chain is applicable to extension events. Refer to the Extension Events documentation to know the supported extension events.
The validators in the extension validation chain includes all the validations from the repository validation chain. In addition, following additional type of validations are performed:
Validate if the Easy Repository is checked out
The checkout of the Eay Repository happens in the HYBRIS_TEMP_DIR
. The temp directory is cleaned up on execution of the clean
target of SAP Commerce build framework. Similarly, at SAP Commerce Cloud, with a new deployment, restart of the service or with scale-up events, new pods may be provisioned. With the provisioning of the new pods the existing checked out repository code may not exist. In such scenarios, the extension events specially the INSTALL_EXTENSION
event may fail while copying the easy extension to the data directory. For more information on the installer process refer to the Easy Installer documentation.
To ensure a preventive validation for the installation, this validator checks if the repository is checked out in the HYBRIS_TEMP_DIR
. The validator class EasyRepositoryCheckoutStatusValidator
represents this validation,
Validate if the event meets the Extension Event Prerequisites
There are prerequisites for each of the extension event. So, it becomes necessary to ensure that the prerequisites are met. The validator class EasyExtensionPrerequisitesValidator
represents this validation,
Validate if Extension Hash is valid
This validation evaluates the security of Easy Extension files at the file system if these are maliciously modified during the reloading or uninstallation of Easy Extension. If the checksum hash calculated at run time matches with the precalculated hash at installation of Easy Extension then the validation passes otherwise this validation fails. The validator class EasyExtensionHashValidator
represents this validation.