pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Daniel Struck <struck.d@retrovirology.lu>
To: pgsql-php@postgresql.org
Subject: client authentication towards postgresql in php?
Date: Sun, 9 Nov 2003 16:52:28 +0100
Message-ID: <20031109165228.45503144.struck.d@retrovirology.lu> (raw)

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.
Of course I could save the passwords for the clients in a text file accessible by the php application, but I don't like the idea of this file lying around on the hard drive.

I thought about using Kerberos in this setup, sort of:

1.apache authenticates the client (two way ssl with smartcards)
2. client receives a ticket from kerberos
3. which php could forward to postgresql.

Is this possible?

Maybe someone knows another secure way of authenticating users to postgresql in a web application?


Best regards,
Daniel Struck


-- 
Retrovirology Laboratory Luxembourg
Centre Hospitalier de Luxembourg
4, rue E. Barblé
L-1210 Luxembourg

phone: +352-44116105
fax:   +352-44116113
web: http://www.retrovirology.lu
e-mail: struck.d@retrovirology.lu



view thread (9+ messages)  latest in thread

Message-ID: <20031109165228.45503144.struck.d@retrovirology.lu>
Permalink:  ../20031109165228.45503144.struck.d@retrovirology.lu/
Also on:    postgresql.org/message-id/20031109165228.45503144.struck.d@retrovirology.lu

 · 

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: struck.d@retrovirology.lu
  Subject: Re: client authentication towards postgresql in php?
  In-Reply-To: <20031109165228.45503144.struck.d@retrovirology.lu>
  References: <20031109165228.45503144.struck.d@retrovirology.lu>

* 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