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 1fdypV-0000mp-3J for pgsql-general@arkaria.postgresql.org; Fri, 13 Jul 2018 14:13:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fdypR-0005E9-QH for pgsql-general@arkaria.postgresql.org; Fri, 13 Jul 2018 14:13:49 +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 1fdypI-0004JS-HW for pgsql-general@lists.postgresql.org; Fri, 13 Jul 2018 14:13:40 +0000 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fdypF-0000wh-BF for pgsql-general@postgresql.org; Fri, 13 Jul 2018 14:13:38 +0000 Received: by mail-wr1-x42d.google.com with SMTP id q10-v6so25275783wrd.4 for ; Fri, 13 Jul 2018 07:13:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:references:in-reply-to:subject:date:message-id:mime-version :content-transfer-encoding:thread-index:content-language; bh=NR0dsUfHqzVjdTBsdCuro1udeHNlr8qCMKJxw4seMoc=; b=ftXbDEvDfpeRLiZDSqQRun6leNQ0zcQLognA5dkIVXWRBRfr+1HrB9ack+7ORWb1pa +Xqx69yczyGq275aDaZtN5kS/kVPA2yY+uPzTUuWGoSm3GSUY2O+3H0ZltV4MsdRlmAA F03eVnopvzsg3EZTe9btwrin5tz5qN+ycNujp95pPqEiHhJpLWzP5/u23sxIn6039fh5 eN+J6dXVE/K7sUWMJ5x0bKjdX9QRL3Ht2oBCUoczABv+mEkyUhh1UnwqO++CDfR94jTI V9eUBVBhoZgTAyB2vH6/vSNaRgLgwJnVnvk6qm5tommtTTt/PbgOVKUeCYZ+D3oTT9Ug sECg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:references:in-reply-to:subject:date :message-id:mime-version:content-transfer-encoding:thread-index :content-language; bh=NR0dsUfHqzVjdTBsdCuro1udeHNlr8qCMKJxw4seMoc=; b=j7SVm3pMNRocDTb4SLW/qHhYBKp64U0d0QiA1vIDkAPWNYwpbsmoIIX70HNJDVl/LA jFXeGuw8PGb5GbcZgUzngOeMq2rWheZ6o7klzW3jh6C+o+5+MtDeRIy/LNPKKaTNxUoW qomA72qGaQAV1iRW/p8+6XnXIuGQTrKbesccwdA1SVOR2n7lZxA+wrgQCIQtwGV+ut2a S1KDJ8pPtb+9J4xmJkTXUhkGotK0QgJm2uM7JYkomSb1rKhkT5fBTPw1k+kZumJJ2iCg fsuSN3ZjQzKHhnFxgLf9n7fMsQEGQseJVFXzsw4pA29+xl+vqcAd7faJZwmKcX0k9SDa PGWQ== X-Gm-Message-State: AOUpUlHcSyrTuc1MLLXZtQoCDi0uU314od7g3ZiOUZokqPKk1EAPRms6 xugU3d8EQwvrcpSO/dOIBnrmzg== X-Google-Smtp-Source: AAOMgpdN3YlrBY3dysS3bj3ZJPvKk+ccULjNifNfW3Su/SR4buBGEbaNu0ROehqvoB3bi74wCSdnBA== X-Received: by 2002:adf:ef8c:: with SMTP id d12-v6mr5364691wro.195.1531491215754; Fri, 13 Jul 2018 07:13:35 -0700 (PDT) Received: from PC016 (mail.ibeq.com. [212.100.42.241]) by smtp.gmail.com with ESMTPSA id y14-v6sm5517064wrq.45.2018.07.13.07.13.34 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 Jul 2018 07:13:35 -0700 (PDT) From: To: References: <006c01d41aa0$b0ae27c0$120a7740$@gmail.com> <23124.1531489879@sss.pgh.pa.us> In-Reply-To: <23124.1531489879@sss.pgh.pa.us> Subject: AW: Disable TRUST authentication by using ClientAuthentication_hook Date: Fri, 13 Jul 2018 16:13:34 +0200 Message-ID: <009e01d41ab3$af9a2510$0ece6f30$@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQHf6Jne7xjspcNnBk/sQod85qb4bQIIpCNXAjXFvqIBme3TqaRGzjLg Content-Language: de List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk > -----Urspr=C3=BCngliche Nachricht----- > Von: Tom Lane >=20 > > If you're an server admin you can disable the extension (editing > > shared_pre_load_libraries GUC), change password and then enable the > > extension again... I am aware of this and all the other points.=20 > Or more to the point: exactly what is the threat model here? =20 It is similar like with your garage door: locking it with a simple 50 = year-old-key is still better than just clamping it with a wedge. It is = certainly not as good as enforcing the door and putting a modern and = solid lock to it.=20 > ISTM that > someone with enough privilege to alter pg_hba.conf can probably = suppress > loading of an extension too, so that the security added by this idea = is not just > questionable but completely illusory. This is a valid point of concern. However, settings in pg_hba.conf need = to be documented to allow modification of IP address ranges etc. A few = people have access to this and it is likely that they look into the = manuals and find alternative settings. Configuration of libraries is not = clear to everyone.=20 >=20 > What would actually move the goalposts a bit is to build a modified = server > which doesn't have the TRUST code path at all, so that there is no = question of > installing an extension or not; then somebody who wants to defeat the > security needs to be able to replace the server executable. But you = don't > need any hook if you do that. That is true but I came across a discussion that for several reasons a = proposal to add build-time options for authentication methods was not = implemented. I'm trying to avoid modification of the source code if I = can. I agree that I may have to build a modified server if I don't find = a better solution.=20 Regards Klaus