Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hze9B-00025q-PY for pgsql-bugs@arkaria.postgresql.org; Mon, 19 Aug 2019 09:40:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hze9A-0007HB-5P for pgsql-bugs@arkaria.postgresql.org; Mon, 19 Aug 2019 09:40:16 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hze99-0007H4-MY for pgsql-bugs@lists.postgresql.org; Mon, 19 Aug 2019 09:40:15 +0000 Received: from cyclops.postgrespro.ru ([93.174.131.138] helo=mail.postgrespro.ru) by makus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1hze92-0000JN-3B for pgsql-bugs@lists.postgresql.org; Mon, 19 Aug 2019 09:40:14 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.postgrespro.ru (Postfix) with ESMTP id 69F3B21C1C8A; Mon, 19 Aug 2019 12:40:06 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at postgrespro.ru X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=x tagged_above=-99 required=4 WHITELISTED tests=[] autolearn=unavailable Received: from [192.168.27.237] (gw.postgrespro.ru [93.174.131.141]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mail.postgrespro.ru (Postfix) with ESMTPSA id 1947421C1C89; Mon, 19 Aug 2019 12:40:06 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mail; t=1566207606; bh=d09B5qzqlrVFQg/pFTNsANNS2tTeZUoWjvKSYWMFwdk=; h=Subject:To:References:From:Date:In-Reply-To; b=GGU8BEFAOMH6NlT95Ho33Gl2Izcqan9596e9eb33fRn7zeKvWFAX86/FhshtzHpfF 89ps8gOyMaQ23rFr9teeaioinOYuQZD+uXxCLcd/aukw2TOlCHw1KjCQSUQ1WFQkx4 duqAlWIQVIFToxedJaBR8LCH2hd8V1cuCTFMXBMc= Subject: Re: BUG #15961: psql should be able to read password from stdin To: rhpatrick@gmail.com, pgsql-bugs@lists.postgresql.org References: <15961-a17e673003b92f17@postgresql.org> From: Arthur Zakirov Message-ID: <174993ee-33da-4b5a-8568-7575b7f9e9dc@postgrespro.ru> Date: Mon, 19 Aug 2019 12:40:05 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <15961-a17e673003b92f17@postgresql.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 16.08.2019 17:20, PG Bug reporting form wrote: > My use case is that I am writing terraform scripts to standup Sonarqube in > AWS. After creating the AWS RDS PostgreSQL database, I need to be able to > create the sonarqube user and grant access to the sonarqube database that > was created with the RDS instance. I can work around this using the > PGPASSWORD environment variable but that seems to be deprecated. I don't > want to use the .pgpass solution since I don't want/need the postgres user's > credentials in my EC2 instance where the Sonarqube server will be running... Is PGPASSWORD really deprecated? The documentation just says that it is not recommended to use it for security reasons, and it doesn't say that the variable is deprecated: https://www.postgresql.org/docs/current/libpq-envars.html I guess passing a password by command-line might have similar security problems. If it suits you then PGPASSWORD should work for you too. -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company