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 1oJQVn-00054h-0t for pgsql-general@arkaria.postgresql.org; Thu, 04 Aug 2022 02:22:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oJQVl-0004l0-UZ for pgsql-general@arkaria.postgresql.org; Thu, 04 Aug 2022 02:22:57 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oJQVl-0004kd-Jy for pgsql-general@lists.postgresql.org; Thu, 04 Aug 2022 02:22:57 +0000 Received: from mail-qk1-x730.google.com ([2607:f8b0:4864:20::730]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oJQVj-00079s-1J for pgsql-general@lists.postgresql.org; Thu, 04 Aug 2022 02:22:56 +0000 Received: by mail-qk1-x730.google.com with SMTP id c3so14163980qko.1 for ; Wed, 03 Aug 2022 19:22:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:subject:from:references:cc:to :content-language:user-agent:mime-version:date:message-id:from:to:cc; bh=d2rA7c32WyS39oIOtRDLzk/MNYyUAPkFWTK3HdDq7ZE=; b=NJzeSs4V0tVvybGoDqaKssE4UeBVZ7erm3hpkcazito2Z9N9Ztf6XudL1DG6wf2mry gqOzMaWZhf1gxlmxJz2yxEoTdMPHaAiEsw61uqCV5FhKIN2hxNsGy+PZF7Fxfxehbda7 rqX4poy4CVDr3LbkIp426d7g7YwEkQwD/GvBXGT+mlD/jCpe7KAESiKXl0LtDDN1F97G IXdKHWayHgTFmRFGKiyiGUje8pcV5mNqOwIybuI1V+4Mo00uBKHWmZBx7TobvcIgaauN SkH1z1HlZL7JuVqUzftg0GPNZK/TGdl3bMBi5jAuwiCJusEez+8MnDUVPjiQk+zJaKTp M9Pw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:subject:from:references:cc:to :content-language:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc; bh=d2rA7c32WyS39oIOtRDLzk/MNYyUAPkFWTK3HdDq7ZE=; b=wq0Zj849ZQ4guVU/1Z8knpyiHBeG//vIrB/dMRf23RH+gqS0ygGSfsllWJX+3xC0DD YayGCbpaSvZEqAhWFgOamxhiTQzXBkD8k2BaEF9eKIqfyteV8X/1PK/6Af6QKU7yOkmT /dpOmGX5Th3lRXRukImQQRJM/9SN2pD6PMXirFTODZObqGPKsPuqobPcInzBgVR+Zk4C DgYVfD76LoEg+poHXjogwpPmJDJH6rMDiAKsgg3Am3xfY3mrjQW4TREz2sms9+XmHFiP y6BjoPfZuQtufH46nvHxxM1aP+nf/Y8SYxA1YAbrLRiie1vBC7UmkkeQTR/1kSwnu1lR CS3g== X-Gm-Message-State: AJIora/TTlGWVJOLUR5gVxd+Sq/3Kar5I+fXdBoGaQ3U7uU9z+4hWF2M fdZ6d2+9kBrfyyll1snHdVQ= X-Google-Smtp-Source: AGRyM1s1I+J+YhBgYQdLj12VtIfc6fNKQR6+jUP5uhoyNGDNc5pwn3ZO81DUXrX3VWomHju31rwzwg== X-Received: by 2002:a05:620a:8014:b0:6b6:19c5:4c2c with SMTP id ee20-20020a05620a801400b006b619c54c2cmr20259166qkb.382.1659579773778; Wed, 03 Aug 2022 19:22:53 -0700 (PDT) Received: from ?IPV6:2605:2a00:8000:dead::3ac? ([2605:2a00:8000:dead::3ac]) by smtp.gmail.com with ESMTPSA id v7-20020a05620a440700b006b5fe4c333fsm15064899qkp.85.2022.08.03.19.22.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 03 Aug 2022 19:22:53 -0700 (PDT) Message-ID: <2427474d-b5f7-cd8a-c4a9-b6cf36644de0@gmail.com> Date: Wed, 3 Aug 2022 22:22:52 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Content-Language: en-US To: Rejo Oommen Cc: pgsql-general@lists.postgresql.org References: From: Thomas Guyot Subject: Re: Is Client connections via ca.crt only possible? In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2022-08-03 21:37, Rejo Oommen wrote: > Thank you for the reply Thomas. I agree with you on the mutual TLS > that you mentioned. > > Here is what I was looking at. > > The configurations at the server end will be with auth-method as md5 > and auth-option as clientcert=verify-ca. > There's your issue. If you tell the server to validate the client cert, then it will require the client to provide a valid cert to identify itself. > In this way, the user's password along with the valid ca should allow > connections to pass. > The ca on your setup is only useful for the client to ensure the server is the correct one and prevent MITM attacks. This is a client-side check, not server-side. The only authentication security here is the password/md5, but protected from eavesdropping (passive and MITM) and connection hijacking by encryption, with some of these protections only effective when the client use the verify-ca option. The server cannot ensure the client is actually validating the ca, not even that it's taking to the actual client and not a MITM, simply because the client itself is not authenticated by mutual TLS. Regards -- Thomas