Re: Creating a role with read only privileges but user is allowed to change password - Mailing list pgsql-general

From David G Johnston
Subject Re: Creating a role with read only privileges but user is allowed to change password
Date
Msg-id CAKFQuwYLmwNOppJoMHrCvgURaFDisqKjektD_HGkeVpA4y-P9A@mail.gmail.com
Whole thread Raw
In response to Re: Creating a role with read only privileges but user is allowed to change password  (Gavin Flower <GavinFlower@archidevsys.co.nz>)
Responses Re: Re: Creating a role with read only privileges but user is allowed to change password  (Gavin Flower <GavinFlower@archidevsys.co.nz>)
List pgsql-general

​I​
 suggest that you move the password to a separate table (my_role_password) with 2 columns:
  1. my_role_id
  2. password.
This way you can make the my_role table totally unalterable by the user, yet they can change their own password.

Actually, you should NOT be storing passwords in plain text, they should be stored as a secure hash (better than MD5).

​I have no clue what you are trying to get at here...the core problem is with database defined roles - which are maintained in the system catalog - and the fact that marking a session read-only disallows updates to the system catalog...

I do not see how adding a user table with role and password overcomes that problem since the user table would be read-only too - so how would they still be able to change their password if the cannot alter the table (data alter, not structure).

David J.


View this message in context: Re: Creating a role with read only privileges but user is allowed to change password
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

pgsql-general by date:

Previous
From: Gavin Flower
Date:
Subject: Re: Creating a role with read only privileges but user is allowed to change password
Next
From: Gavin Flower
Date:
Subject: Re: Re: Creating a role with read only privileges but user is allowed to change password