Menu

#461 BUG: Bad auth in for a single DB clears session credentials

5.1
open
nobody
None
5
2018-03-13
2018-03-13
No

Bad auth in for a single DB clears session credentials

This could also be feature requests: "Login minimised" & "Exclude databases" for the display on the left

When trying to use a database that you don’t have permission for auth credentials in the session are cleared even if you are successful in using other databases on the same host. "owned only" is not a viable config option in my case

Scenario:
I have phppgadmin with 2 database hosts configured. On host 1 I have access to databases 1A, 1B and 1C, but not 1D. On host 2 I have access to databases 2B & 2C, but not 2A. When I log into host 1 all if ok if I expand databases 1A, 2B, 1C. With those databases expanded I try to log into host 2 it automatically tries to expand the first 3 databases. As I do not have permission to access the first database on host 2 my credentials are cleared for both.

Workaround:
Collapse databases in the left column before logging into a new host.

Background:
I’ve created a docker instance (https://hub.docker.com/r/timothyclarke/phppgadmin/) with nginx, php-fpm, php7 and with config options for multiple database hosts.

I use this container in AWS, where I have multiple database hosts with multiple databases on each. Due to the way Postgres is done in AWS there is a database called ‘rdsadmin’ that no one gets access to. If you try to expand the rdsadmin database in the left column auth credentials in the session are lost.
I cannot use the $conf['owned_only'] config option as the users in question are not the owners of any of the databases. I needed an interface for people to run adhoc queries against a database and phppgadmin was the choice

Discussion


Log in to post a comment.

MongoDB Logo MongoDB