Connect to a TeeSQL cluster from a Python or TypeScript application, run a query, and (optionally) verify the database’s TDX attestation. This page is the happy path; deeper material lives in Connect and Security.Documentation Index
Fetch the complete documentation index at: https://docs.teesql.com/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
- A TeeSQL cluster. TeeSQL is in early access — request one on the waitlist. The operator returns a cluster host, a cluster secret, and a database name.
- An Intel TDX environment for your application. Mutual RA-TLS requires your app to present its own TDX-attested client certificate. In production this means a dstack CVM, Phala Cloud, iExec, or another TDX host. For local development, run the dstack simulator.
- An Intel Trust Authority API key. Free; register at portal.trustauthority.intel.com. Used to verify the database’s TDX quote.
- A runtime. Node.js ≥ 18 with Prisma ≥ 5.10, or Python ≥ 3.10 with psycopg 3.
Create a database
During early access, the TeeSQL operator provisions your cluster and database after you join the waitlist. You receive:
- A cluster host (e.g.
your-cluster.teesql.com) backed by a signed TXT manifest at_teesql-leader.<cluster-uuid>.teesql.com - A database name
- A cluster secret (32-byte hex) — your password for both
teesql_readwriteandteesql_readroles
Connect
Use a TeeSQL RA-TLS client. The client opens a localhost forwarder that terminates mutual RA-TLS to the cluster sidecar; your driver speaks plain Postgres to that forwarder.The mutual RA-TLS handshake happens once at process start — keep the connection long-lived, do not re-handshake per query.
Verify attestation (optional)
The client you just used already verified the server’s TDX quote against Intel Trust Authority. To pin the exact CVM image you expect, pass an See Verify attestation for the full RTMR/MRTD model and how to pin measurements safely.
allowedMrTd allowlist of MRTD hex values:Next steps
Connection string
Roles, ports, the cluster secret, and the leader manifest.
Security overview
The trust model behind mutual RA-TLS.