Skip to content

Implement password complexity enforcement#837

Closed
MohidSheraz wants to merge 2 commits into
openstack-experimental:mainfrom
MohidSheraz:pci-401-password-complexity
Closed

Implement password complexity enforcement#837
MohidSheraz wants to merge 2 commits into
openstack-experimental:mainfrom
MohidSheraz:pci-401-password-complexity

Conversation

@MohidSheraz

Copy link
Copy Markdown
Collaborator

Closes #401

This completes the SQL identity enforcement path for PCI-DSS 8.2.3 password complexity.

The config layer already supported password_regex, password_regex_description, regex compilation, and validate_password(). This change calls password validation before password history checks, hashing, expiry calculation, and password storage.

Tested with:

cargo test -p openstack-keystone-identity-driver-sql test_set_new_password_rejects_password_regex_mismatch
cargo test -p openstack-keystone-identity-driver-sql password

@MohidSheraz MohidSheraz force-pushed the pci-401-password-complexity branch 6 times, most recently from c797f2c to 350aa7a Compare June 24, 2026 17:24
@gtema gtema force-pushed the pci-401-password-complexity branch from 350aa7a to 7c00578 Compare June 25, 2026 11:07

@gtema gtema left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should always take care of synchronizing you fork repository with the origin. When you start working on the issue and create a branch ensure it is branched from the main branch and not from another branch (once you pushed the PR it again contained another commit for the test you have added in another PR). When you create PR or push a new revision do yourself a sanity check just looking at the commits tab whether everything is right

"password is expired"
);
}
#[tokio::test]

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add an empty line above to keep it separated from previous test

Signed-off-by: Mohid Sheraz <msheraz@andrew.cmu.edu>
@MohidSheraz MohidSheraz force-pushed the pci-401-password-complexity branch from 7c00578 to 7e81fac Compare June 25, 2026 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PCI-DSS 8.2.3: Password complexity (min 7 chars, numeric + alphabetic)

2 participants