[GENERAL] LYDB: Feasible to use PG roles instead of application-level security?

Поиск
Список
Период
Сортировка
От Guyren Howe
Тема [GENERAL] LYDB: Feasible to use PG roles instead of application-level security?
Дата
Msg-id 616E37BD-F646-4B32-A975-51B5C72B416F@gmail.com
обсуждение исходный текст
Ответы Re: [GENERAL] LYDB: Feasible to use PG roles instead ofapplication-level security?
Re: [GENERAL] LYDB: Feasible to use PG roles instead ofapplication-level security?
Список pgsql-general
Further to my attempts to enlighten application developers about what they might better do in the database:


it occurs to me to wonder whether it is practical to use PG’s own roles and security model in lieu of using an application-level one.

It seems that the role system in PG is sufficient for most general purposes. One could presumably also have a table with role names and associated metainformation (email address etc) as needed.

If I have a system with many thousands of users, is it practical to manage these users’ authentication and authorization using *just* Postgres?

It occurs to me that some client frameworks might have issues with their connection pools if those connections keep switching users, assuming they even can, but let’s set that aside for now. Or perhaps every connection could immediately do a SET USER before executing its connection?

This seems an attractive proposition from a security standpoint: if I use row-level security pervasively, I can have a security system that’s nestled nice and close to the data and presumably tricky to work around from a hacker given direct access only to the client application.

Is this practical? Has anyone here done it? What might the caveats be?

TIA

В списке pgsql-general по дате отправления:

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: [GENERAL] Special index for "like"-based query
Следующее
От: Tim Uckun
Дата:
Сообщение: Re: [GENERAL] Performance PLV8 vs PLPGSQL