Re: Best way to manage users

From: Adam Witney <awitney(at)sgul(dot)ac(dot)uk>
To: Roland Giesler <roland(at)giesler(dot)za(dot)net>, 'Kevin Crenshaw' <kcrenshaw(at)viscient(dot)com>, pgsql-novice <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Best way to manage users
Date: 2006-01-04 17:47:09
Message-ID: BFE1BA9D.55102%awitney@sgul.ac.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On 4/1/06 5:43 pm, "Roland Giesler" <roland(at)giesler(dot)za(dot)net> wrote:

> Kevin Crenshaw wrote:
>> Thanks for the replies. I appreciate the advice. However, I
>> think that a better way to pose my question is to ask - what
>> are the pros and cons of using Postgres to handle user
>> authentication for my web app?
>
> Maybe to add to that question: Is there a way to directly authenticate a
> user as a database user when using a web app? In .net, this is handeled by
> a cobination of the OS (active directory - AD), the DB (SQL Server) which
> can authenticate against AD, and the browser. However, how can pg get or
> request the authentication from your webbrowser? Unless there is a pgsql
> function that allows login as a different user from a webapp from the
> webapp, I would think it's not possible to actually do this the way a
> statefull app does it (under windows for example)
>
> Some comments on this would be great, as I have a very similar requirement
> and was also toying with the idea of using the pg users, instead of creating
> my own tables and user authentication infrastructure.

If using PHP you could authenticate when you login to your web app and then
set an 'authenticated' session variable or cookie (Perl also I suppose). You
would have to store username/password information in the session
variable/cookie as well for subsequent page/db requests.

Adam

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Kevin Crenshaw 2006-01-04 18:55:59 Re: Best way to manage users
Previous Message Roland Giesler 2006-01-04 17:43:39 Re: Best way to manage users