Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qlkE8-004Asd-D8 for pgsql-admin@arkaria.postgresql.org; Thu, 28 Sep 2023 06:10:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qlkE6-009K2U-6y for pgsql-admin@arkaria.postgresql.org; Thu, 28 Sep 2023 06:10:18 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qlkE5-009K29-OT for pgsql-admin@lists.postgresql.org; Thu, 28 Sep 2023 06:10:18 +0000 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qlkDz-0082EE-0T for pgsql-admin@lists.postgresql.org; Thu, 28 Sep 2023 06:10:17 +0000 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-405361bb94eso127816285e9.0 for ; Wed, 27 Sep 2023 23:10:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20230601.gappssmtp.com; s=20230601; t=1695881409; x=1696486209; darn=lists.postgresql.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:from:to:cc:subject:date :message-id:reply-to; bh=7vmkfg8UD9GI/8lvwU8etOhQmVHLzFaDQ9YY92KIy6I=; b=IAWTl64uuTJhHawV5MlZ+nYhECbodgv6NbcqJrdaIKrt0CVGCpP0Mb+Zu9OOKygWtp CdB5SEQYi7vo8hcNjbrymsRp/eOwv8Pdok/3qulwrtiVXkR6meekoFEJuoRkddrqvP5O lT12EeaT2J+1xfkjHs+DYnjJqlMHhnEWZHbigrM2Xc7ofO6aioBU8E34ZEMexqDXB5DV FHfo7B0oW7rBev9Xqmx6a53rIIzgUa8OsOinhUbeM3wDFAP4M3TRxDMqSQ/y1baA048H NELdaDj5U9j2+ImoX6RCKVG01CANytuRjrIeqTf/jKfLpJmldjP/h/O0Oe6TBpcNaKc3 SO/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695881409; x=1696486209; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=7vmkfg8UD9GI/8lvwU8etOhQmVHLzFaDQ9YY92KIy6I=; b=Ce+4ZY6/LnHfgRWJYcxmXro3wlJ+/7nseGp5DzIiiH/24KMhrLWAa2y8J1p3kBEioO ViHJVcLechk+LvBLin86TTnZ82PT40gCcSPU2p2oYJLTOqYCY4iAN8ykfD92xBM0lORX h6LwJzbUKgcnKTVl3Z5FBhjcAKPL+CScs/NKtN7idRad1idNvc5XmdBUOUjiAAvITsjY 2jtcG9Fhz1dEDjjpmOjy5cnBPr2bf3a/oPlmUFVB9gvDgxNLI8kbc7nP2FB5H3xkEkHf BDP7Avz77r7tBxKidTLhfbk1ld1isE9x1ZbkJuQK/WzNT3jZPVippGnvyngdtba2YnPm 8q0w== X-Gm-Message-State: AOJu0YypbUN9rQ2OhBrvYQPN1t+b0EkqNKPS/yTNb4ubYPX1SAAawTKd pIgqwlqexGvTYwWtC2DbOwciyw== X-Google-Smtp-Source: AGHT+IHrhzW5JLtiFe0oGNuRGuJXtHBwOcuCdEli9NxDOi9u8DdXtVfOUzsLe4EpNwXi86oy26kPVQ== X-Received: by 2002:a1c:7712:0:b0:400:419c:bbde with SMTP id t18-20020a1c7712000000b00400419cbbdemr314034wmi.18.1695881409408; Wed, 27 Sep 2023 23:10:09 -0700 (PDT) Received: from localhost.localdomain (mobiledyn-62-240-134-165.mrsn.at. [62.240.134.165]) by smtp.gmail.com with ESMTPSA id h1-20020a05600c350100b003fe15ac0934sm1630255wmq.1.2023.09.27.23.10.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Sep 2023 23:10:09 -0700 (PDT) Message-ID: <19f87c6646f3acbf092ae2cea51beb2f0ae4c492.camel@cybertec.at> Subject: Re: Certificate Authentication method question about mapping From: Laurenz Albe To: Blake Rich , pgsql-admin@lists.postgresql.org Date: Thu, 28 Sep 2023 08:10:08 +0200 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.4 (3.48.4-1.fc38) MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, 2023-09-27 at 20:34 -0600, Blake Rich wrote: > Recently our CA updated their S/MIME certificates.=C2=A0 We've used them = for both email as well as certificate authentication with mapping in postgr= esql. =C2=A0 However our options for certificates ended up > shifting to an Organization certificate, where the person's name is no lo= nger the CN of the cert, but rather the CN is the Organization's name.=C2= =A0 Is there any way with certificate mapping to use a > field other than CN to map to a database user?=C2=A0 I've searched the ar= chives and online and can't find any details indicating any way to do so, b= ut I'm hopeful.=C2=A0=20 >=20 > Old certs that worked to filter out the first name as the username had >=20 > CN =3D firstname lastname > E =3D firstname.lastname@. >=20 > New certs have=C2=A0 >=20 >=20 > CN =3D > E =3D firstname.lastname@. >=20 > I can't seem to figure out how to look at the E =3D field or even if it i= s possible.=C2=A0 Any insight would be greatly appreciated. I don't think that's possible, short of modifying PostgreSQL. Yours, Laurenz Albe