public inbox for [email protected]
help / color / mirror / Atom feedprevent users from SELECT-ing from pg_roles/pg_database
2+ messages / 2 participants
[nested] [flat]
* prevent users from SELECT-ing from pg_roles/pg_database
@ 2024-05-24 15:51 Andreas Joseph Krogh <[email protected]>
2024-05-24 16:28 ` Re: prevent users from SELECT-ing from pg_roles/pg_database Muhammad Salahuddin Manzoor <[email protected]>
0 siblings, 1 reply; 2+ messages in thread
From: Andreas Joseph Krogh @ 2024-05-24 15:51 UTC (permalink / raw)
To: [email protected]
Hi, is there a way to prevent a user/role from SELECT-ing from certain
system-tables?
I'd like the contents of pg_{user,roles,database} to not be visible to all
users.
Thanks.
--
Andreas Joseph Krogh
CTO / Partner - Visena AS
Mobile: +47 909 56 963
[email protected] <mailto:[email protected]>
www.visena.com <https://www.visena.com;
<https://www.visena.com;
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: prevent users from SELECT-ing from pg_roles/pg_database
2024-05-24 15:51 prevent users from SELECT-ing from pg_roles/pg_database Andreas Joseph Krogh <[email protected]>
@ 2024-05-24 16:28 ` Muhammad Salahuddin Manzoor <[email protected]>
0 siblings, 0 replies; 2+ messages in thread
From: Muhammad Salahuddin Manzoor @ 2024-05-24 16:28 UTC (permalink / raw)
To: Andreas Joseph Krogh <[email protected]>; +Cc: pgsql-general <[email protected]>
Greetings,
To prevent a user or role from selecting data from certain system tables in
PostgreSQL, you can revoke the default select permissions on those tables.
Here’s how you can do it:
1. Revoke SELECT permission on the system tables from the public role.
2. Grant SELECT permission only to specific roles that need it.
Here’s a step-by-step guide on how to achieve this:
Salahuddin.
On Fri, 24 May 2024, 20:52 Andreas Joseph Krogh, <[email protected]> wrote:
> Hi, is there a way to prevent a user/role from SELECT-ing from certain
> system-tables?
>
>
>
> I'd like the contents of pg_{user,roles,database} to not be visible to all
> users.
>
>
>
> Thanks.
>
>
> --
> *Andreas Joseph Krogh*
> CTO / Partner - Visena AS
> Mobile: +47 909 56 963
> [email protected]
> www.visena.com
> <https://www.visena.com;
>
Attachments:
[image/png] noname (1.9K, 3-noname)
download | view image
[image/png] noname (1.9K, 4-noname)
download | view image
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2024-05-24 16:28 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-05-24 15:51 prevent users from SELECT-ing from pg_roles/pg_database Andreas Joseph Krogh <[email protected]>
2024-05-24 16:28 ` Muhammad Salahuddin Manzoor <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox