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 1fdwhj-0002zX-Ts for pgsql-general@arkaria.postgresql.org; Fri, 13 Jul 2018 11:57:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fdwhh-0003Mw-Qp for pgsql-general@arkaria.postgresql.org; Fri, 13 Jul 2018 11:57:41 +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_SHA384:256) (Exim 4.89) (envelope-from ) id 1fdwhh-0003Mp-HC for pgsql-general@lists.postgresql.org; Fri, 13 Jul 2018 11:57:41 +0000 Received: from mail-wm0-x22f.google.com ([2a00:1450:400c:c09::22f]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fdwhe-0004zV-E2 for pgsql-general@postgresql.org; Fri, 13 Jul 2018 11:57:41 +0000 Received: by mail-wm0-x22f.google.com with SMTP id z13-v6so9150680wma.5 for ; Fri, 13 Jul 2018 04:57:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version:thread-index :content-language; bh=N9WSsCas+aY1A1fxijK9Hh5r834n7uKMSAxToK1ScxA=; b=r7C2btZQVwpMGl2EBRgBqZ0NAJ0+GMg1kOY54G0wiEzCi6NXRCn0eXtMKusZlLYnH/ djBIh0hmnf2D6mGNxX3pOfG+xnYNtrNWfnA4Lrs5fmxO11wfWKU+9+bqQcor78EdcoVL 8cUEOmsdSZ2dfXZKvZKnKo4XO06P7AFTMKw8RbwY0wbpTAgo9BvBQgGobddsBjOEYw8A mLJMBcz8AKNDayl6hb2sSlWtzJ7iV40PUKXUcliUVKEqAbpDmUvh5evB5VIlMWSBTbQN rr+WGv/9yQYc23XXIM0aK5wMmbbcozaA/l/b2RQ+f1wSR/qSOCHR7G8q5IP74rffPMO1 ZDqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :thread-index:content-language; bh=N9WSsCas+aY1A1fxijK9Hh5r834n7uKMSAxToK1ScxA=; b=ro5Zs6+dSyv0unsaniFWpv7pxz8fkbL1ptX0r3ltdPEL9OQl+siiqH0CTGcgcdNASj A+LDlrZw0W6VQDwEDZqJSza0vDuuhR6px/hTszAN5g6es7xCIqYW8mNrPfTwisYJ827Z fBOfGtnfZMkFxLygLNKAJ0vwwN/wCMHaQmvGku2BBKh98v+i/r88OHWQnV8LSwyhEFKN qr95gr952h76hNDSHBHVyKXFLOumRHLnzZXpJ0ASZFetW/oil6+bWNLgZ8Ub1J7591Z2 VxUTfPB3QkOdNq/bNgYHYyysAsVw9k3hLNcUzM9LjJx/xPdZ+pl8kVpZ292ARm0TKV9F 8FqA== X-Gm-Message-State: AOUpUlFOCMTEq2xyUyv34K+E2k4k0EthaanYQsb2J/Dn5RLEG0zl60Cv X4U3bTHxzcQEklornYkCGOxhog== X-Google-Smtp-Source: AAOMgpfsL+PZj/YV4/mOnLSZuJ6HixHmQED9v+YOOERLnsaAMBW2VWQp4ve5yqfr4p52GSj2DIJWng== X-Received: by 2002:a1c:9f12:: with SMTP id i18-v6mr3797064wme.124.1531483057175; Fri, 13 Jul 2018 04:57:37 -0700 (PDT) Received: from PC016 (mail.ibeq.com. [212.100.42.241]) by smtp.gmail.com with ESMTPSA id z9-v6sm42988037wre.49.2018.07.13.04.57.36 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 Jul 2018 04:57:36 -0700 (PDT) From: To: Subject: Disable TRUST authentication by using ClientAuthentication_hook Date: Fri, 13 Jul 2018 13:57:35 +0200 Message-ID: <006c01d41aa0$b0ae27c0$120a7740$@gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_006D_01D41AB1.7437BB10" X-Mailer: Microsoft Outlook 16.0 Thread-Index: AdQankmkmzlH4wmCRnSXW79QrMyM9g== Content-Language: de List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multipart message in MIME format. ------=_NextPart_000_006D_01D41AB1.7437BB10 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit I'd like to disable the TRUST authentication method for certain servers where modification of pg_hba.conf and restarting a service is fairly easy for a number of users. I looked at this example https://wiki.postgresql.org/images/e/e3/Hooks_in_postgresql.pdf It appears that creating a ClientAuthentication_hook and call ereport(ERROR) in case that Port->HbaLine contains TRUST would do the job. Is that right? I am aware that this would not make the server entirely secure but it would make it at least a bit more difficult to enter. Thanks Klaus ------=_NextPart_000_006D_01D41AB1.7437BB10 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

I’d like to disable the TRUST = authentication method for certain servers where modification of = pg_hba.conf and restarting a service is fairly easy for a number of = users.

 

I looked at this example = https://wiki.postgresql.org/images/e/e3/Hooks_in_postgresql.pdf It = appears that creating a ClientAuthentication_hook and call = ereport(ERROR) in case that Port->HbaLine contains TRUST would do the = job. Is that right?

 

I am aware that this would not make the server entirely = secure but it would make it at least a bit more difficult to enter. =

 

Thanks Klaus

------=_NextPart_000_006D_01D41AB1.7437BB10--