Re: password cookie

From: "Willy-Bas Loos" <willybas(at)gmail(dot)com>
To: "Andrew Sullivan" <ajs(at)crankycanuck(dot)ca>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: password cookie
Date: 2006-10-25 22:27:49
Message-ID: 1dd6057e0610251527u7f631f47of8f135c0dc4b2f62@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I think that´s not exactly what i´m looking for.

Just to make sure that i understand what you´re proposing (please correct me
if i´m wrong):
I´ll write a function that will create a hash of username, password and, say
'now'::timestamp and store it in a cookie and in a separate table somewhere
on the cluster, if authentication is succesfull.
Then, upon every need for authorisation, the frontend will log into the
database as a highly priviliged user (or allready be logged in), and compare
the hashed values. If they are equal, it will allow certain actions.
After some time, i´ll trigger to delete the hash from the database.
I could still store the user name on the back end, and retreive it with the
provided hash, so that i know what actions to allow. I would then fake
postgreSQL´s authentication by querying the rights and roles for this user.

The problem is that the frontend would in fact have to be some major user
that regulates all authorisation, and the password for it would have to be
stored on the webserver.

What i am looking for is this:
Every time the user / frontend asks for certain data (or actions), he will
or will not receive those, because of the rights granted to him. These
granted rights and roles will be determined by the regular postgres
functionality (and some views).
The frontend does have a low priviliged username and password stored in it,
just to access the web-content.

WBL

On 10/25/06, Andrew Sullivan <ajs(at)crankycanuck(dot)ca> wrote:
>
> The usual workaround I'm familiar with is to set a hash of some sort
> that is the user, password, and some salt. Then you authenticate
> against that hash in your application, so that you never actually
> send these values, nor store them anywhere except the database.
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2006-10-25 22:38:10 Re: Enableing contrib modules on Debian
Previous Message Stuart Grimshaw 2006-10-25 22:20:24 Enableing contrib modules on Debian