Skip to content
RUMLRUML

Open Format for Digital Law

3.8 Integrity Validation

3.8 Integrity Validation

Hashing, signatures, and integrity assurance are container-level responsibilities and are specified in Chapter 7. The RUML JSON file contains no hash or signature of itself; for the hashes of other content it may contain, see 3.2.4.

Structural validation on load:

Implementations MUST check the structural validity when loading a RUML file:

  1. JSON validity: The file MUST be valid JSON (Rule FMT-02FMT-02 The file MUST be valid JSON (RFC 8259), and its root MUST be an object.)
  2. Required fields: All required fields defined in Chapter 3.3 MUST be present (Rule META-01META-01 metadata MUST have id, version, created, modified and status.)
  3. Type conformity: Field values MUST conform to the data types defined in Chapter 3.2 (Rule FMT-13FMT-13 Every field value MUST have the data type 3.2.3 gives it: a Number a JSON number, a Boolean a JSON Boolean, a DateTime an RFC 3339 date-time, an Enum one of the values defined for the field, an Object a JSON object, an Array a JSON array.)
  4. Node references: All children references MUST point to existing LexIDs in the nodes object (Rule NODE-10NODE-10 Every entry of children MUST be a key of rulemap.nodes.)
  5. UUID uniqueness: The id of every node and metadata.id MUST be unique within the file (Rule NODE-08NODE-08 The id of a node MUST NOT equal the id of another node or metadata.id.). A UUID that refers to another node or file, such as replacedBy or a tree reference, repeats that id

Validation on changes:

On every change to a RUML file, the following MUST be done:

  1. The modified field must be updated
  2. Structural validity must be re-verified

Hash verification and signature checking are performed at container level. Details see Chapter 7.