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 1oCRoA-0003AL-JW for pgsql-hackers@arkaria.postgresql.org; Fri, 15 Jul 2022 20:21:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oCRo8-0002Ql-Kp for pgsql-hackers@arkaria.postgresql.org; Fri, 15 Jul 2022 20:21:04 +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 1oCRo8-0002Jx-9q for pgsql-hackers@lists.postgresql.org; Fri, 15 Jul 2022 20:21:04 +0000 Received: from mail-pg1-x529.google.com ([2607:f8b0:4864:20::529]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oCRo5-0007Ww-Se for pgsql-hackers@postgresql.org; Fri, 15 Jul 2022 20:21:03 +0000 Received: by mail-pg1-x529.google.com with SMTP id s206so5369409pgs.3 for ; Fri, 15 Jul 2022 13:21:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=timescale.com; s=google; h=message-id:date:mime-version:user-agent:subject:content-language :references:from:to:cc:in-reply-to:content-transfer-encoding; bh=iuFIm4RjIBX9VnrqcdnloN2TcmVNtVwD0fgrAQWVfOs=; b=a5iGOXhYt5pp2afXx40X7qXPn60J4W3mpeTYYwiFPNyIkB4OBsZJKlFCejvJHxBliz 5vc3h06SgcRJmJH/wC4u9Q8EQcZ+PSex5CtODX8vYNtnaaxbYuPr2qQzkF0gc2qfdjNV f0T2SVTYIDKopHOQDCxxbCiT+Arr41KpGUpt8fJi+bUPt0jwDeYG5ZNZ5okItpkjZzBg 8bv3EHe43I2htca5Pm+3LThBRXrycJwxzA6iIOT+oSh5gOjot7b5NamlvZdpBsjZfujG KRom6lhBsSxeHbVWvXvVuZog34E5w8TvgDH0BVYO/32xpoQ/zH5Ah7jd5pbX68CZQuh3 zLNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:references:from:to:cc:in-reply-to :content-transfer-encoding; bh=iuFIm4RjIBX9VnrqcdnloN2TcmVNtVwD0fgrAQWVfOs=; b=g+OX8Br03nPhHT08NiV4AKXMgHLHsES4CDEKf5g8N20p5hw/u/AXgJwjM0A3dBDUMA YcarAaxBAx921YApKihN/+vmw3eLxMJPMZwkYLiRpS6AzWQRednvl3dj2ee5uinkyBXn 1Qq1TTS8Rf2xxTRCCY51ppXIxGg0CEzUu5KCBcC+Lu6xySvroKklRwxiyz32xC8qgip7 FIvugvTOB9qb6F4Z+f7zQvAktfFg5STbSbXC3m9EulmL7Urbk9fNsLdNwppnt95djTIp /6iGyEoSqn3xsOfXIhj2yblRDcOCoPaD3jpScKGFBXKIZHdwbe7j7uK/RpP1UAFXzMpm Bl5Q== X-Gm-Message-State: AJIora+Hvfgjiu606jjPhX+54+w/JP13PiRFiFFojyDOWSXsPevF+/uW U9cG+4fLqwdm6Xpn+GbijZjzLw== X-Google-Smtp-Source: AGRyM1s7Jg5kQBmkcHjV5GxvXkmp0F6GhkEcFoU9oVR939dY3vzYT4P1BQta5zrbW0CworIi7vYGsw== X-Received: by 2002:a63:f90d:0:b0:419:b112:91ea with SMTP id h13-20020a63f90d000000b00419b11291eamr9465899pgi.592.1657916460647; Fri, 15 Jul 2022 13:21:00 -0700 (PDT) Received: from [192.168.1.21] ([50.39.205.221]) by smtp.gmail.com with ESMTPSA id d3-20020a170903230300b0015ee985999dsm3999310plh.97.2022.07.15.13.21.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 15 Jul 2022 13:21:00 -0700 (PDT) Message-ID: Date: Fri, 15 Jul 2022 13:20:59 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH] Log details for client certificate failures Content-Language: en-US References: <61aa4b6c-9de2-d61b-821a-a34ab1e515e2@enterprisedb.com> <2ef20161-e99d-a6ea-a36d-577843a2daae@enterprisedb.com> <49b48719-d6cf-9e03-fab3-e4505cf9d585@enterprisedb.com> <059e67f5-3769-24c8-f460-4e5d87af529a@enterprisedb.com> <0167a8c5-1754-9121-b994-0719a6493a21@timescale.com> <20220715191156.jecddreykoakdljm@awork3.anarazel.de> From: Jacob Champion To: Andres Freund Cc: Peter Eisentraut , "pgsql-hackers@postgresql.org" In-Reply-To: <20220715191156.jecddreykoakdljm@awork3.anarazel.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 7/15/22 12:11, Andres Freund wrote: > This might have been discussed somewhere, but I'm worried about emitting > unescaped data from pre-auth clients. What guarantees that subject / issuer > name only contain printable ascii-chars? Printing terminal control chars or > such would not be great, nor would splitting a string at a multi-boundary. Hm. The last time I asked about that, Magnus pointed out that we reflect port->user_name as-is [1], so I kind of stopped worrying about it. Is this more dangerous than that? (And do we want to fix it now, regardless?) What guarantees are we supposed to be making for log encoding? Thanks, --Jacob [1] https://www.postgresql.org/message-id/CABUevExVHryTasKmtJW5RtU-dBesYj4bV7ggpeVMfiPCHCvLNA%40mail.gmail.com