DataMasque Portal

Managing Ruleset Libraries

Overview

To access the ruleset libraries page, click the Ruleset Libraries Ruleset Libraries button button in the left navigation menu. This page lists all libraries and allows filtering by name and/or namespace.

Library list page

Add a new library

To add a library, click the Add Library button at the bottom right of the libraries page. This opens the library editor, where you can set the library's name, namespace, and YAML content.

The library name must be unique within its namespace. Library names may be up to 255 characters long and must not contain slashes.

The namespace is optional and can be used to organise related libraries into groups. Namespaces can contain slashes to create a hierarchy, for example sales/2026. For convenience, the namespace field is a dropdown list. You can select a namespace used by another library, or enter a new one.

Library editor

View and edit a library

To edit a library, click the edit Edit button icon next to the library you wish to modify. The library editor will open with the library's current YAML content.

Users who have view-only access (Mask Builders without the manage libraries permission) will see a view View button icon instead, which opens the library in read-only mode.

While a library is being edited, its validation status changes to unknown (shown as a question mark icon Unknown validation status). The library is revalidated when it is saved. If the library becomes invalid, any rulesets that depend on it will also become invalid.

The library editor uses the same YAML editor as the ruleset editor. Refer to Ruleset YAML editor for details on editor shortcuts, autocomplete, and formatting.

Delete a library

To delete a library, click the delete Delete button icon next to the library on the libraries page. You will be prompted for confirmation before the library is deleted.

Note: If the library is currently imported by one or more active rulesets, deleting it will cause those rulesets to become invalid, as they will no longer be able to resolve their $ref references to this library.

Push/Pull a library

This feature allows you to push the content of a library to a Git source code repository, and to pull the content of a library from a specific commit. Each library is managed independently as its own Git unit.

Prerequisites

  • You must have configured a Git repository where you want to push and pull library files. Refer to Git Repository Settings.
  • You must have uploaded your Git SSH key on the My Account page. Refer to Git SSH Key Information.
  • The library must have a name specified.

Push a library

To push a library file to the remote repository, follow these steps:

  1. Click the Git button to open the Push/Pull Library dialog, and navigate to the Push tab.
  2. The dialog displays the full remote path that the library will be pushed to, including the namespace folder structure (e.g. /fol1/fol2/libraries/pii/emails.yml).
  3. Enter the commit message in the provided field.
  4. Click the Push button to proceed. The current content of the YAML editor will be pushed to the remote repository.

Note that at least one change to the library YAML is required for the push to succeed. DataMasque will reject any attempt to push a library that is identical to the latest version in the repository.

Push Library

Pull a library

To fetch the content of a library file from the remote repository at a specified path and commit, follow these steps:

  1. Click the Git button to open the Push/Pull Library dialog, and navigate to the Pull tab.
  2. In the dropdown box, you will see a list of library files organised by namespace folder under the libraries/ directory. Only files with .yml or .yaml extensions are shown. Choose the desired file, and the commit versions for that file will be displayed in the table below. You can reload the file list and commit versions by clicking the Refresh Git Commits button.
  3. Choose the desired version of the selected file from the list.
  4. Optionally, check the checkbox to overwrite the current library name and namespace. The namespace and name are inferred from the selected file path (e.g. selecting libraries/pii/emails.yml sets the namespace to pii and the name to emails). When pulling into a new blank library, this option is always enabled and cannot be unchecked.
  5. Click the Pull button.
  6. Upon a successful pull operation, the content of the selected remote file version will replace the existing content in the YAML editor.

Pull Library