Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#161 Allow connections to arbitrary databases outside of config

open
Robert Treat
None
5
2008-07-14
2008-07-07
arekm
No

User: xxx
Database: yyy

Every database in the system (including postgres, template0 and template1) had issued:
REVOKE CONNECT ON database FROM PUBLIC;

and database yyy got:
GRANT CONNECT ON yyy TO xxx

so user xxx can connect ONLY to database yyy.

Now if user enters login and password then phppgadmin tries to connect to template0 db (or whatever was set in config) and of course login fails... since user xxx can connect only to his own database yyy.

I solved this by adding another field at login screen: database name. So now user enters login, password, database and can connect properly.

Discussion

  • arekm
    arekm
    2008-07-07

    database name to which user want's to be connected

     
    Attachments
  • Robert Treat
    Robert Treat
    2008-07-14

    • labels: 441077 -->
    • assigned_to: chriskl --> xzilla
    • summary: if CONNECT grant is revoked user cannot connect --> Allow connections to arbitrary databases outside of config
     
  • Robert Treat
    Robert Treat
    2008-07-14

    Logged In: YES
    user_id=204589
    Originator: NO

    This is really a feature request, since the the software is designed so that you should set the connection db to whichever db you have access too. However, I'd like to change this in the next release. My initial thought is to add the db field, and set it's default value to whatever the connect db is configured to, but allow folks to enter arbitrary database names into the system. This will probably need to be toggle-able by a config variable though, it could certainly be considered a security risk to allow people to specify any connection database. In any case, changing this to feature request for now.