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 1pe1Oi-0007OB-Ej for pgsql-hackers@arkaria.postgresql.org; Sun, 19 Mar 2023 22:21:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pe1Og-0007WA-NQ for pgsql-hackers@arkaria.postgresql.org; Sun, 19 Mar 2023 22:21:02 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pe1Og-0007W1-Cf for pgsql-hackers@lists.postgresql.org; Sun, 19 Mar 2023 22:21:02 +0000 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pe1Od-00070r-3i for pgsql-hackers@lists.postgresql.org; Sun, 19 Mar 2023 22:21:01 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id B0042320091C for ; Sun, 19 Mar 2023 18:20:56 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Sun, 19 Mar 2023 18:20:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:content-type:content-type:date:date:from:from:in-reply-to :message-id:mime-version:reply-to:sender:subject:subject:to:to; s=fm2; t=1679264456; x=1679350856; bh=j1e1nfxCMs971sS7q2ZfVNkh3 JB1yyP3yK9AOh93NQo=; b=DLoGPpXzfNzUL/0l/0DWwJ9+S4lg6JYiIjr7o8qky THhIJiVPnSDF+NgkVrDeCVUaIlAeOXQgznNGelZ1gsbS2osY2ONKs4FpHdH4mQXm At8rdiQjYkPFRDEj5hNYy03A7/+DN4xphc4kmd+EYpJTrzbVI1sxzzAYP6C82736 wajXrUXwWKIWSoObgegogxirw4BAfyNsgGj2m7aVsMpoXfG0xdZb5gSrcz38qUr6 7x69IAEOe6sk+fzXP6aURHuqNf45ZvsbKrO5JHSF0OKHefT5MBh8vzLq4ZzdJyLa yyiWUIOzRt7B2tsO3SYJBO2TnF7F8XlTJq8LZyCu+gymw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:message-id :mime-version:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1679264456; x=1679350856; bh=j1e1nfxCMs971sS7q2ZfVNkh3JB1yyP3yK9 AOh93NQo=; b=N/z1IqI7ZaOOz4gsogPCWcUVd1K7r4Eqjcw0Hq/gV4RUs4wyEse GP92XsQUkHGYI6oR0YmMAPWBy/I6UxS+6eClUHbxnZvM8CX8tH+G3hDs7z1csoFV I98ablsUi4v1Gyl76Nuvr8Cf75I/jXiHWnR9LbhrEGjGhayw4DUA1aIl4jXTdBKv /P0DAFhrJ93SC4bckeh6YukPRKPUM6360s78SdChBqb5zIumlF7oZslFgEt2ei51 KLg2hrwJeEixHo5D54+EIcrCgXwsjbYeU7cwiOREs5K+tUCkLDtMuS1je07YbURg RtoWl3F8WKxZ9l7RQHgRojGdn0X4tYQcIzw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdefiedgudeifecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enfghrlhcuvffnffculdefhedmnecujfgurhepfffhvffukfggtggusehgtderredttddv necuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesphgrqh huihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepieehvdevkeejjeduudehgeejiedv hffhfeegfedtjeeileegtdegfffhtedvvedtnecuffhomhgrihhnpehpohhsthhgrhgvsh hqlhdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhr ohhmpehmihgthhgrvghlsehprghquhhivghrrdighiii X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Sun, 19 Mar 2023 18:20:55 -0400 (EDT) Date: Mon, 20 Mar 2023 07:20:47 +0900 From: Michael Paquier To: Postgres hackers Subject: Remove AUTH_REQ_KRB4 and AUTH_REQ_KRB5 in libpq code Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="W0ueyKBhk82eobV+" Content-Disposition: inline List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --W0ueyKBhk82eobV+ Content-Type: multipart/mixed; boundary="V0DPvDeq+Axw4oOg" Content-Disposition: inline --V0DPvDeq+Axw4oOg Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi all, $subject has been discussed here, still seems worth its own thread for clarity: https://www.postgresql.org/message-id/4037249.1679011812@sss.pgh.pa.us Support for Kerberos v4 has been removed in a159ad3 (2005) and the same happened for v5 in 98de86e (2014, meaning that this is still possible with 9.2 and 9.3 backends). Anyway, the attached seems worth the simplifications now? This includes a cleanup of protocol.sgml. Thoughts? -- Michael --V0DPvDeq+Axw4oOg Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="libpq-krb-cleanup.patch" Content-Transfer-Encoding: quoted-printable diff --git a/src/include/libpq/pqcomm.h b/src/include/libpq/pqcomm.h index bff7dd18a2..8251639cd3 100644 --- a/src/include/libpq/pqcomm.h +++ b/src/include/libpq/pqcomm.h @@ -111,8 +111,8 @@ extern PGDLLIMPORT bool Db_user_namespace; /* These are the authentication request codes sent by the backend. */ =20 #define AUTH_REQ_OK 0 /* User is authenticated */ -#define AUTH_REQ_KRB4 1 /* Kerberos V4. Not supported any more. */ -#define AUTH_REQ_KRB5 2 /* Kerberos V5. Not supported any more. */ +/* 1 is available. It was used for Kerberos V4, not supported any more */ +/* 2 is available. It was used for Kerberos V5, not supported any more */ #define AUTH_REQ_PASSWORD 3 /* Password */ #define AUTH_REQ_CRYPT 4 /* crypt password. Not supported any more. */ #define AUTH_REQ_MD5 5 /* md5 password */ diff --git a/src/interfaces/libpq/fe-auth.c b/src/interfaces/libpq/fe-auth.c index fa95f8e6e9..1ce0794f89 100644 --- a/src/interfaces/libpq/fe-auth.c +++ b/src/interfaces/libpq/fe-auth.c @@ -942,14 +942,6 @@ pg_fe_sendauth(AuthRequest areq, int payloadlen, PGcon= n *conn) case AUTH_REQ_OK: break; =20 - case AUTH_REQ_KRB4: - libpq_append_conn_error(conn, "Kerberos 4 authentication not supported"= ); - return STATUS_ERROR; - - case AUTH_REQ_KRB5: - libpq_append_conn_error(conn, "Kerberos 5 authentication not supported"= ); - return STATUS_ERROR; - #if defined(ENABLE_GSS) || defined(ENABLE_SSPI) case AUTH_REQ_GSS: #if !defined(ENABLE_SSPI) diff --git a/doc/src/sgml/protocol.sgml b/doc/src/sgml/protocol.sgml index 8b5e7b1ad7..ed7a3ceda1 100644 --- a/doc/src/sgml/protocol.sgml +++ b/doc/src/sgml/protocol.sgml @@ -271,20 +271,6 @@ =20 - - AuthenticationKerberosV5 - - - The frontend must now take part in a Kerberos V5 - authentication dialog (not described here, part of the - Kerberos specification) with the server. If this is - successful, the server responds with an AuthenticationOk, - otherwise it responds with an ErrorResponse. This is no - longer supported. - - - - AuthenticationCleartextPassword @@ -3318,41 +3304,6 @@ psql "dbname=3Dpostgres replication=3Ddatabase" -c "= IDENTIFY_SYSTEM;" =20 - - AuthenticationKerberosV5 (B) - - - - - Byte1('R') - - - Identifies the message as an authentication request. - - - - - - Int32(8) - - - Length of message contents in bytes, including self. - - - - - - Int32(2) - - - Specifies that Kerberos V5 authentication is required. - - - - - - - AuthenticationCleartextPassword (B) --V0DPvDeq+Axw4oOg-- --W0ueyKBhk82eobV+ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmQXir8ACgkQnvQgOdby QH3aHw/+MEegAaKtq2tQA2QQtrs4IJt1hO2WP6p1nVisGKRu1S5Wl7rx46XgqCsL xZahU2TKx4arRhehFWIwg10Uxa75MuUtcVFvCS60v7tL1daQ0UO0VGBeVxnPeHaD /OSY5pK8Iv5/GL9QaxU0X+I8CG4KDNdIn8e1J4iOk9ttsJBfAOhtjlzjWK/f1o8J D/Y+NGHUdZxW5s6ARsl/DcKQrwdQa+xV91npI8b33yOaltc/7swCD3te18riRlZI VEbPj/LWIdGCzg5CVzLjqFCe9Rug4ThRQtyZlNaycgKmfjZkvKanS5D+NflKACE2 ld+LZRpfw89H5/uarXngrtoi8i93F9VmLOR0WzcU3NnBw9vzpozsCO7euLWvKtNI GFCnUHHwWPA7MjL7H5nrLy4+SPLvphSa4Kdo6r/X+Rb+A2StTvGLAyt0VkMcsTNK CLx5YKKsJkhzTsS+x+wT4T8RBZbOIkq2T3OC+RcMGZZX8wKR8CLZ0d4kLiPqYkjS dyaUVGVan1G6lX+mcu52XYoBHl3gpluT5MuDNZIUVZA3Fn87D9PUJouPo14Wrewq iI/uXhdbRrsKeLpRYSb5GiMNN2T5TUw3Fundj+R7ImDoCPQSiAI1GM/mC7B1vuSc 3nhJml4fWPPw1jLLbBdBv+WBJlNn9T/ZAjFv4ihL++wMlWfQRKA= =fOZX -----END PGP SIGNATURE----- --W0ueyKBhk82eobV+--