pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #16603: Permission issue
2+ messages / 2 participants
[nested] [flat]

* BUG #16603: Permission issue
@ 2020-09-01 16:09  PG Bug reporting form <noreply@postgresql.org>
  0 siblings, 1 reply; 2+ messages in thread

From: PG Bug reporting form @ 2020-09-01 16:09 UTC (permalink / raw)
  To: pgsql-bugs@lists.postgresql.org; +Cc: yuri6037@outlook.com

The following bug has been logged on the website:

Bug reference:      16603
Logged by:          PostgreSQL create database with full privileges granted to one specific
user.
Email address:      yuri6037@outlook.com
PostgreSQL version: 12.4
Operating system:   Linux and Windows
Description:        

The following MySQL query: GRANT ALL PRIVILEGES ON database_name.* TO
'username'@'localhost'; allows one to assign one database to a given user.
That includes ALL permissions even database creation.
Currently this behavior is impossible in PostgreSQL: One can create a
database and GRANT ALL PRIVILEGES however this won't grant the CREATEDB
permission on that database. The bug/issue here is that CREATEDB cannot be
assigned to a specific database/user combination.

Currently this bug prevents development of some applications. As such in one
of my application I was forced to drop support for PostgreSQL and return to
MySQL.



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

* Re: BUG #16603: Permission issue
@ 2020-09-01 16:16  Stephen Frost <sfrost@snowman.net>
  parent: PG Bug reporting form <noreply@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Stephen Frost @ 2020-09-01 16:16 UTC (permalink / raw)
  To: yuri6037@outlook.com; pgsql-bugs@lists.postgresql.org

Greetings,

* PG Bug reporting form (noreply@postgresql.org) wrote:
> The following MySQL query: GRANT ALL PRIVILEGES ON database_name.* TO
> 'username'@'localhost'; allows one to assign one database to a given user.
> That includes ALL permissions even database creation.

> Currently this behavior is impossible in PostgreSQL: One can create a
> database and GRANT ALL PRIVILEGES however this won't grant the CREATEDB
> permission on that database. The bug/issue here is that CREATEDB cannot be
> assigned to a specific database/user combination.

No, it's not currently possible to GRANT access to objects that don't
exist in PG.  This isn't a bug, as for if it's a possible future
feature, maybe (there's a current patch that I'm working on to GRANT
things like 'read only' or 'write only' access to all tables/views/etc),
but I don't expect to ever support the ability for GRANT to explicitly
name an object that doesn't exist yet (seems like it'd be rather
concerning too, because what if someone *else* created that database?
Suddenly this user has access to it?  No, thanks).

> Currently this bug prevents development of some applications. As such in one
> of my application I was forced to drop support for PostgreSQL and return to
> MySQL.

This hasn't ever worked in PG, so it seems a little curious that it's
the cause for PG support to be dropped.  Still, it's definitely not a
bug and certainly wouldn't be added to existing releases.  If you're
interested in following the development of PG, I'd suggest you take a
look at the -hackers mailing list.

Thanks,

Stephen

Attachments:

  signature.asc (application/pgp-signature, 818B) download

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


end of thread, other threads:[~2020-09-01 16:16 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-09-01 16:09 BUG #16603: Permission issue PG Bug reporting form <noreply@postgresql.org>
2020-09-01 16:16 ` Stephen Frost <sfrost@snowman.net>

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