agora inbox for pgsql-sql@postgresql.org
help / color / mirror / Atom feedHow to revoke access and list schema objects
2+ messages / 2 participants
[nested] [flat]
* How to revoke access and list schema objects
@ 2021-08-13 16:00 intmail01@gmail.com <intmail01@gmail.com>
0 siblings, 1 reply; 2+ messages in thread
From: intmail01@gmail.com @ 2021-08-13 16:00 UTC (permalink / raw)
To: pgsql-sql@lists.postgresql.org
Hi,
There are are some people who use my database and I want to prevent them
to read code of tables and funtions. I have created a schema in which
only postgres user can have access. Other users can not use objects in
this but they can list all sql code for each object if they use pgadmin.
What is the command to prevent users to list objects and prevent them to
read the sql code.
Thanks
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: How to revoke access and list schema objects
@ 2021-08-13 19:03 Programadores cba <cbaprogramadores@gmail.com>
parent: intmail01@gmail.com <intmail01@gmail.com>
0 siblings, 0 replies; 2+ messages in thread
From: Programadores cba @ 2021-08-13 19:03 UTC (permalink / raw)
To: intmail01@gmail.com; +Cc: pgsql-sql@lists.postgresql.org
For a production system, you can use this configuration :
--ACCESS DBREVOKE CONNECT ON DATABASE nova FROM PUBLIC;GRANT CONNECT
ON DATABASE nova TO user;
--ACCESS SCHEMAREVOKE ALL ON SCHEMA public FROM PUBLIC;GRANT
USAGE ON SCHEMA public TO user;
--ACCESS TABLESREVOKE ALL ON ALL TABLES IN SCHEMA public FROM PUBLIC
;GRANT SELECT ON ALL TABLES IN SCHEMA public
TO read_only ;GRANT SELECT, INSERT, UPDATE, DELETE ON ALL TABLES IN
SCHEMA public TO read_write ;GRANT ALL ON
ALL TABLES IN SCHEMA public TO admin ;
El vie, 13 ago 2021 a las 11:59, intmail01@gmail.com (<intmail01@gmail.com>)
escribió:
> Hi,
>
> There are are some people who use my database and I want to prevent them
> to read code of tables and funtions. I have created a schema in which
> only postgres user can have access. Other users can not use objects in
> this but they can list all sql code for each object if they use pgadmin.
> What is the command to prevent users to list objects and prevent them to
> read the sql code.
>
> Thanks
>
>
>
>
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2021-08-13 19:03 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-08-13 16:00 How to revoke access and list schema objects intmail01@gmail.com <intmail01@gmail.com>
2021-08-13 19:03 ` Programadores cba <cbaprogramadores@gmail.com>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox