pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedPrivilege mess?
5+ messages / 3 participants
[nested] [flat]
* Privilege mess?
@ 2018-10-09 19:26 Thiemo Kellner <thiemo@gelassene-pferde.biz>
0 siblings, 1 reply; 5+ messages in thread
From: Thiemo Kellner @ 2018-10-09 19:26 UTC (permalink / raw)
To: PostgreSQL General <pgsql-general@lists.postgresql.org>
Hi all
I installed pglogger (https://sourceforge.net/projects/pglogger/) and
try to insert into the "level" table as user "act" but it fails
claiming insufficient privileges even though insert is granted to
public (see below). What am I missing?
Kind regards Thiemo
thiemo @ thiemos-toshi ~/external_projects/pg-scd-code/trunk :-( %
psql -U act
psql (10.5 (Debian
10.5-1.pgdg90+1))
Type "help" for help.
act=> insert into logger.LEVEL (
act(> SCOPE,
act(> LEVEL
act(> ) values (
act(> 'inline_code_block',
act(> 'INFO'
act(> );
ERROR: permission denied for schema logger
LINE 1: insert into logger.LEVEL (
^
act=> SELECT grantor, grantee, table_catalog, table_schema,
table_name, privilege_type
act-> FROM information_schema.table_privileges
act-> WHERE grantor = 'logger'
act-> AND table_schema = 'logger'
act-> AND table_name = 'level';
grantor | grantee | table_catalog | table_schema | table_name |
privilege_type
---------+---------+---------------+--------------+------------+----------------
logger | PUBLIC | act | logger | level | INSERT
logger | PUBLIC | act | logger | level | SELECT
logger | PUBLIC | act | logger | level | UPDATE
logger | PUBLIC | act | logger | level | DELETE
(4 rows)
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Privilege mess?
@ 2018-10-09 20:56 Christoph Moench-Tegeder <cmt@burggraben.net>
parent: Thiemo Kellner <thiemo@gelassene-pferde.biz>
0 siblings, 1 reply; 5+ messages in thread
From: Christoph Moench-Tegeder @ 2018-10-09 20:56 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
## Thiemo Kellner (thiemo@gelassene-pferde.biz):
> I installed pglogger (https://sourceforge.net/projects/pglogger/) and
> try to insert into the "level" table as user "act" but it fails
> claiming insufficient privileges even though insert is granted to
> public (see below). What am I missing?
Schema privileges.
> ERROR: permission denied for schema logger
> LINE 1: insert into logger.LEVEL (
It says "permission denied for schema", so this is not about table
privileges (GRANT INSERT/UPDATE/... ON TABLE ...), but about schema
provileges. I'd guess you miss USAGE on schema logger.
See https://www.postgresql.org/docs/current/static/sql-grant.html
AFAIK those privileges are not found in information_schema, you'll
have to use pg_catalog for that.
Regards,
Christoph
--
Spare Space.
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Privilege mess?
@ 2018-10-09 22:47 Thiemo Kellner <thiemo@gelassene-pferde.biz>
parent: Christoph Moench-Tegeder <cmt@burggraben.net>
0 siblings, 1 reply; 5+ messages in thread
From: Thiemo Kellner @ 2018-10-09 22:47 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
Quoting Christoph Moench-Tegeder <cmt@burggraben.net>:
> Schema privileges.
> provileges. I'd guess you miss USAGE on schema logger.
Thanks for the hint. I did not know about a usage grant coming from
Oracle, so I completely ignored the possibility of the absence of a
different grant. I just read the documentation but I cannot get grip
on the sense behind it:
'For schemas, ... this allows the grantee to “look up” objects within
the schema. Without this permission, it is still possible to see the
object names, e.g. by querying the system tables.'
Does it not say you do not need the usage privilege as you can query
the data catalog anyway to get the object's details? And in deed,
DBeaver queries the details of the object without the usage privilege.
To carry out actions on objects one needs the specific grant like
select anyway. I do not see the point of usage privilege.
I would be grateful I some could shed some more light for me.
Kind regards Thiemo
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Privilege mess?
@ 2018-10-09 22:59 David G. Johnston <david.g.johnston@gmail.com>
parent: Thiemo Kellner <thiemo@gelassene-pferde.biz>
0 siblings, 1 reply; 5+ messages in thread
From: David G. Johnston @ 2018-10-09 22:59 UTC (permalink / raw)
To: Thiemo Kellner <thiemo@gelassene-pferde.biz>; +Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
On Tuesday, October 9, 2018, Thiemo Kellner <thiemo@gelassene-pferde.biz>
wrote:
>
> Does it not say you do not need the usage privilege as you can query the
> data catalog anyway to get the object's details? And in deed, DBeaver
> queries the details of the object without the usage privilege.
Basically lacking USAGE does not prevent someone from knowing objects
within the schema exist, it just prevents queries from referencing them as
named objects.
> To carry out actions on objects one needs the specific grant like select
> anyway. I do not see the point of usage privilege.
Layers of security. But yes it is generally sufficient enough to simply
allow usage on scheme without much thought while ensuring contained objects
are sufficiently secured.
David J.
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Privilege mess?
@ 2018-10-10 06:11 Thiemo Kellner <thiemo@gelassene-pferde.biz>
parent: David G. Johnston <david.g.johnston@gmail.com>
0 siblings, 0 replies; 5+ messages in thread
From: Thiemo Kellner @ 2018-10-10 06:11 UTC (permalink / raw)
To: PostgreSQL General <pgsql-general@lists.postgresql.org>
Quoting "David G. Johnston" <david.g.johnston@gmail.com>:
> Layers of security. But yes it is generally sufficient enough to
> simply allow usage on scheme without much
> thought while ensuring contained objects are sufficiently secured.
Thanks :-)
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2018-10-10 06:11 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-10-09 19:26 Privilege mess? Thiemo Kellner <thiemo@gelassene-pferde.biz>
2018-10-09 20:56 ` Christoph Moench-Tegeder <cmt@burggraben.net>
2018-10-09 22:47 ` Thiemo Kellner <thiemo@gelassene-pferde.biz>
2018-10-09 22:59 ` David G. Johnston <david.g.johnston@gmail.com>
2018-10-10 06:11 ` Thiemo Kellner <thiemo@gelassene-pferde.biz>
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