Graphql-engine: [Console] Can we show postgres connection string in settings?

Created on 23 Jan 2019  路  7Comments  路  Source: hasura/graphql-engine

This way people can directly connect to psql easily without having to look anywhere else.

console ideas question

All 7 comments

I think we should definitely do this. We can do it on the run-sql window perhaps? More natural UX.
@0x777 @praveenweb Any security implications to this?

For most of our installations which are docker compose based, the Postgres URL would look like this: postgres://postgres:@postgres:5432/postgres.

For a user trying to connect to this Postgres from their machine, it is never going to work -- imagine the documentation explaining these.

The cases where user can connect to their Postgres, they would have configured the database themselves and are aware of the database url already.

IMO, the narrow crowd whom this is going to help are those who are going to use the console with Hasura connected to a public (or inside the private network) postgres, provisioned by someone else in the team. I guess in such scenarios, showing DB password on an application admin ui is not a good idea -- respecting the separation of concerns in the team.

Hm...this is not untrue. :(

But Docker compose is also the case where they want the postgres connection the most. So ...

We can just put in the docs. Let's expose the postgres atleast.

I would still like this feature on the console despite the above caveats. This comes handy if i had deployed on Heroku or have Postgres in managed services like RDS etc.

We can have a warning note in the console saying this may not be the right DATABASE_URL if it was setup using docker-compose etc. This warning need not be even there if console displays them as just Environment Variables in the UI that is used by the server.

Great care has to be taken with Postgres connection strings. It is best if we never expose this out of the server.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

egislook picture egislook  路  3Comments

macalinao picture macalinao  路  3Comments

stereobooster picture stereobooster  路  3Comments

hooopo picture hooopo  路  3Comments

lishine picture lishine  路  3Comments