Re: Webappication and PostgreSQL login roles - Mailing list pgsql-general

From Lutz Broedel
Subject Re: Webappication and PostgreSQL login roles
Date
Msg-id 4612404E.6020909@fggm.uni-hannover.de
Whole thread Raw
In response to Webappication and PostgreSQL login roles  (Thorsten Kraus <TK-Spam@gmx.de>)
Responses Re: Webappication and PostgreSQL login roles  (Thorsten Kraus <TK-Spam@gmx.de>)
List pgsql-general
Thorsten Kraus wrote:
> Hi,
>
> I designed a Java web application. The persistence layer is a PostgreSQL
> database. The application needs user authentication.
> I think it's a good choice to implement this authentication mechanism
> via PostgreSQL login roles. So I can create several database login roles
> and set the database permissions to this login roles. This is my first
> project with the postgres database, so I don't know how I can validate a
> login from the website. Is there a best practice to do this or does
> PostgreSQL offers a stored procedure like 'authenticateUser(String
> username, String password)'?
>
> Thanks for your help.
>
> Bye,
> Thorsten
>

Can you not use the username/password as part of the DSN?

Regards,
Lutz Broedel

--
Lutz Broedel

Leibniz University of Hannover
Institute for Water Quality & Waste Management / ISAH
Division: Water Resources Management

Am Kleinen Felde 30
D - 30167 Hannover, Germany
phone +49 (0)511 762 5984
fax      +49 (0)511 762 19 413
lb@fggm.uni-hannover.de

To verify the digital signature, you need to load the following certificate:
https://pki.pca.dfn.de/uh-ca/pub/cacert/rootcert.crt

Attachment

pgsql-general by date:

Previous
From: Alban Hertroys
Date:
Subject: Re: Webappication and PostgreSQL login roles
Next
From: Wilton Wonrath
Date:
Subject: PSQL - Slow on Windows 2000 or Windows 2003