Quick Start
This guide provides a streamlined approach to deploying the Request Manager Agent, configuring it to connect to your internal systems, and processing DSRs with minimal setup.
Deploy the Agent
The first half of the guide focuses on configuring and deploying the Request Manager Agent in your environment before connecting it with DataGrail.
Before performing the steps below, ensure you have the following:
- DataGrail image registry credentials.
- Privileges to create and manage containerized workloads in your cloud environment.
- Access to the DataGrail platform.
Source the Image
Request Manager Agent images are distributed via DataGrail's self-hosted Docker registry. Accessing the images requires basic authentication credentials provided by your DataGrail representative.
# Authenticate with the DataGrail registry
docker login contairium.datagrail.io -u $DATAGRAIL_SUBDOMAIN -p $DATAGRAIL_API_KEY
# Pull the latest Request Manager Agent image (or specify a version)
docker pull contairium.datagrail.io/datagrail-rm-agent:latest
If you prefer to use a pull-through cache instead of hosting the image yourself, you can set up your container orchestration platform's deployment manifest to fetch the image directly during the deployment process.
Agent Credentials
The Request Manager Agent uses a credentials manager to securely store sensitive information required for its operations. Supported providers can be found in the CredentialsManagerProvider list. The choice of credentials manager depends on your infrastructure and security requirements.
-
Create the OAuth Client Credentials in your credentials manager. Both the
client_id
andclient_secret
are arbitrary values that you control.OAuth Client Credentials{
"client_id": "<arbitrary identifier for the credential>",
"client_secret": "<arbitrary password>"
} -
Create the Callback Token in your credentials manager. This token will be provided by your DataGrail representative.
Callback Token{
"token": "<your DataGrail token>"
}
Refer to the Storing Credentials Guide for detailed instructions on securely managing credentials using your preferred credentials manager. During the next step, you will specify the locations of these credentials in the Agent's configuration.
Define the Configuration
The Request Manager Agent requires a configuration environment variable named DATAGRAIL_AGENT_CONFIG
to define its behavior and connections to internal systems. The configuration contains metadata about the connections, credentials, and other settings required for the Agent to function properly. Configurations vary based on cloud provider due to differences in credentials and storage management.
Configuration validation is performed at startup, and any errors will prevent the Agent from starting.
- AWS
- Google Cloud
- Microsoft Azure
{
"connections": [],
"customer_subdomain": "<your subdomain>.datagrail.io",
"datagrail_agent_credentials_location": "<AWS ARN of your OAuth Client Credentials>",
"datagrail_credentials_location": "<AWS ARN of your Callback Token>",
"platform": {
"credentials_manager": {
"provider": "<AWSSecretsManager|AWSSSMParameterStore>"
},
"storage_manager": {
"provider": "AWSS3",
"options": {
"bucket": "<S3 bucket name>"
}
}
}
}
Replace the placeholder values in the Minimum Configuration above with their actual values:
customer_subdomain
: Your DataGrail subdomain (e.g., "acme.datagrail.io").datagrail_agent_credentials_location
: The ARN of the OAuth Client Credentials in Secrets Manager or Parameter Store.datagrail_credentials_location
: The ARN of the Callback Token credential in Secrets Manager or Parameter Store.platform.credentials_manager.options
provider
: Credentials manager platform (AWSSecretsManager
orAWSSSMParameterStore
).
platform.storage_manager.options
bucket
: S3 bucket name.
{
"connections": [],
"customer_subdomain": "<your subdomain>.datagrail.io",
"datagrail_agent_credentials_location": "<name of your OAuth Client Credentials secret>",
"datagrail_credentials_location": "<name of your Callback Token secret>",
"platform": {
"credentials_manager": {
"provider": "GCP",
"options": {
"project_id": "<Google Cloud Project ID>"
}
},
"storage_manager": {
"provider": "GCPCloudStore",
"options": {
"bucket": "<Cloud Store bucket name>",
"project_id": "<Google Cloud Project ID>"
}
}
}
}
Replace the placeholder values in the Minimum Configuration above with their actual values:
customer_subdomain
: Your DataGrail subdomain (e.g., "acme.datagrail.io").datagrail_agent_credentials_location
: The name of the OAuth Client Credentials in Secret Manager.datagrail_credentials_location
: The name of the Callback Token credential in Secret Manager.platform.credentials_manager.options
project_id
: GCP project ID.
platform.storage_manager.options
bucket
: Cloud Store bucket name.project_id
: GCP project ID.
{
"connections": [],
"customer_subdomain": "<your subdomain>.datagrail.io",
"datagrail_agent_credentials_location": "<name of your OAuth Client Credentials secret>",
"datagrail_credentials_location": "<name of your Callback Token secret>",
"platform": {
"credentials_manager": {
"provider": "AzureKeyVault",
"options": {
"key_vault": "<Azure Key Vault name>"
}
},
"storage_manager": {
"provider": "AzureBlob",
"options": {
"bucket": "<Azure Blob bucket name>",
"project_id": "<Azure Project ID>"
}
}
}
}
Replace the placeholder values in the Minimum Configuration above with their actual values:
customer_subdomain
: Your DataGrail subdomain (e.g., "acme.datagrail.io").datagrail_agent_credentials_location
: The name of the OAuth Client Credentials in Key Vault.datagrail_credentials_location
: The name of the Callback Token credential in Key Vault.platform.credentials_manager.options
key_vault
: Azure Key Vault name.
platform.storage_manager.options
bucket
: Name of the Azure Blob container.project_id
: Azure App Registration ID.
For detailed information about these parameters and any optional ones, refer to the DataGrailAgentConfig Schema documentation.
Run the Agent
The Request Manager Agent can be deployed using any container orchestration platform, such as Google Cloud Run, Amazon ECS, Azure Container Apps, or Kubernetes.
Refer to the specific deployment guides for detailed instructions on running the Agent on your chosen platform:
Connect to DataGrail
Once the Agent is healthy, connect it to DataGrail by following the Internal Systems (OAuth) connection instructions.
Configure the Internal System
In this half of the guide, you will configure the agent to execute request logic in your internal system.
The examples provided below use a Postgres database containing a users
table which will be queried using the Data Subject's verified email address. If you are integrating a different system, use the configuration for that system located in the Connections section.
Before performing the steps below, ensure the following:
- Request Manager Agent is deployed and connected in DataGrail.
- Network is configured to allow the Agent to connect with the PostgreSQL instance.
Create Request Logic
In this step, create the request logic to be executed in your system for a specific request type.
- Access
- Delete
- Opt-Out
- Identifier
When a Data Subject requests to access the personal information that your company maintains on them, they will submit an Access request. Your request logic should return all applicable information found in this system.
SELECT * FROM contacts WHERE email = 'subject@domain.com';
For ease of maintainability and readability, using stored procedures is recommended instead of individual queries. When you need to modify the underlying queries, there will be no need to modify the Agent configuration nor restart the Agent.
CALL sp_dsr_access('subject@domain.com');
When a Data Subject wants their personal data removed from your systems, they will submit a Deletion request. Your request logic should delete or anonymize the Subject's information stored in this system.
DELETE FROM contacts WHERE email = 'subject@domain.com';
For ease of maintainability and readability, using stored procedures is recommended instead of individual queries. When you need to modify the underlying queries, there will be no need to modify the Agent configuration nor restart the Agent.
CALL sp_dsr_delete ('subject@domain.com');
When a Data Subject wants to opt out of the Sale of their Personal Information to third parties, they will submit an Opt-Out request. Your request logic should perform the necessary action to honor this request (e.g., setting a flag).
UPDATE contacts SET optout = true WHERE email = 'subject@domain.com';
For ease of maintainability and readability, using stored procedures is recommended instead of individual queries. When you need to modify the underlying queries, there will be no need to modify the Agent configuration nor restart the Agent.
CALL sp_dsr_optout('subject@domain.com');
Some third party integrations use identifiers other than an email to process a request (e.g., Phone Number), and the Agent can be used to automate identifier retrieval. Your request logic should return the identifier value stored in this system.
SELECT phone_number FROM contacts WHERE email = 'subject@domain.com';
For ease of maintainability and readability, using stored procedures is recommended instead of individual queries. When you need to modify the underlying queries, there will be no need to modify the Agent configuration nor restart the Agent.
CALL sp_dsr_get_phone('subject@domain.com');
System Credentials
In this section, you will create and configure limited scope credentials for the agent to use with the internal system.
-
In your system, create the credentials for the agent to connect to your system and execute the request logic (e.g., database user and password). Only grant these credentials the minimum necessary permissions required to perform the configured actions.
-
Using the format specified in the connection documentation, replace any placeholder values with actual values. The following credentials JSON format is used by the Postgres connector
{
"user": "<agent user>",
"password": "<agent password>",
"host": "<server domain name or IP address>",
"port": "<port, e.g. 5432>",
"dbname": "<database name>"
} -
In your credentials manager, create a secret with the credentials JSON.
-
Confirm that the agent has the necessary permissions to retrieve the value of the new secret.
Create Connection Object
To define the interactions between the agent and the internal system, configure the Connection object.
-
Using the empty connection object below, enter a connection name and uuid (v4).
{
"name": "",
"uuid": "",
"capabilities": [],
"mode": "",
"connector_type": "Postgres",
"queries": {
"access": [],
"delete": [],
"optout": [],
"identifiers": {}
},
"credentials_location": ""
} -
Set the capabilities that correspond to your request logic.
-
Under queries, add your request logic as a string to the corresponding request type.
-
The
queries
object allows query strings to be dynamically formatted with identifiers. Identifiers are passed individually to queries, and are bound to the variables in the operation. Replace any static identifier in the request logic using pyformat parameter formatting (e.g.,...WHERE email=%(email)s
).Parameter Binding Example-- BEFORE
CALL sp_dsr_access('subject@domain.com');
-- AFTER
CALL sp_dsr_access(%(email)s); -
Set the credentials_location value to the location of the secret created above (e.g., AWS ARN).
Example Connection Objects
After following the steps above, the resulting connection object should look similar to these examples.
- Access
- Deletion
- Opt Out
- Identifiers
- Multiple Capabilities
{
"name": "Contacts DB",
"uuid": "93f0097e-7341-412a-8311-5e54c9360863",
"capabilities": ["privacy/access"],
"mode": "live",
"connector_type": "Postgres",
"queries": {
"access": ["CALL sp_dsr_access(%(email)s);"],
"delete": [],
"optout": [],
"identifiers": {}
},
"credentials_location": "arn:aws:secretsmanager:Region:AccountId:secret:datagrail-rm-agent-postgres"
}
{
"name": "Contacts DB",
"uuid": "93f0097e-7341-412a-8311-5e54c9360863",
"capabilities": ["privacy/deletion"],
"mode": "live",
"connector_type": "Postgres",
"queries": {
"access": [],
"delete": ["CALL sp_dsr_delete (%(email)s);"],
"optout": [],
"identifiers": {}
},
"credentials_location": "arn:aws:secretsmanager:Region:AccountId:secret:datagrail-rm-agent-postgres"
}
{
"name": "Contacts DB",
"uuid": "93f0097e-7341-412a-8311-5e54c9360863",
"capabilities": ["privacy/optout"],
"mode": "live",
"connector_type": "Postgres",
"queries": {
"access": [],
"delete": [],
"optout": ["CALL sp_dsr_optout(%(email)s);"],
"identifiers": {}
},
"credentials_location": "arn:aws:secretsmanager:Region:AccountId:secret:datagrail-rm-agent-postgres"
}
{
"name": "Contacts DB",
"uuid": "93f0097e-7341-412a-8311-5e54c9360863",
"capabilities": ["privacy/identifiers"],
"mode": "live",
"connector_type": "Postgres",
"queries": {
"access": [],
"delete": [],
"optout": [],
"identifiers": {
"phone_number": ["CALL sp_dsr_get_phone(%(email)s);"]
}
},
"credentials_location": "arn:aws:secretsmanager:Region:AccountId:secret:datagrail-rm-agent-postgres"
}
{
"name": "Contacts DB",
"uuid": "93f0097e-7341-412a-8311-5e54c9360863",
"capabilities": ["privacy/access", "privacy/deletion", "privacy/optout", "privacy/identifiers"],
"mode": "live",
"connector_type": "Postgres",
"queries": {
"access": ["CALL sp_dsr_access(%(email)s);"],
"delete": ["CALL sp_dsr_delete (%(email)s);"],
"optout": ["CALL sp_dsr_optout(%(email)s);"],
"identifiers": {
"phone_number": ["CALL sp_dsr_get_phone(%(email)s);"]
}
},
"credentials_location": "arn:aws:secretsmanager:Region:AccountId:secret:datagrail-rm-agent-postgres"
}
Update and Restart Agent
In this section, you will integrate the internal system with DataGrail by updating the agent environment variable and restarting the agent to apply the changes.
If your DataGrail account is already processing Data Subject Requests, new agent connections may be automatically processed with all new requests. If you are not sure, check with your DataGrail admin or dedicated Account Manager before starting this section.
- In the
DATAGRAIL_AGENT_CONFIG
environment variable, add the new connection object to theconnections
array. - Save the environment variable, and restart the agent service to apply the changes.
- After the restart, confirm that the agent service is healthy, and the logs contain no errors.
- In DataGrail, update the integration by navigating to Integrations and select the agent integration.
- Select Edit Integration, enter the Client Secret, and then select Save Changes.
- To view the new connection, navigate back to Integrations and locate it in the list.
Now that you've successfully added this connection to DataGrail, try it out by submitting and processing a request.
Disclaimer: The information contained in this message does not constitute as legal advice. We would advise seeking professional counsel before acting on or interpreting any material.