The connection string is unique to the Worker you call it in and can’t be used outside Hyperdrive or

The connection string is unique to the Worker you call it in and can’t be used outside Hyperdrive or your account, so it can’t be leaked. cc @thomasgauvin for docs here.
16 Replies
AJR
AJR2mo ago
What Matt said, the Hyperdrive ID and your connection string are not secrets. Also, if the underlying secrets (password/client secret) were leaked, those can be updated either via Wrangler or API, so you don't need to make a whole new Hyperdrive if it isn't convenient.
Hello, I’m Allie!
What would be the process if you need to rotate because you are switching providers(or for another reason)? Just swap out the IDs?
AJR
AJR2mo ago
At some point it's probably easiest to make a new one for the new provider, and then just swap out the ID in wrangler.toml, yeah.
Michael H
Michael H2mo ago
Howdy! Is there any type of logging viewable for hyperdrive private database tunnels? I have a postgresql server that is connectable directly via ssh port forwarding, via the tunnel established for hyperdrive cloudflared access tcp, and of course on the machine itself. However, running the recommended test code (const sql = postgres(env.XXXX.connectionString);) results in a connection timeout with no further info provided. Thanks!
cosbgn
cosbgn2mo ago
Did anyone managed to connect a digital ocean manage postgres to a worker? tried with both hyperdrive and none and it just times out, on my local it works perfectly
Michael H
Michael H2mo ago
Yeah, that's the same issue to which I was referring in my thread yesterday (https://discord.com/channels/595317990191398933/1150557986239021106/1291466735475490938) - I was building a full-stack in Workers Pages and the local hyperdrive dev connection worked OK, but the hyperdrive private connection seemed to be unable to talk to the tunnel, timing out in the process. I had a very productive chat with @AJR, who is looking into the issue
AJR
AJR2mo ago
May or may not be the same issue. Is the DO connection behind a tunnel? Or publicly accessible?
Unknown User
Unknown User2mo ago
Message Not Public
Sign In & Join Server To View
AJR
AJR2mo ago
If the questions are specifically about Hyperdrive through a tunnel this is the channel. Have you had a chance to look through some of the debugging points in this thread? https://discord.com/channels/595317990191398933/1291466735475490938
Unknown User
Unknown User2mo ago
Message Not Public
Sign In & Join Server To View
AJR
AJR2mo ago
Okay. If you DM me your hyperdrive ID, I'll dig a bit when I'm back in office Monday and see what I can turn up
Unknown User
Unknown User2mo ago
Message Not Public
Sign In & Join Server To View
cosbgn
cosbgn2mo ago
public accessible: here you have a reproduction if it helps: https://discord.com/channels/595317990191398933/1292077844259668018 I disabled hyperdrive for the reproduction, the the issue is the same (with/without hyperdrive)
AJR
AJR2mo ago
If hyperdrive is out of the equation it gets harder for me to help with that, I'm afraid. I'll ask internally on Monday and see if anyone on some of the other dev platform teams knows something about it
James Eastham
James Eastham2mo ago
Hey everyone, cross post here from the Rust channel and wondering if anyone can help. Is anyone else using Rust alongside a Postgres database with Hyperdrive? I'm getting some weird intermittent connection issues, that is like either the worker can't connect or is timing out. I'm wondering if it's something to do with this background work happening and the connection not quite being ready.
James Eastham
James Eastham2mo ago
No description
Want results from more Discord servers?
Add your server