Configuration
In this guide, you'll configure DataMasque to use the optional DataMasque AI Engine,
unlocking the ai_detect matcher for AI-powered entity detection.
Note: The DataMasque AI Engine is currently a preview feature.
For a preview build please contact support@datamasque.com.
Setting up the DataMasque AI Engine
Important: DataMasque must be installed before installing the DataMasque AI Engine.
Follow the instructions in the README.md bundled with the DataMasque AI Engine to set it up.
Connecting to the DataMasque AI Engine
Getting a User Token
First, obtain a User Token by logging in via the API. See POST /api/auth/token/login/ for details.
Setting the AI Engine URL
Send a PATCH request to /api/settings/ with the dm_ai_engine_url field:
curl -X PATCH "https://<your-datamasque-host>/api/settings/" \
-H "Authorization: Token <your-user-token>" \
-H "Content-Type: application/json" \
-d '{"dm_ai_engine_url": "http://<ai-engine-host>:9021"}'
Note: Add
-kfor self-signed certificates.
Replace:
<your-datamasque-host>with your DataMasque instance hostname<your-user-token>with the token obtained from the login step<ai-engine-host>with your AI Engine's hostname
The default port for the DataMasque AI Engine is 9021.
This setting applies to all masking runs by default. For more information about the settings API, see the API Endpoints documentation.
Verification
You can verify that the setting is configured via the DataMasque web interface:
- Navigate to the Settings page
- Scroll to the DataMasque AI Engine section. Note that this section will only appear if the AI Engine URL has been configured
- Confirm your URL matches the one you entered
You can check that the AI Engine is successfully connected to bedrock
via its GET /health endpoint.
See the DataMasque AI Engine's README.md for further instructions.
You've now connected DataMasque to the DataMasque AI Engine. Next, see Matchers and Labels to start building your first unstructured masking ruleset.