agora inbox for pgsql-docs@postgresql.org  
help / color / mirror / Atom feed
Does NOTIFY leak information?
3+ messages / 3 participants
[nested] [flat]

* Does NOTIFY leak information?
@ 2024-12-04 00:02 PG Doc comments form <noreply@postgresql.org>
  2024-12-04 13:34 ` Re: Does NOTIFY leak information? David G. Johnston <david.g.johnston@gmail.com>
  2024-12-04 15:56 ` Re: Does NOTIFY leak information? Greg Sabino Mullane <htamfids@gmail.com>
  0 siblings, 2 replies; 3+ messages in thread

From: PG Doc comments form @ 2024-12-04 00:02 UTC (permalink / raw)
  To: pgsql-docs@lists.postgresql.org; +Cc: zack02469@yahoo.com

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/17/sql-notify.html
Description:

Hi,

The documentation (https://www.postgresql.org/docs/17/sql-notify.html) for
the NOTIFY command begins with the following statements:

The NOTIFY command sends a notification event together with an optional
“payload” string to each client application that has previously executed
LISTEN channel for the specified channel name in the current database.
Notifications are visible to all users.

I am interpreting this to mean that if I as user A receive a notification to
a channel that I have set up, then user B and user C will also see this
notification, irrespective of their various permissions. Am I understanding
this correctly, and if so, doesn't this qualify as an information leak?


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

* Re: Does NOTIFY leak information?
  2024-12-04 00:02 Does NOTIFY leak information? PG Doc comments form <noreply@postgresql.org>
@ 2024-12-04 13:34 ` David G. Johnston <david.g.johnston@gmail.com>
  1 sibling, 0 replies; 3+ messages in thread

From: David G. Johnston @ 2024-12-04 13:34 UTC (permalink / raw)
  To: zack02469@yahoo.com <zack02469@yahoo.com>; pgsql-docs@lists.postgresql.org <pgsql-docs@lists.postgresql.org>

On Tuesday, December 3, 2024, PG Doc comments form <noreply@postgresql.org>
wrote:

>
> I am interpreting this to mean that if I as user A receive a notification
> to
> a channel that I have set up, then user B and user C will also see this
> notification, irrespective of their various permissions. Am I understanding
> this correctly, and if so, doesn't this qualify as an information leak?
>

Maybe, but given that is the explicit design of the feature it isn’t
something we are compelled to change.  Don’t put sensitive data in the
payload, or just don’t use the feature if the public permission-less
broadcast behavior doesn’t work for you.

David J.

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

* Re: Does NOTIFY leak information?
  2024-12-04 00:02 Does NOTIFY leak information? PG Doc comments form <noreply@postgresql.org>
@ 2024-12-04 15:56 ` Greg Sabino Mullane <htamfids@gmail.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Greg Sabino Mullane @ 2024-12-04 15:56 UTC (permalink / raw)
  To: zack02469@yahoo.com; pgsql-docs@lists.postgresql.org

On Wed, Dec 4, 2024 at 8:03 AM PG Doc comments form <noreply@postgresql.org>
wrote:

> I am interpreting this to mean that if I as user A receive a notification
> to
> a channel that I have set up, then user B and user C will also see this
> notification, irrespective of their various permissions. Am I understanding
> this correctly, and if so, doesn't this qualify as an information leak?
>

No: it is a public broadcast, with no permissions implied (or allowed!).
However, you can certainly store sensitive information elsewhere (e.g. a
table), and use the notification as a way of signalling "hey, check the
secure drop box, I just put something inside there"

If you still feel the docs are unclear about this, we are always welcome to
wording suggestions.

Cheers,
Greg

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


end of thread, other threads:[~2024-12-04 15:56 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-12-04 00:02 Does NOTIFY leak information? PG Doc comments form <noreply@postgresql.org>
2024-12-04 13:34 ` David G. Johnston <david.g.johnston@gmail.com>
2024-12-04 15:56 ` Greg Sabino Mullane <htamfids@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