pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Restrict user's query row number
4+ messages / 4 participants
[nested] [flat]

* Restrict user's query row number
@ 2021-08-26 12:05  Burhan Akbulut (ETIYA) <burhan.akbulut@etiya.com>
  0 siblings, 3 replies; 4+ messages in thread

From: Burhan Akbulut (ETIYA) @ 2021-08-26 12:05 UTC (permalink / raw)
  To: pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>

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

[https://www.etiya.com/images/e-newsletter/signature/etiya_logo.png]
[http://www.etiya.com/images/e-newsletter/signature/e_adres.png]<http://www.etiya.com;
[http://www.etiya.com/images/e-newsletter/signature/facebook_icon.png]<https://www.facebook.com/Etiya-249050755136326/; [http://www.etiya.com/images/e-newsletter/signature/linkedin_icon.png] <https://www.linkedin.com/company/etiya?trk=tyah&trkInfo=tas%3Aetiya%2Cidx%3A1-1-1;  [http://www.etiya.com/images/e-newsletter/signature/instagram_icon.png] <https://www.instagram.com/etiya_/;  [http://www.etiya.com/images/e-newsletter/signature/youtube_icon.png] <https://www.youtube.com/channel/UCWjknu72sHoKKt2nujuU2kA;  [http://www.etiya.com/images/e-newsletter/signature/twitter_icon.png] <https://twitter.com/etiya;
[http://www.etiya.com/images/e-newsletter/signature/0.png]

Burhan Akbulut
Senior Specialist, Database Management


M:+90 552 997 52 97
E:burhan.akbulut@etiya.com<mailto:burhan.akbulut@etiya.com>





Yasal Uyari :
Bu elektronik posta asagidaki adreste bulunan Kosul ve Sartlara tabidir;
http://www.etiya.com/gizlilik<www.etiya.com/gizlilik;

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

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Restrict user's query row number
@ 2021-08-26 13:18  Bruce Momjian <bruce@momjian.us>
  parent: Burhan Akbulut (ETIYA) <burhan.akbulut@etiya.com>
  2 siblings, 0 replies; 4+ messages in thread

From: Bruce Momjian @ 2021-08-26 13:18 UTC (permalink / raw)
  To: Burhan Akbulut (ETIYA) <burhan.akbulut@etiya.com>; +Cc: pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>

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.






^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Restrict user's query row number
@ 2021-08-26 13:23  Laurenz Albe <laurenz.albe@cybertec.at>
  parent: Burhan Akbulut (ETIYA) <burhan.akbulut@etiya.com>
  2 siblings, 0 replies; 4+ messages in thread

From: Laurenz Albe @ 2021-08-26 13:23 UTC (permalink / raw)
  To: Burhan Akbulut (ETIYA) <burhan.akbulut@etiya.com>; pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>

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






^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Restrict user's query row number
@ 2021-08-26 14:27  Holger Jakobs <holger@jakobs.com>
  parent: Burhan Akbulut (ETIYA) <burhan.akbulut@etiya.com>
  2 siblings, 0 replies; 4+ messages in thread

From: Holger Jakobs @ 2021-08-26 14:27 UTC (permalink / raw)
  To: pgsql-admin@lists.postgresql.org, "Burhan Akbulut (ETIYA)" <burhan.akbulut@etiya.com>; pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>



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
>
>[https://www.etiya.com/images/e-newsletter/signature/etiya_logo.png]
>[http://www.etiya.com/images/e-newsletter/signature/e_adres.png]<http://www.etiya.com;
>[http://www.etiya.com/images/e-newsletter/signature/facebook_icon.png]<https://www.facebook.com/Etiya-249050755136326/; [http://www.etiya.com/images/e-newsletter/signature/linkedin_icon.png] <https://www.linkedin.com/company/etiya?trk=tyah&trkInfo=tas%3Aetiya%2Cidx%3A1-1-1;  [http://www.etiya.com/images/e-newsletter/signature/instagram_icon.png] <https://www.instagram.com/etiya_/;  [http://www.etiya.com/images/e-newsletter/signature/youtube_icon.png] <https://www.youtube.com/channel/UCWjknu72sHoKKt2nujuU2kA;  [http://www.etiya.com/images/e-newsletter/signature/twitter_icon.png] <https://twitter.com/etiya;
>[http://www.etiya.com/images/e-newsletter/signature/0.png]
>
>Burhan Akbulut
>Senior Specialist, Database Management
>
>
>M:+90 552 997 52 97
>E:burhan.akbulut@etiya.com<mailto:burhan.akbulut@etiya.com>
>
>
>
>
>
>Yasal Uyari :
>Bu elektronik posta asagidaki adreste bulunan Kosul ve Sartlara tabidir;
>http://www.etiya.com/gizlilik<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 -

^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2021-08-26 14:27 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-08-26 12:05 Restrict user's query row number Burhan Akbulut (ETIYA) <burhan.akbulut@etiya.com>
2021-08-26 13:18 ` Bruce Momjian <bruce@momjian.us>
2021-08-26 13:23 ` Laurenz Albe <laurenz.albe@cybertec.at>
2021-08-26 14:27 ` Holger Jakobs <holger@jakobs.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox