From: darcy@druid.net
To: ericm@palaver.net
Cc: pgsql-sql@postgreSQL.org
Subject: Re: [SQL] connecting with password
Date: Thu, 10 Sep 1998 23:11:15 -0400 (EDT)
Message-ID: <m0zHJcB-00006FC@druid.net> (raw)
In-Reply-To: <Pine.LNX.3.96.980910211731.1543H-100000@toots.palaver.net>
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@{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.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: darcy@druid.net, ericm@palaver.net
Subject: Re: [SQL] connecting with password
In-Reply-To: <m0zHJcB-00006FC@druid.net>
References: <Pine.LNX.3.96.980910211731.1543H-100000@toots.palaver.net> <m0zHJcB-00006FC@druid.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox