Custom CA and mTLS certificates for Hyperdrive over Workers VPC
changelog / Compute / Hyperdrive / 2026/11/18 09:00 JST
Hyperdrive が Workers VPC 経由でプライベートデータベースへ接続する際、カスタム CA によるサーバー証明書の検証と、クライアント証明書による相互 TLS(mTLS)認証に対応した。対象は PostgreSQL と、プライベート CA や RDS の CA バンドルで署名された証明書を提示する Amazon RDS で、RSA および EC P-256 のクライアント証明書が使える。これまでは同様の要件で Cloudflare Access や Tunnel 経由の WebSocket ルーティングが必要だったが、Hyperdrive が VPC Service に証明書を紐づけて直接接続できるようになり、構成要素が減る。wrangler での証明書アップロード手順も公開されており、社内 DB を Workers から安全に叩きたい開発者にとって実用的な前進だ。
出典サイトで原文を開く → 出典サイトの説明: Verify private database certificates and authenticate with client certificates through Workers VPC.
Hyperdrive can now connect to private databases over Workers VPC with a custom certificate authority (CA) and client certificate authentication (mutual TLS, or mTLS). This covers PostgreSQL databases and Amazon RDS instances that present certificates signed by a private CA or the RDS CA bundle, and client certificates with RSA or EC P-256 keys. Previously, a database that required a custom CA or a client certificate meant routing database traffic over WebSockets through Cloudflare Access and Cloudflare Tunnel . That approach added an Access application, a service token, and WebSocket handling to maintain. Hyperdrive now connects directly to the database over Workers VPC, without Access. Attach the certificates to the VPC Service, then create a Hyperdrive configuration from that service: # Upload the private CA and the client certificate npx wrangler cert upload certificate-authority —ca-cert ./db-ca.pem —name db-ca npx wrangler cert upload mtls-certificate —cert ./client.pem —key ./client-key.pem —name db-client # Attach the certificates to the VPC Service for your database npx wrangler vpc service create my-postgres-db \ —type tcp \ —tcp-port 5432 \ —app-protocol postgresq
出典: 公式ページ