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 1hAycx-0008Tk-Qb for pgsql-hackers@arkaria.postgresql.org; Mon, 01 Apr 2019 15:13:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hAycw-0004cD-8u for pgsql-hackers@arkaria.postgresql.org; Mon, 01 Apr 2019 15:13:34 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hAycw-0004c5-0N for pgsql-hackers@lists.postgresql.org; Mon, 01 Apr 2019 15:13:34 +0000 Received: from mx1.redhat.com ([209.132.183.28]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hAycs-0007UL-Tz for pgsql-hackers@postgresql.org; Mon, 01 Apr 2019 15:13:33 +0000 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C91C3308427E; Mon, 1 Apr 2019 15:13:27 +0000 (UTC) Received: from localhost (ovpn-112-67.rdu2.redhat.com [10.10.112.67]) by smtp.corp.redhat.com (Postfix) with ESMTP id DF78960260; Mon, 1 Apr 2019 15:13:26 +0000 (UTC) From: Robbie Harwood To: Stephen Frost Cc: Peter Eisentraut , pgsql-hackers@postgresql.org, Nico Williams , Michael Paquier , Alvaro Herrera , David Steele Subject: Re: [PATCH v22] GSSAPI encryption support In-Reply-To: <20190330142404.GO6197@tamriel.snowman.net> References: <5ec3f734-810e-36e0-030f-af92efe135da@2ndquadrant.com> <20190223162751.GO6197@tamriel.snowman.net> <20190316102110.GU6197@tamriel.snowman.net> <20190330142404.GO6197@tamriel.snowman.net> Date: Mon, 01 Apr 2019 11:13:24 -0400 Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Mon, 01 Apr 2019 15:13:28 +0000 (UTC) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Stephen Frost writes: > * Robbie Harwood (rharwood@redhat.com) wrote: >> Stephen Frost writes: >>=20 >> I wanted to note a couple things about this approach. It now uses >> one more buffer than before (in contrast to the previous approach, >> which reused a buffer for received data that was encrypted and >> decrypted). > > Yeah, I don't see that as too much of an issue and it certainly seems > cleaner and simpler to reason about to me, which seems worth the > modest additional buffer cost. That's certainly something we could > change if others feel differently. > >> Since these are static fixed size buffers, this increases the total >> steady-state memory usage by 16k as opposed to re-using the buffer. >> This may be fine; I don't know how tight RAM is here. > > It seems unlikely to be an issue to me- and I would contend that the > prior implementation didn't actually take any steps to prevent the > other side from sending packets of nearly arbitrary size (up to 1G), > so while the steady-state memory usage of the prior implementation was > less when everyone was playing nicely, it could have certainly been > abused. I'm a lot happier having an explicit cap on how much memory > will be used, even if that cap is a bit higher. Yeah, that's definitely a fair point. We could combine the two approaches, but I don't really see a reason to if it's unlikely to be an issue - as you say, this is more readable. It can always be a follow-on if needed. > I did add in a simple pg_stat_gssapi view, modeled on pg_stat_ssl, so > that you can check server-side if GSSAPI was used for authentication > and/or encryption, and what principal was used if GSSAPI was used for > authentication. Good idea. >> Again, these are nits, and I think I'm okay with the changes. > > Great, thanks again for reviewing! > > Updated patch attached, if you could take another look through it, > that'd be great. I'm happy with this! Appreciate you exploring my concerns. Thanks, =2D-Robbie --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEA5qc6hnelQjDaHWqJTL5F2qVpEIFAlyiKpQACgkQJTL5F2qV pEIRUg/+Mj3ieE+pxFureaScBKKlO/cuxePsWMgLtjWNmNwQLypCSDC52/oFOR+h difKnbhWPkehNHVXaxQ5N6W47L9yt6u2677TnxOCYbpaA9/UXHyJx7kKuBvVv9GU 5wbXFTB4OE4uct+3yM8K4+jSJyH47H4iiJVebaO6+C5waxP4KekrlxBT/2JxnYBn HSnHzV6BwM73yd3u1ts65nzEFVolUp12hZrPuxKsY3H9UJ+EJbfFDqaJ29T5518B UjjmPqK03hgoz8wGL/633aFW3Snp+UmXxh4IsAbmkWVywwu3faOl2cSuVwOdGSfx ZVCuyODvDwJB/ndsViV0uE5OV9caEE0wl9IBhZfZozyaZkO8U0IoVIjxSCTyRQc0 5FOiv/b0T7e1v+pe4XcKctm3jpmDLMIRUJDpz2BNgEIYcz68UyPMca5DB9mjzGOq hMEUN2hloiY4StNVZkOUpknjJ3RqcsXflNAzA/iJVrOgM81ZWysCRO+8FuWTchrN JGuMTglewGQhFi9pr19wYjIePIzGF05LFagYyf0cRfi9NtqzOKUQldd+JPwCXUuw MTXQO6IRSZm6B+iVfp2Acus15ghNcalAu0tYBojRxwX4EE3mVOW2d5RT8BSTl5mJ iXvSdX7UMOHO3Z795N5HCJDH1LN/tJvQefyoV4IX2yCCaYbcoNc= =yDHZ -----END PGP SIGNATURE----- --=-=-=--