Skip to content

Commit

Permalink
Fix pg_hba_file_rules for authentication method cert
Browse files Browse the repository at this point in the history
For authentication method cert, clientcert=verify-full is implied. But
the pg_hba_file_rules entry would incorrectly show clientcert=verify-ca.

Per bug #17354

Reported-By: Feike Steenbergen
Reviewed-By: Jonathan Katz
Backpatch-through: 12
  • Loading branch information
mhagander committed Jan 26, 2022
1 parent 64b2c65 commit aa58f5c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/backend/libpq/hba.c
Expand Up @@ -1632,7 +1632,11 @@ parse_hba_line(TokenizedLine *tok_line, int elevel)
*/
if (parsedline->auth_method == uaCert)
{
parsedline->clientcert = clientCertCA;
/*
* For auth method cert, client certificate validation is mandatory, and it implies
* the level of verify-full.
*/
parsedline->clientcert = clientCertFull;
}

return parsedline;
Expand Down

0 comments on commit aa58f5c

Please sign in to comment.