pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
User mapping security
5+ messages / 4 participants
[nested] [flat]

* User mapping security
@ 2019-07-16 02:01 PG Doc comments form <noreply@postgresql.org>
  2023-11-09 21:42 ` Re: User mapping security Bruce Momjian <bruce@momjian.us>
  0 siblings, 1 reply; 5+ messages in thread

From: PG Doc comments form @ 2019-07-16 02:01 UTC (permalink / raw)
  To: pgsql-docs@lists.postgresql.org; +Cc: greatvovan@gmail.com

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/10/postgres-fdw.html
Description:

Regarding the documentation pages
https://www.postgresql.org/docs/10/postgres-fdw.html?origin_team=T02HEPYKQ
and https://www.postgresql.org/docs/10/sql-createusermapping.html

I suppose it should be warned on the pages that foreign credentials with be
stored as simple text and will be available for viewing in pg_user_mappings.


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

* Re: User mapping security
  2019-07-16 02:01 User mapping security PG Doc comments form <noreply@postgresql.org>
@ 2023-11-09 21:42 ` Bruce Momjian <bruce@momjian.us>
  2023-11-09 22:02   ` Re: User mapping security Stephen Frost <sfrost@snowman.net>
  2023-11-09 22:03   ` Re: User mapping security Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 2 replies; 5+ messages in thread

From: Bruce Momjian @ 2023-11-09 21:42 UTC (permalink / raw)
  To: greatvovan@gmail.com; pgsql-docs@lists.postgresql.org

On Tue, Jul 16, 2019 at 02:01:00AM +0000, PG Doc comments form wrote:
> The following documentation comment has been logged on the website:
> 
> Page: https://www.postgresql.org/docs/10/postgres-fdw.html
> Description:
> 
> Regarding the documentation pages
> https://www.postgresql.org/docs/10/postgres-fdw.html?origin_team=T02HEPYKQ
> and https://www.postgresql.org/docs/10/sql-createusermapping.html
> 
> I suppose it should be warned on the pages that foreign credentials with be
> stored as simple text and will be available for viewing in pg_user_mappings.

I know this is four years old, but the attached patch documents it.  I
don't think postgresql-fdw needs it since it relies on user mapping and
discourages passwords in the connection string.

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

  Only you can decide what is important to you.

Attachments:

  [text/x-diff] usermap.diff (922B, ../../ZU1SOvgnwbBawgzN@momjian.us/2-usermap.diff)
  download | inline diff:
diff --git a/doc/src/sgml/ref/create_user_mapping.sgml b/doc/src/sgml/ref/create_user_mapping.sgml
index 55debd5401..e93bfe48f6 100644
--- a/doc/src/sgml/ref/create_user_mapping.sgml
+++ b/doc/src/sgml/ref/create_user_mapping.sgml
@@ -92,7 +92,11 @@ CREATE USER MAPPING [ IF NOT EXISTS ] FOR { <replaceable class="parameter">user_
       This clause specifies the options of the user mapping.  The
       options typically define the actual user name and password of
       the mapping.  Option names must be unique.  The allowed option
-      names and values are specific to the server's foreign-data wrapper.
+      names and values are specific to the server's foreign-data
+      wrapper.  Option values, including passwords, are visible in the
+      <link
+      linkend="catalog-pg-user-mapping"><structname>pg_user_mapping</structname></link>
+      system view.
      </para>
     </listitem>
    </varlistentry>

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

* Re: User mapping security
  2019-07-16 02:01 User mapping security PG Doc comments form <noreply@postgresql.org>
  2023-11-09 21:42 ` Re: User mapping security Bruce Momjian <bruce@momjian.us>
@ 2023-11-09 22:02   ` Stephen Frost <sfrost@snowman.net>
  1 sibling, 0 replies; 5+ messages in thread

From: Stephen Frost @ 2023-11-09 22:02 UTC (permalink / raw)
  To: Bruce Momjian <bruce@momjian.us>; +Cc: greatvovan@gmail.com; pgsql-docs@lists.postgresql.org

Greetings,

* Bruce Momjian (bruce@momjian.us) wrote:
> On Tue, Jul 16, 2019 at 02:01:00AM +0000, PG Doc comments form wrote:
> > The following documentation comment has been logged on the website:
> > 
> > Page: https://www.postgresql.org/docs/10/postgres-fdw.html
> > Description:
> > 
> > Regarding the documentation pages
> > https://www.postgresql.org/docs/10/postgres-fdw.html?origin_team=T02HEPYKQ
> > and https://www.postgresql.org/docs/10/sql-createusermapping.html
> > 
> > I suppose it should be warned on the pages that foreign credentials with be
> > stored as simple text and will be available for viewing in pg_user_mappings.
> 
> I know this is four years old, but the attached patch documents it.  I
> don't think postgresql-fdw needs it since it relies on user mapping and
> discourages passwords in the connection string.

A bit on the fence about it ... but I do wonder if we should encourage
use of gssapi and credential delegation now that we support that and
point out that storing passwords isn't required if you're using gssapi.

Thanks,

Stephen

> diff --git a/doc/src/sgml/ref/create_user_mapping.sgml b/doc/src/sgml/ref/create_user_mapping.sgml
> index 55debd5401..e93bfe48f6 100644
> --- a/doc/src/sgml/ref/create_user_mapping.sgml
> +++ b/doc/src/sgml/ref/create_user_mapping.sgml
> @@ -92,7 +92,11 @@ CREATE USER MAPPING [ IF NOT EXISTS ] FOR { <replaceable class="parameter">user_
>        This clause specifies the options of the user mapping.  The
>        options typically define the actual user name and password of
>        the mapping.  Option names must be unique.  The allowed option
> -      names and values are specific to the server's foreign-data wrapper.
> +      names and values are specific to the server's foreign-data
> +      wrapper.  Option values, including passwords, are visible in the
> +      <link
> +      linkend="catalog-pg-user-mapping"><structname>pg_user_mapping</structname></link>
> +      system view.
>       </para>
>      </listitem>
>     </varlistentry>

Attachments:

  [application/pgp-signature] signature.asc (832B, ../../ZU1XDU7dWU1zLLv2@tamriel.snowman.net/2-signature.asc)
  download

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

* Re: User mapping security
  2019-07-16 02:01 User mapping security PG Doc comments form <noreply@postgresql.org>
  2023-11-09 21:42 ` Re: User mapping security Bruce Momjian <bruce@momjian.us>
@ 2023-11-09 22:03   ` Tom Lane <tgl@sss.pgh.pa.us>
  2023-11-09 22:09     ` Re: User mapping security Bruce Momjian <bruce@momjian.us>
  1 sibling, 1 reply; 5+ messages in thread

From: Tom Lane @ 2023-11-09 22:03 UTC (permalink / raw)
  To: Bruce Momjian <bruce@momjian.us>; +Cc: greatvovan@gmail.com; pgsql-docs@lists.postgresql.org

Bruce Momjian <bruce@momjian.us> writes:
> On Tue, Jul 16, 2019 at 02:01:00AM +0000, PG Doc comments form wrote:
>> I suppose it should be warned on the pages that foreign credentials with be
>> stored as simple text and will be available for viewing in pg_user_mappings.

> I know this is four years old, but the attached patch documents it.  I
> don't think postgresql-fdw needs it since it relies on user mapping and
> discourages passwords in the connection string.

This is far too alarmist.  It ignores the privilege restrictions that
are built into the pg_user_mappings view.  Random users can't see
umoptions.

			regards, tom lane





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

* Re: User mapping security
  2019-07-16 02:01 User mapping security PG Doc comments form <noreply@postgresql.org>
  2023-11-09 21:42 ` Re: User mapping security Bruce Momjian <bruce@momjian.us>
  2023-11-09 22:03   ` Re: User mapping security Tom Lane <tgl@sss.pgh.pa.us>
@ 2023-11-09 22:09     ` Bruce Momjian <bruce@momjian.us>
  0 siblings, 0 replies; 5+ messages in thread

From: Bruce Momjian @ 2023-11-09 22:09 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: greatvovan@gmail.com; pgsql-docs@lists.postgresql.org

On Thu, Nov  9, 2023 at 05:03:33PM -0500, Tom Lane wrote:
> Bruce Momjian <bruce@momjian.us> writes:
> > On Tue, Jul 16, 2019 at 02:01:00AM +0000, PG Doc comments form wrote:
> >> I suppose it should be warned on the pages that foreign credentials with be
> >> stored as simple text and will be available for viewing in pg_user_mappings.
> 
> > I know this is four years old, but the attached patch documents it.  I
> > don't think postgresql-fdw needs it since it relies on user mapping and
> > discourages passwords in the connection string.
> 
> This is far too alarmist.  It ignores the privilege restrictions that
> are built into the pg_user_mappings view.  Random users can't see
> umoptions.

True.  I wasn't sure how much of an issue it was to expose passwords at
the SQL level, but I will drop the idea.

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

  Only you can decide what is important to you.





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


end of thread, other threads:[~2023-11-09 22:09 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-07-16 02:01 User mapping security PG Doc comments form <noreply@postgresql.org>
2023-11-09 21:42 ` Bruce Momjian <bruce@momjian.us>
2023-11-09 22:02   ` Stephen Frost <sfrost@snowman.net>
2023-11-09 22:03   ` Tom Lane <tgl@sss.pgh.pa.us>
2023-11-09 22:09     ` Bruce Momjian <bruce@momjian.us>

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