Login Try it Free

Creating a Secure Database Tunnel from Your Desktop

Last Updated: Mar 13, 2012 02:49PM MDT

Pagoda Box gives you the ability to securely connect to your live database(s) and manage them using the same tools you use to manage your local database(s). No need to use web-based database management tools to administrate your live databases. Now you can use whatever database management tools you would like to administrate your database and do it from your local desktop.

  •  Create a secure tunnel to a live database
  •  Link a local instance of your app to a live database
 

A Quick Note On Security

We have taken every precaution to ensure every database tunnel is as secure as possible. On top of data encryption, there are three more layers of authentication:

  1. User Validation
  2. Application Validation
  3. Database Validation

Every time a secure tunnel is initiated, Pagoda checks to see that you are a valid user. It does this by verifying the login credentials used to login to the Pagoda Terminal Client. Once you are verified as a valid user, Pagoda checks to see if you are the owner or a collaborator of the app whose database your are trying to connect to. If you are not an owner or collaborator, you will not be able to connect to the database. Pagoda then checks that the database you are trying to connect to actually belongs to the app that you are trying to connect through. The only way a database tunnel can be established to a live database is if all three validations are passed.

What does this mean? It means that even if somebody has all of your database credentials, they will not be able to connect to your database without your Pagoda Box username and password. Protect your Pagoda Box username and password.

Creating the Tunnel

If you have not already, you need to install/update the Pagoda gem. For a more information about the Pagoda Terminal Client, checkout the Pagoda Terminal Client Guide.

Using the Pagoda Terminal Client, specify the app whose database you are trying to connect to and the id of the database component (e.g. db1):

 TerminalCreate a Tunnel While Outside Repo 

If you are inside your app’s repo, you do not need to specify the app name—just the component id:

 TerminalCreate a Tunnel While Inside Repo 

Once the tunnel is established, use your local database-management tool of choice to connect to your database using the host and port provided by the Pagoda Terminal Client and the username and password in your Pagoda database credentials.

Database credentials provided by the Pagoda Terminal Client:

  Database Credentials Provided by the Terminal Client  

Database credentials provided in the Pagoda Admin:

  Database Credentials Provided in the Pagoda Admin  

Voila! You are now able to administrate your live database from your local desktop. Enjoy!

If you have any suggestions or corrections for this guide, please submit a ticket.

Contact Us