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 1lKde9-0006js-D5 for pgsql-admin@arkaria.postgresql.org; Fri, 12 Mar 2021 08:59:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lKde8-0002d3-Bm for pgsql-admin@arkaria.postgresql.org; Fri, 12 Mar 2021 08:59:48 +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 1lKde8-0002Vr-2O for pgsql-admin@lists.postgresql.org; Fri, 12 Mar 2021 08:59:48 +0000 Received: from hilly.subnetz.org ([188.40.132.100]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lKde4-0006Rw-O4 for pgsql-admin@lists.postgresql.org; Fri, 12 Mar 2021 08:59:46 +0000 Received: from mail.subnetz.org (xdsl-188-155-54-175.adslplus.ch [188.155.54.175]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) client-signature RSA-PSS (2048 bits)) (Client CN "holly.subnetz.org", Issuer "R3" (verified OK)) by hilly.subnetz.org (Postfix) with ESMTPS id 60ADC20083AE for ; Fri, 12 Mar 2021 09:59:39 +0100 (CET) Received: from mother.subnetz.org (mother [192.168.5.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.subnetz.org (Postfix) with ESMTPS id 0680010368EDF for ; Fri, 12 Mar 2021 09:59:38 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=subnetz.org; s=dkim; t=1615539579; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5ByhqFmWnen/0omp1agwoHWXHqwUREQbOkwi5yWRh4E=; b=QTwBP6Rqnb+28o9Tr4Tuk7Le/h5OXbznrc81p+iDfjP+o6zneSu2+Rinuk4PL2IZIMKRQQ RkITQUUcwdwIW6IOdabjEjOdUun8+s9OYpxF3etAaQFnx3Qe1xwVZuemXY5RRQShJnpc2r N/xlWtFAzGk7/V5ap/gfPts/RI7W6OVBdebogUCLJ/12K0r7qjTV+cxdxWDJ0ASuvOPobo ibbBUFmLlm8sXOA1tVe+Y/G6lGxdFHO4HfFhYG/ZYWVzudF1ULMGCG5Z0b3MABKcoeGTUc /UwCAIMA5opHgMQtwCMxcyXJW2/7cOrCaFt1TD1qe4Gol6xMDs2wW1m40+V2vg== Message-ID: <23f8e02c904b1101fbcc1b91a9b299e5367f663b.camel@subnetz.org> Subject: Re: applicable mapping for clientcert=verify-full From: Tilman Koschnick To: pgsql-admin@lists.postgresql.org Date: Fri, 12 Mar 2021 09:59:38 +0100 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.5-1.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Do, 2021-03-11 at 21:06 +0100, Tilman Koschnick wrote: > How do I specify the applicable mapping in that case? I've dug in a bit further. Since the clientcert option is allowed for all auth methods, I worked on the assumption that the map option should also be accepted for all methods, and removed the corresponding check: --- postgresql-13-13.2.orig/src/backend/libpq/hba.c +++ postgresql-13-13.2/src/backend/libpq/hba.c @@ -1678,12 +1678,6 @@ parse_hba_auth_opt(char *name, char *val if (strcmp(name, "map") == 0) { - if (hbaline->auth_method != uaIdent && - hbaline->auth_method != uaPeer && - hbaline->auth_method != uaGSS && - hbaline->auth_method != uaSSPI && - hbaline->auth_method != uaCert) - INVALID_AUTH_OPTION("map", gettext_noop("ident, peer, gssapi, sspi, and cert")); hbaline->usermap = pstrdup(val); } else if (strcmp(name, "clientcert") == 0) With this change in place, the mapping works for me, with apparently no ill effects. The build is passing all tests as well. Should I report this as a bug? Regards, Til