Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r1DDt-00A1hl-Q0 for pgsql-docs@arkaria.postgresql.org; Thu, 09 Nov 2023 22:10:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1r1DDs-00HEsi-4r for pgsql-docs@arkaria.postgresql.org; Thu, 09 Nov 2023 22:10:00 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r1DDr-00HEsZ-TW for pgsql-docs@lists.postgresql.org; Thu, 09 Nov 2023 22:09:59 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r1DDp-004nzg-7E for pgsql-docs@lists.postgresql.org; Thu, 09 Nov 2023 22:09:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=momjian.us; s=2023062407; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description; bh=xYX2hXZPquz0GSTxGWQOZKX6vGoWDYkVaTV0OuT+QDM=; b=YaZS+ tZdWK+PGNGkhQKtp7+lt+MH+udT4Kirp36V6liHpaeTzvvSGcEQgkqOtey0yVAipefkbozU9H5b/9 XruduJdRobUJ2vPjrFXgh2nXlYSNBee1xSaRvg/yroMLg/uMhbCiXrOmj7zOlzXQUIDTUUoIWgghm L8lP82BoJNO23VHVMOo26IwyYTf6/7OqjQqa5gxx7eYXb5EnG9aApT30fGqqU8/cU3lL54D+FRKyQ THN0P3JKNRc3PHgt3o3apo+KEbu79q2M6kRNX7vGZ4XhrIvVv4kye5ZdtCrUyQqPK2TA3yRByFUxw rlYF5ut5IqqxbaXjBUr7wLmEB9Kuw==; Received: from bruce by momjian.us with local (Exim 4.96) (envelope-from ) id 1r1DDn-002osN-2U; Thu, 09 Nov 2023 17:09:55 -0500 Date: Thu, 9 Nov 2023 17:09:55 -0500 From: Bruce Momjian To: Tom Lane Cc: greatvovan@gmail.com, pgsql-docs@lists.postgresql.org Subject: Re: User mapping security Message-ID: References: <156324246053.1191.5972769566826595079@wrigleys.postgresql.org> <1258588.1699567413@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1258588.1699567413@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, Nov 9, 2023 at 05:03:33PM -0500, Tom Lane wrote: > Bruce Momjian 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 https://momjian.us EDB https://enterprisedb.com Only you can decide what is important to you.