Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g23xC-0008FX-SC for pgsql-general@arkaria.postgresql.org; Tue, 18 Sep 2018 00:33:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1g23xA-00076J-OX for pgsql-general@arkaria.postgresql.org; Tue, 18 Sep 2018 00:33:20 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g23xA-00076B-A6 for pgsql-general@lists.postgresql.org; Tue, 18 Sep 2018 00:33:20 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g23x3-0001mw-K4 for pgsql-general@lists.postgresql.org; Tue, 18 Sep 2018 00:33:19 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id CEE2E21F73; Mon, 17 Sep 2018 20:33:12 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Mon, 17 Sep 2018 20:33:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=InwKKJXJ6nJPoi6/u2U3IjMSl+VQDturEVic1xbjRkk=; b=ot3j3AHZ TqeHBwew50DNzv034v+nnLtMJK3pkKzodhueASMhwDLVyCQfFR57CPC3ZIy6pbnu oYWdiJ3VZgxdWYA403XQunwoEyQedaGbPHb6IIWLTP8VJEj19173ZhFdJcytcSHm fKglRRsvFtAR/ZWTjDx8eoMPyK7+7fxLrRDwrkY+qwofwfYbTsJMH4aYR23L63Bt VviUpw9JJdAN3sQ3/CTXRK3JeXqKEuFDzVle47M+tzFjt42l4Li8BSP3GKlY8Bi6 Y/JA9q8ExBVLc4lr1h3nfrrisG+xt7J+r+gawZkIOqZQAJ3VV/JDhpVIWrUDMe45 IB5Qcg5pLW3FCg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; bh=InwKKJXJ6nJPoi6/u2U3IjMSl+VQD turEVic1xbjRkk=; b=Asbi8dNN31oY/EuJ9vl2CYDG3PRgpeDq8ega7UYVy+5jc yBcXGgtxIi7EkEycD6MTf7oqf9mBICMdd2+qE4YIA9FLidqwmcqZ3GJYdOSPfx+X vJRgUm014ovTFxpFMzJHyE5S8zW+/a89Ijv/qp/LwhMxBmrorJ/EHbwtTpmi+UTn EE6NjTD0q4wU8cc2rCUi4pZmgtYcdQXV9dVn1lFkbQFX5TRKRcM5KhiUAFjnZ+/9 6AeAIN2VsMKs1rW7f8Yi9cp7FeeWZT4yed2A/Lu8guIXLkfLWRyhKzSgAsD8JRM7 y5JnD5ONuaP2xTY+ggXfOVlBJbEMfWeRWVpM/ApKg== X-ME-Proxy: X-ME-Sender: Received: from paquier.xyz (c137162.net61215.cablenet.ne.jp [61.215.137.162]) by mail.messagingengine.com (Postfix) with ESMTPA id B468AE49C5; Mon, 17 Sep 2018 20:33:10 -0400 (EDT) Date: Tue, 18 Sep 2018 09:33:07 +0900 From: Michael Paquier To: Alessandro Gherardi Cc: Peter Eisentraut , "pgsql-general@lists.postgresql.org" Subject: Re: scram-sha-256 authentication broken in FIPS mode Message-ID: <20180918003307.GH31460@paquier.xyz> References: <767499000.1481233.1536153579656@mail.yahoo.com> <20180905181545.GC2726@paquier.xyz> <1691863835.972001.1536301001998@mail.yahoo.com> <1924578892.946938.1536301653576@mail.yahoo.com> <1168852455.1352488.1536591120175@mail.yahoo.com> <20180911030250.GA27115@paquier.xyz> <5aeb058d-e32c-e3e0-e4b1-6469aeeadc2b@2ndquadrant.com> <20180911222424.GB25160@paquier.xyz> <20180913031114.GA3578@paquier.xyz> <1940555821.4092541.1537196155707@mail.yahoo.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="fd5uyaI9j6xoeUBo" Content-Disposition: inline In-Reply-To: <1940555821.4092541.1537196155707@mail.yahoo.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --fd5uyaI9j6xoeUBo Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Sep 17, 2018 at 02:55:55PM +0000, Alessandro Gherardi wrote: > Therefore, I believe the best option, at least for now, is calling > FIPS_mode_set(1) in the application.=20 I am not so sure about that. As you rightly mention, CentOS and RedHat patch OpenSSL to allow FIPS to work. Per my research, Ubuntu can also enable FIPS but that's not the case of Debian, which is very popular (I may be wrong about the last one but I use it daily). One question I have is how are you actually able to use FIPS on Windows with OpenSSL? Is that from one of the tarballs available in openssl.org, which are more than 1 year old? Pure upstream code does not give this option, and CentOS/RHEL use a customly-made patch, based on which Postgres does not complain when calling the low-level hashing functions, and we rely now on FIPS being enabled system-wide. And that actually works. It seems to me that you are yourself using a custom patch for OpenSSL, and that's actually a different flavor than the Linux version as in your case the low-level hashing functions complain if called directly in FIPS mode. At the end, I think that we ought to wait and see if upstream OpenSSL comes up with support for FIPS and how it integrates with it, on both Linux *and* Windows, and then consider if Postgres needs to do more. There is little point in merging now a patch for something which may or may not be supported by OpenSSL now. My bet, as things stand, is that we could finish with something similar to what happens on Linux with a system-wide switch that Postgres knows nothing about. Perhaps that will not be the case, but let's think about that once we know for sure. -- Michael --fd5uyaI9j6xoeUBo Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAlugR8MACgkQnvQgOdby QH1orhAAhnFuhdEUAYfugzvT0CJvzEjvA0RM3mmcagQf29Luh+2YemaRiJwldsl9 tWXS37dJc+oWN80KseLem9Zo744H01jZcKKwZTaS8ldtS8DqFEdgmznXm1nuq6RT MTwlAsUQvjxTWKAl2wOTvt6q1x4Ruom/kplvkl0WCbXli0GSPhUA5opaeaIc5MAg fSitPyBnjTa2LHrVKlgS8q9M1IbycggDlK9o8+PXe/+k+f1b4OxbxKsDadRdWCgV UKNusQqfI+OZWVvDKlbDqChavNFF1RoJ14eLmlVcEq1Le74LzmrUugD/7IDybwYg DfsFqzUfqhp2+l8VZ5uaWRHKE8SzyfFpwWlkn5OfAqmoMrvH3A0fBgU8RvEzghE1 eUceTgYSB/VvV72pLFgTCJDqdycX8rB4kVmsJpGeEfj1dFUJT1I9MsoBOPQAW7ql nfq57aEmjzgS57APRxzuzjcPqouk9vB/mFqGw1E8FWBzZWVorVzQrx6cc19v1ncr ukuptBvc/QBWj28sNqVDN9ko42eH0J9K0gPShSaaKAbqhUmP9g8jeWPDE6N0BNVt sqz1856sBznG5OELSpHWNgpjk/vqVEGoKrhbgSnQ/pmQLHpMEzuURkyTcY3kjh1M PiS0uE9X4dy/i270GernGJWOVPcOFXrLX++Mz5T0uvPhKTN8VEk= =ZLrq -----END PGP SIGNATURE----- --fd5uyaI9j6xoeUBo--