Re: Row data is reflected in DETAIL message when constraints fail on insert/update

From: Shay Rojansky <roji(at)roji(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Karsten Hilbert <Karsten(dot)Hilbert(at)gmx(dot)net>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Row data is reflected in DETAIL message when constraints fail on insert/update
Date: 2019-06-20 15:50:21
Message-ID: CADT4RqA=Z2EB6irHWg_9i80aQJzZtt+5M1gDokaS9Uo2Xe_7UQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

>> A specifig knob for "sensitive data" cannot be supplied by
>> PostgreSQL because it cannot know beforehand what information
>> will be considered sensitive under a given, future, usage
>> scenario.

> Yeah, it's fairly hard to see how we could respond to this complaint
> without lobotomizing our error messages to the point of near uselessness.
> Almost any non-constant text in an error report could possibly be seen
> as hazardous.

I don't think that's true - schema information (table, column names)
definitely seems like it's in a different category than table contents.

> More generally: I find this complaint a little confusing. We did not
> consider reporting the "show row contents" DETAIL to the client to be a
> security hazard when it was added, because one would think that that's
> just data that the client already knows anyway. I'd be interested to see
> a plausible use-case in which the message would reflect PII that had not
> been supplied by or available to the client.

I'm imagining two main scenarios here.

First, there are many lazily-written applications out there which simply
show exception/error messages to users. So user A could interact with a
website in a way that triggers a unique constraint violation, and thereby
get access to the data in the row which caused the violation.

Second, such exceptions and errors frequently get logged (e.g. to disk).
Logs in general aren't kept as secure as database data itself (who knows
where they end up and who handles them).

In this day and age of increased attention to personal information it seems
quite risky to be sending row contents via error messages without an
opt-in...

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Simon Riggs 2019-06-20 16:00:34 Re: Detaching multiple partitions in 1 ALTER TABLE statement
Previous Message Ian Barwick 2019-06-20 15:34:55 Re: [EXT EMAIL] Re: First Time Starting Up PostgreSQL and Having Problems