Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[YSQL] Enhance password check extension with additional checks for the passwords #13815

Closed
sushantrmishra opened this issue Aug 30, 2022 · 0 comments
Assignees
Labels
area/ysql Yugabyte SQL (YSQL) kind/enhancement This is an enhancement of an existing feature priority/medium Medium priority issue

Comments

@sushantrmishra
Copy link

sushantrmishra commented Aug 30, 2022

Jira Link: DB-3325

Description

We should import the functionality of passwordcheck_extra to further add the configurability and add more additional checks.

We should add the test for password checker extension in YB.
https://github.com/yugabyte/yugabyte-db/blob/master/src/postgres/contrib/passwordcheck/sql/passwordcheck.sql

@sushantrmishra sushantrmishra added area/ysql Yugabyte SQL (YSQL) status/awaiting-triage Issue awaiting triage labels Aug 30, 2022
@yugabyte-ci yugabyte-ci added kind/bug This issue is a bug priority/medium Medium priority issue kind/enhancement This is an enhancement of an existing feature and removed status/awaiting-triage Issue awaiting triage kind/bug This issue is a bug labels Aug 30, 2022
@vrajat vrajat self-assigned this Sep 16, 2022
@sushantrmishra sushantrmishra changed the title [YSQL] Add test for passwordcheck extension [YSQL] Enhance password check extension with additional checks for the passwords Sep 29, 2022
vrajat added a commit that referenced this issue Oct 13, 2022
Summary:
passwordcheck has been replaced by passwordcheck_extra.
However the name of the plugin continues to be passwordcheck

The following parameters can be configured
- Minimum length of password.
- Maximum length of password.
- Define a custom list of special characters.
- Decide if password should include at least one special character,
  one lower-case character, one number or one upper-case character
  (any combination is possible as there is one switch per type).

The steps followed to replace the plugin are:
- Choose commit referred below as subsequent commits add support for PG15.
- overwrite passwordcheck.c with passwordcheck_extra.c (using cp)
- remove all occurrences of "_extra" as the name of the plugin is unchanged.
- Add a README to provenance of the plugin.

The commit also adds tests from
- passwordcheck plugin. Most of the tests pass by changing the default max length.
  A couple of tests had to be changed to add numbers and upper case letters as those are required
  by the new plugin.
- passwordcheck_extra plugin

Refer: https://github.com/michaelpq/pg_plugins/blob/0ff60215081e28ca70f311a2ec26448952329344/passwordcheck_extra/passwordcheck_extra.c

Test Plan:
./yb_build.sh --java-test org.yb.pgsql.TestPgRegressContribPasswordCheck
./yb_build.sh --java-test org.yb.pgsql.TestPgRegressContribPasswordCheckExtra

Reviewers: plee, skumar, ssong, smishra, jason

Reviewed By: ssong, jason

Subscribers: jason, yql

Differential Revision: https://phabricator.dev.yugabyte.com/D19632
@vrajat vrajat closed this as completed Oct 13, 2022
vrajat added a commit that referenced this issue Oct 21, 2022
Summary:
Original commit: e05a448 / D19632
passwordcheck has been replaced by passwordcheck_extra.
However the name of the plugin continues to be passwordcheck

The following parameters can be configured
- Minimum length of password.
- Maximum length of password.
- Define a custom list of special characters.
- Decide if password should include at least one special character,
  one lower-case character, one number or one upper-case character
  (any combination is possible as there is one switch per type).

The steps followed to replace the plugin are:
- Choose commit referred below as subsequent commits add support for PG15.
- overwrite passwordcheck.c with passwordcheck_extra.c (using cp)
- remove all occurrences of "_extra" as the name of the plugin is unchanged.
- Add a README to provenance of the plugin.

The commit also adds tests from
- passwordcheck plugin. Most of the tests pass by changing the default max length.
  A couple of tests had to be changed to add numbers and upper case letters as those are required
  by the new plugin.
- passwordcheck_extra plugin

Refer: https://github.com/michaelpq/pg_plugins/blob/0ff60215081e28ca70f311a2ec26448952329344/passwordcheck_extra/passwordcheck_extra.c

Test Plan:
./yb_build.sh --java-test org.yb.pgsql.TestPgRegressContribPasswordCheck
./yb_build.sh --java-test org.yb.pgsql.TestPgRegressContribPasswordCheckExtra

Reviewers: plee, skumar, ssong, smishra, jason

Reviewed By: jason

Subscribers: jason, yql

Differential Revision: https://phabricator.dev.yugabyte.com/D20279
vrajat added a commit that referenced this issue Oct 28, 2022
Summary:
Original commit: e05a448 / D19632
passwordcheck has been replaced by passwordcheck_extra.
However the name of the plugin continues to be passwordcheck

The following parameters can be configured
- Minimum length of password.
- Maximum length of password.
- Define a custom list of special characters.
- Decide if password should include at least one special character,
  one lower-case character, one number or one upper-case character
  (any combination is possible as there is one switch per type).

The steps followed to replace the plugin are:
- Choose commit referred below as subsequent commits add support for PG15.
- overwrite passwordcheck.c with passwordcheck_extra.c (using cp)
- remove all occurrences of "_extra" as the name of the plugin is unchanged.
- Add a README to provenance of the plugin.

The commit also adds tests from
- passwordcheck plugin. Most of the tests pass by changing the default max length.
  A couple of tests had to be changed to add numbers and upper case letters as those are required
  by the new plugin.
- passwordcheck_extra plugin

Refer: https://github.com/michaelpq/pg_plugins/blob/0ff60215081e28ca70f311a2ec26448952329344/passwordcheck_extra/passwordcheck_extra.c

Test Plan:
./yb_build.sh --java-test org.yb.pgsql.TestPgRegressContribPasswordCheck
./yb_build.sh --java-test org.yb.pgsql.TestPgRegressContribPasswordCheckExtra

Reviewers: plee, skumar, ssong, smishra, jason

Reviewed By: jason

Subscribers: yql, jason

Differential Revision: https://phabricator.dev.yugabyte.com/D20278
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ysql Yugabyte SQL (YSQL) kind/enhancement This is an enhancement of an existing feature priority/medium Medium priority issue
Projects
None yet
Development

No branches or pull requests

3 participants