Re: [SQL] connecting with password

From: darcy(at)druid(dot)net (D'Arcy J(dot)M(dot) Cain)
To: ericm(at)palaver(dot)net (Eric McKeown)
Cc: pgsql-sql(at)postgreSQL(dot)org (PGsql)
Subject: Re: [SQL] connecting with password
Date: 1998-09-11 03:11:15
Message-ID: m0zHJcB-00006FC@druid.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Thus spake Eric McKeown
> Is there any way to set up special password protections for a Postgres
> database, so that I can force someone to present a username and password
> when connecting from a PHP script? I've combed the docs for something on
> this, and I may just be completely off base on the feasibility.

What I do is run the page as the database owner (I run a separate Apache
on a different port) and use the Apacher server password protections.
Just remember to check who the remote user is every time you do any
operation where the specific user is important. If you just need to
make a general restriction on a database for a group then the protection
in the config files (or .htaccess) should be fine.

How you do this in PHP is up to you. I do it all in Python.

--
D'Arcy J.M. Cain <darcy(at){druid|vex}.net> | Democracy is three wolves
http://www.druid.net/darcy/ | and a sheep voting on
+1 416 424 2871 (DoD#0082) (eNTP) | what's for dinner.

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Marcio Macedo 1998-09-11 17:21:27 Linux ODBC DRIVER ?
Previous Message Daniele Orlandi 1998-09-11 02:31:10 Re: [SQL] connecting with password