Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kDAye-00061y-PW for pgsql-admin@arkaria.postgresql.org; Tue, 01 Sep 2020 18:25:52 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kDAy7-0000CW-Ue for pgsql-admin@arkaria.postgresql.org; Tue, 01 Sep 2020 18:25:19 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kDAy7-0000CN-MY for pgsql-admin@lists.postgresql.org; Tue, 01 Sep 2020 18:25:19 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kDAy0-0002R5-QH for pgsql-admin@lists.postgresql.org; Tue, 01 Sep 2020 18:25:18 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 081IPAxD142975; Tue, 1 Sep 2020 14:25:11 -0400 From: Tom Lane To: Nicholas Chammas cc: pgsql-admin@lists.postgresql.org Subject: Re: Amazon RDS auth tokens in .pgpass In-reply-to: References: <4119486.1598897040@sss.pgh.pa.us> Comments: In-reply-to Nicholas Chammas message dated "Mon, 31 Aug 2020 15:12:01 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <142973.1598984710.1@sss.pgh.pa.us> Date: Tue, 01 Sep 2020 14:25:10 -0400 Message-ID: <142974.1598984710@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Nicholas Chammas writes: > On Mon, Aug 31, 2020 at 2:04 PM Tom Lane wrote: >> Looking at the source code, there's a hard-wired restriction that lines of >> .pgpass can't be more than 320 characters long (well, NAMEDATALEN*5, but >> very few builds don't have NAMEDATALEN=64). I see that somebody very >> recently added code to make libpq print a warning for overlength lines, >> but I wonder why they didn't just, um, remove the restriction. We had >> not previously heard of a use-case for passwords with hundreds of >> characters in them, but I guess we need to cope. > Just FYI, the auth tokens generated by Amazon RDS appear to be 796 bytes > long. Thanks. I've pushed a fix to remove libpq's undocumented restriction on the length of a .pgpass line. It will be in November's releases. regards, tom lane