Обсуждение: Restrict user's query row number

Поиск
Список
Период
Сортировка

Restrict user's query row number

От
"Burhan Akbulut (ETIYA)"
Дата:

Hello,

 

Some tables that contain sensitive data can be accessed by many people from the operation team. I want to limit rows the results of queries containing these tables through client applications such as Pgadmin or DBeaver.

 

Can I do this exactly? How can I do it if I can?

PS: The operations team does not use similar queries. I can solve this problem with using view or etc, if they are using the same queries. However, they produce new types of queries by combining different tables and tables containing sensitive data.

Thanks for your help.

 

Burhan Akbulut

Etiya

 

body { background-color: #fff; } table { border-spacing: 1px; border-collapse: collapse; } td img {} .details { font-family: Arial Narrow; font-size: 10px; font-weight: bold; color: #69737a; padding-bottom: 5px; } .share { text-align: right; } .share img { margin-left: 10px; }
 
 
Burhan Akbulut
Senior Specialist, Database Management
 
 
M:+90 552 997 52 97
E:burhan.akbulut@etiya.com
 
 

 

Yasal Uyari : 
Bu elektronik posta asagidaki adreste bulunan Kosul ve Sartlara tabidir;

http://www.etiya.com/gizlilik

ÇIKTI ALMADAN ÖNCE ÇEVREYE OLAN SORUMLULUGUMUZU BIR KEZ DAHA DÜSÜNELIM. 
PLEASE CONSIDER THE ENVIRONMENT BEFORE PRINTING ANY DOCUMENT.

Re: Restrict user's query row number

От
Bruce Momjian
Дата:
On Thu, Aug 26, 2021 at 12:05:34PM +0000, Burhan Akbulut (ETIYA) wrote:
> Hello,
> 
>  
> 
> Some tables that contain sensitive data can be accessed by many people from the
> operation team. I want to limit rows the results of queries containing these
> tables through client applications such as Pgadmin or DBeaver.
> 
>  
> 
> Can I do this exactly? How can I do it if I can?

I think views and row-level security should help:

    https://www.postgresql.org/docs/13/ddl-rowsecurity.html

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

  If only the physical world exists, free will is an illusion.




Re: Restrict user's query row number

От
Laurenz Albe
Дата:
On Thu, 2021-08-26 at 12:05 +0000, Burhan Akbulut (ETIYA) wrote:
> I want to limit rows the results of queries containing these tables through client applications such as Pgadmin or
DBeaver.

There is no way to do that.

Perhaps don't give them access to the tables, but only to a view with a LIMIT clause.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com




Re: Restrict user's query row number

От
Holger Jakobs
Дата:


Am 26. August 2021 14:05:34 MESZ schrieb "Burhan Akbulut (ETIYA)" <burhan.akbulut@etiya.com>:

Hello,

 

Some tables that contain sensitive data can be accessed by many people from the operation team. I want to limit rows the results of queries containing these tables through client applications such as Pgadmin or DBeaver.

 

Can I do this exactly? How can I do it if I can?

PS: The operations team does not use similar queries. I can solve this problem with using view or etc, if they are using the same queries. However, they produce new types of queries by combining different tables and tables containing sensitive data.

Thanks for your help.

 

Burhan Akbulut

Etiya

 

body { background-color: #fff; } table { border-spacing: 1px; border-collapse: collapse; } td img {} .details { font-family: Arial Narrow; font-size: 10px; font-weight: bold; color: #69737a; padding-bottom: 5px; } .share { text-align: right; } .share img { margin-left: 10px; }
 
 
Burhan Akbulut
Senior Specialist, Database Management
 
 
M:+90 552 997 52 97
E:burhan.akbulut@etiya.com
 
 

 

Yasal Uyari : 
Bu elektronik posta asagidaki adreste bulunan Kosul ve Sartlara tabidir;

http://www.etiya.com/gizlilik

ÇIKTI ALMADAN ÖNCE ÇEVREYE OLAN SORUMLULUGUMUZU BIR KEZ DAHA DÜSÜNELIM. 
PLEASE CONSIDER THE ENVIRONMENT BEFORE PRINTING ANY DOCUMENT.


Do you want to limit according to some criterion or the number of rows which may be returned?

The first would be row level security.

The second would be a view with a 'limit' clause.


--
Holger Jakobs, Bergisch Gladbach
+49 178 9759012
- sent from mobile, therefore short -