pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Robert Treat <xzilla@users.sourceforge.net>
To: Daniel Struck <struck.d@retrovirology.lu>
Cc: pgsql-php@postgresql.org
Subject: Re: client authentication towards postgresql in php?
Date: 11 Nov 2003 08:30:56 -0500
Message-ID: <1068557456.10942.14684.camel@camel> (raw)
In-Reply-To: <20031109165228.45503144.struck.d@retrovirology.lu>
References: <20031109165228.45503144.struck.d@retrovirology.lu>

On Sun, 2003-11-09 at 10:52, Daniel Struck wrote:
> Hello,
> 
> 
> I am searching for a secure way to handle client authentication in php towards postgresql.
> 
> Let me explain what I like to setup:
> 
> Client will connect to the application via Apache.
> The authentication of the clients will be done over ssl and the certificates of the clients will be stored on smartcards.
> (I have written a small documentation how to setup this at www.opensc.org).
> Next I will read in the PHP application environment variables of apache to know if the user was correctly authenticated by apache.
> 
> In postgresql I would like to create for every client a user.
> Purpose: automatically log every action like update/delete of users by rules without requiring scripts in php.
> 
> The problem I have is to authenticate the client to postgresql.

If your actually creating a user inside the database for each user,
authentication is handled inside the database and passwords are held
inside the database.  When your php login script fires off, save the
user name/ password into a session and then use that info to build your
pg_connect strings. 

Or maybe I've missed something because this sounds a lot easier to do
than your making it out to be.

Robert Treat
-- 
Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL




view thread (9+ messages)  latest in thread

Message-ID: <1068557456.10942.14684.camel@camel>
Permalink:  ../1068557456.10942.14684.camel@camel/
Also on:    postgresql.org/message-id/1068557456.10942.14684.camel@camel

 · 

reply

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-php@postgresql.org
  Cc: xzilla@users.sourceforge.net, struck.d@retrovirology.lu
  Subject: Re: client authentication towards postgresql in php?
  In-Reply-To: <1068557456.10942.14684.camel@camel>
  References: <20031109165228.45503144.struck.d@retrovirology.lu> <1068557456.10942.14684.camel@camel>

* 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