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 1nPekV-00083O-6Q for pgsql-hackers@arkaria.postgresql.org; Thu, 03 Mar 2022 06:15:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nPekS-0003OF-8K for pgsql-hackers@arkaria.postgresql.org; Thu, 03 Mar 2022 06:15:36 +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 1nPekR-0003NL-Uq for pgsql-hackers@lists.postgresql.org; Thu, 03 Mar 2022 06:15:35 +0000 Received: from mx0a-0050f201.pphosted.com ([148.163.145.86]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nPekN-0008Hz-B3 for pgsql-hackers@lists.postgresql.org; Thu, 03 Mar 2022 06:15:34 +0000 Received: from pps.filterd (m0203369.ppops.net [127.0.0.1]) by mx0b-0050f201.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 222LvJdZ011059 for ; Thu, 3 Mar 2022 15:15:29 +0900 Received: from sraihe.sra.co.jp (sraihe.sra.co.jp [221.255.117.38]) by mx0b-0050f201.pphosted.com (PPS) with ESMTP id 3ehhv2a2cj-1 for ; Thu, 03 Mar 2022 15:15:29 +0900 Received: from srascb.sra.co.jp (srascb [133.137.8.65]) by sraihe.sra.co.jp (Postfix) with ESMTP id D0F3C2A6863 for ; Thu, 3 Mar 2022 15:15:28 +0900 (JST) Received: from sranhm.sra.co.jp (osspc47 [133.137.174.164]) by srascb.sra.co.jp (Postfix) with ESMTP id BDD7058024C for ; Thu, 3 Mar 2022 15:15:28 +0900 (JST) Received: from localhost (sraihb-hub.sra.co.jp [133.137.8.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sranhm.sra.co.jp (Postfix) with ESMTPSA id 7F027341379; Thu, 3 Mar 2022 15:15:28 +0900 (JST) Date: Thu, 03 Mar 2022 15:15:24 +0900 (JST) Message-Id: <20220303.151524.1159715505705492773.t-ishii@sranhm.sra.co.jp> To: sfrost@snowman.net Cc: tgl@sss.pgh.pa.us, pgsql@j-davis.com, smilingsamay@gmail.com, pgsql-hackers@lists.postgresql.org Subject: Re: Proposal: Support custom authentication methods using hooks From: Tatsuo Ishii In-Reply-To: <20220228214255.GO10577@tamriel.snowman.net> References: <20220228204634.GM10577@tamriel.snowman.net> <2738622.1646083128@sss.pgh.pa.us> <20220228214255.GO10577@tamriel.snowman.net> X-Mailer: Mew version 6.8 on Emacs 26.3 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Proofpoint-GUID: m0W1P7Ie8G4kw5PWGwwMCOlivE7LxPHP X-Proofpoint-ORIG-GUID: m0W1P7Ie8G4kw5PWGwwMCOlivE7LxPHP X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10274 signatures=686787 X-Proofpoint-Spam-Details: rule=spam_low_notspam policy=spam_low score=0 mlxscore=0 priorityscore=1501 adultscore=0 phishscore=0 impostorscore=0 malwarescore=0 lowpriorityscore=0 suspectscore=0 bulkscore=0 clxscore=1034 spamscore=0 mlxlogscore=359 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2201110000 definitions=main-2203030030 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > Yes, really, it's a known-broken system which suffers from such an old > and well known attack that it's been given a name: pass-the-hash. As > was discussed on this thread even, just the fact that it's not trivial > to break on the wire doesn't make it not-broken, particularly when we > use the username (which is rather commonly the same one used across > multiple systems..) as the salt. Worse, md5 isn't exactly the pinnacle I am not a big fan of md5 auth but saying that md5 auth uses username as the salt is oversimplified. The md5 hashed password shored in pg_shadow is created as md5(password + username). But the md5 hashed password flying over wire is using a random salt like md5(md5(password + username) + random_salt). Best reagards, -- Tatsuo Ishii SRA OSS, Inc. Japan English: http://www.sraoss.co.jp/index_en.php Japanese:http://www.sraoss.co.jp