Re: Re : Credcheck extension

From: Julien Rouhaud <rjuju123(at)gmail(dot)com>
To: 張宸瑋 <kenny020307(at)gmail(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Re : Credcheck extension
Date: 2024-11-18 09:36:13
Message-ID: CAOBaU_YVmXtv1AtunhmmOPb1yCsvBeoeiM2+2ZgL=ZsKZfrjgg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

On Mon, Nov 18, 2024 at 5:03 PM 張宸瑋 <kenny020307(at)gmail(dot)com> wrote:
>
> Hello!
> I would like to inquire about the installation of the credcheck third-party package to support password complexity and expiration date, etc., when setting up open-source PostgreSQL. I am using the credcheck--2.8.0.sql version from GitHub. After completing the setup, I encountered the following issue: when an account exceeds the configured number of incorrect login attempts, it gets locked. The command SELECT * FROM pg_banned_role; should display the columns roleid, failure_count, and banned_date, and the view is working properly and shows the information. However, according to the example, the roleid does not correctly display the corresponding oid for the account with failed login attempts. I would like to ask if there is a solution for this issue. Thank you!

I did a quick test locally and as far as I can see it seems to work as expected:

$ psql -U bob postgres
Password for user bob:
psql: error: connection to server at "127.0.0.1", port 11035 failed:
FATAL: password authentication failed for user "bob"

$ psql -U postgres -c "SELECT roleid::regrole, * from pg_banned_role"
roleid | roleid | failure_count | banned_date
--------+--------+---------------+-------------
bob | 750815 | 1 | <NULL>
(1 row)

If you don't get a similar behavior you should raise an issue to the
author directly on the extension's github repo.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Moreno Andreo 2024-11-18 14:37:57 Functions and Indexes
Previous Message 張宸瑋 2024-11-18 09:03:28 Re : Credcheck extension