Best practices for accessing a custom DB via an SSH tunnel

Hi,

I’m trying to setup Auth0 with a database we host on AWS (their RDS service).

To access the databases we need to setup an SSH Tunnel. I’m wondering what the best practice for this is? I’ve seen this thread, which suggests using a node package called ssh2.

First of all, can I confirm there is no inbuilt way for Auth0 to access a postgres DB via an SSH tunnel? I notice the thread is a few years old

Secondly if this is recommended practice, where would I attach the private key we’d be using to establish the tunnel?

Thanks in advance,
Mark

Hi Mark,

That sounds like the right approach - you need a package to do the ssh part.

The keys/certs should be stored in the rules configuration, not in the rules.

I did this (or something similar) a couple of years ago, I’ve since lost the code. But you are on the right track.

John

2 Likes

Thanks for the confirmation John,

All the best,
Mark