Security in PromptQL and Hasura DDN
Introduction
Hasura DDN is designed with a strong emphasis on security, ensuring that your data and APIs are protected through various measures. This document outlines the key security features and practices implemented within Hasura DDN, covering data encryption, access control, network security, and authentication.
Data Encryption
Encryption at Rest
All metadata stored within Hasura DDN is encrypted at rest using the AES-GCM-256 algorithm. This industry-standard encryption ensures that your data is secure even if the underlying storage is compromised. Hasura also uses Envelope encryption for the keys themselves.
Encryption in Transit
All communication between your client applications, the Hasura DDN engine, and configured data connectors is secured using HTTPS/TLS 1.2 or higher. This ensures that your data is encrypted during transmission, protecting it from interception or tampering.
Network Connectivity Requirements
When using Hasura public DDN connectors to connect to your data sources, these sources must be accessible from the
internet (allowing connections from 0.0.0.0/0
). This is because Hasura DDN operates from dynamic IP addresses and does
not provide static IP addresses for connections.
If your security requirements necessitate the use of static IP addresses or private network connectivity, consider using Hasura Private DDN, which allows you to host the data plane within your own infrastructure.
Metadata Storage and Handling
Types of Metadata Stored
Hasura DDN's control plane stores metadata related to your project's configuration. This metadata includes:
- HML (Hasura Metadata Language) files: These files define the structure of your API, including data source information such as table names, column names, relationships, and permissions.
- Subgraph information: Details about your project's subgraphs.
- User access information: RBAC rules and policies that determines supergraph and subgraph access for users.
Connection string or data source credentials used by the connectors are managed as secrets.
Metadata Immutability and Secret Protection
Once a supergraph build is created, the metadata associated with that build, including any resolved values from environment variables, is immutable and encrypted using envelope encryption. This design allows Private DDNs to use their own master encryption keys for enhanced security. Critically, secrets incorporated into the build via environment variables are not directly exposed or retrievable from the built metadata once on the control plane.
Data Retention
Metadata is retained for as long as a build is available on the system. When a build is deleted, the associated metadata is also deleted. Read more about deleting builds here.
Access Control
Hasura DDN employs a robust role-based access control (RBAC) system. You can define granular permissions to control which users or roles can access specific data and operations. This ensures that only authorized users can perform actions based on their assigned roles.