Password Quality Scored At The Boundary

A pwquality drop-in on EL 10 with the length, class and dictionary rules an auditor asks for. Nothing validates pwquality.conf, so the live test scores four passwords and reads why each was refused: a dictionary word by the dictionary check, a password one under the minimum by its length, the same at the minimum accepted, and a passphrase accepted. Original role, live-tested on Rocky Linux 10.

ansibleSecurity & Secrets

Verification

Live-tested

Really deployed to a container sandbox, proven idempotent (a second run changes nothing), verified against the role’s assertions, then torn down.

Conformance

  • Static validation (yamllint · ansible-lint)

Provenance

  • SHA-256 checksum
  • Signature (pending)

Functional

  • Live-tested - applied, verified, destroyed

Last verified 2026-09-27 · podman 4.9.3 · ansible 2.21.4 · how we verify

Cite it in your README

badge · attribution

Paste this beside the module in the repository that uses it. The badge is rendered from this artifact's verification record, so it reads live-tested because the record says so, and the link lands on this page.

README.md, GitLab, Gitea
[![IaC Bazaar: live-tested](https://www.iac-bazaar.com/api/artifacts/ansible-password-quality/badge)](https://www.iac-bazaar.com/catalog/ansible-password-quality?utm_source=syndication&utm_medium=readme&utm_campaign=artifact)

Ansible role 1.0.0, live-tested on IaC Bazaar: [Password Quality Scored At The Boundary](https://www.iac-bazaar.com/catalog/ansible-password-quality?utm_source=syndication&utm_medium=readme&utm_campaign=artifact)

```yaml
# Password Quality Scored At The Boundary: https://www.iac-bazaar.com/catalog/ansible-password-quality (download from your IaC Bazaar account)
```

Preview:IaC Bazaar: live-tested

Documentation

password-quality

A password policy proven with passwords. pam_pwquality is already in EL's authentication stack, so the role owns the policy file and nothing else. The live test scores four passwords against the live policy and checks the REASON for each refusal: a password built on a dictionary word, a strong password one character under the minimum, the same password at the minimum, and a passphrase the policy must not refuse.

No download, and no version to pin. libpwquality is part of EL 10 and its PAM module is already in the stack. What the role owns is the policy: how long, how varied, and what a password may not contain.

enforce_for_root is in the shipped policy on purpose. Without it, root setting a password for another account bypasses every rule in the file, which is how most of these policies come to be decorative.

chpasswd run as root bypasses pwquality entirely. Measured: with this policy in force, echo user:password | chpasswd succeeded. A test that set a password as root and called that a pass would prove nothing at all, so the live test uses pwscore, which scores against the live policy and exits non-zero when the policy refuses.

Nothing validates the policy file. An unknown key is ignored, so a typo leaves a policy that reads strict and is not. That is why the test asserts the length rule at its BOUNDARY - one character under the minimum must fail and the minimum must pass - rather than reading the number back out of the file it just wrote.

maxclassrepeat shadows every other rule, so this policy disables it. The setting refuses a password with more than N consecutive characters of one class. At 4, the value hardening notes usually give, it decides almost every case before any other rule is consulted. Measured in this role's lane with pwscore, one password per row and only maxclassrepeat changed between columns:

password= 0 (shipped)= 4= 8
Correct-Horse-9x-Batteryaccepted, 100refused, class runaccepted, 100
Inte1rnat2iona3lism4!accepted, 90accepted, 90accepted, 90
Str4wberry!Fieldsaccepted, 62refused, class runaccepted, 62
Internationalism1!refused, dictionaryrefused, class runrefused, class run
Zx9#Qw7!Lm2$Kpaccepted, 40accepted, 40accepted, 40

At 4 the rule refuses the strongest password in the set and accepts an interleaved dictionary word, and it silences the dictionary check completely: with the rule at 4, not one verdict in a nine-password probe changed between dictcheck = 1 and dictcheck = 0. With the rule disabled, exactly one of those nine separates them, and that is the password the live test now scores. Set password_quality_maxclassrepeat if a baseline demands the literal setting, and know what it costs.

A refusal does not say which rule refused. This test previously scored password and read its refusal as proof of the dictionary check; pwquality was refusing it for consecutive lowercase letters, and would have gone on refusing it with dictcheck = 0. Every refusal the live test asserts now carries the reason pwquality gave for it.

License

Commercial - IaC Bazaar EULA. (c) IaC Bazaar.

Usage code & full reference need an account

The complete copy-paste usage, the full input/output reference, and operational notes are free with an account - shown here and bundled in the download. Sign in and this section fills in.

  • Variables
  • Test

Related modules

Live-tested

ansible-aide

AIDE from AppStream on EL 10: a watched tree, a baseline database built once, and the oneshot unit and timer the package does not ship. The live test passes on an unchanged host, FAILS when a file appears inside a watched path and names it, ignores one inside an excluded path, and passes again once the change is gone. Original role, live-tested on Rocky Linux 10.

View module
Live-tested

ansible-authelia

Authelia from the upstream release (sha256-verified) as a hardened system service on loopback with file users and sqlite; its secrets are generated once on the host and reach the service as AUTHELIA_*_FILE variables. The live test hashes a password with Authelia's hasher, logs in, sees a wrong password refused and an anonymous visitor sent to the portal. Original role, live-tested on Rocky 10.

View module
Live-tested

ansible-bandit

bandit on EL 10 from PyPI into a venv of its own with a link in the PATH; the live test runs pip check, then scans a module that passes a string to subprocess.call with shell=True (B602, High, exit 1) and a clean module (exit 0). Pinned. Original role, live-tested on Rocky Linux 10.

View module
Live-tested

ansible-boundary

boundary on EL 10 from releases.hashicorp.com; SHA256SUMS is signature-checked against HashiCorp's key before get_url trusts it, the live test re-checks both, then runs authenticate against a dead address ('connection refused') and database init with a throwaway config (parsed, root key loaded, then the database refused). Pinned. Original role, live-tested on Rocky Linux 10.

View module
Live-tested

ansible-dockle

dockle on EL 10 from the GitHub release; get_url refuses it unless its SHA-256 is in the vendor's checksums file, and the live test re-checks it, then scans a one-layer image whose config names no user, expecting CIS-DI-0001 in the output, exit code 1 with --exit-level warn, and the warning counted in the JSON form. Pinned. Original role, live-tested on Rocky Linux 10.

View module
Live-tested

ansible-gitleaks

gitleaks on EL 10 from the GitHub release, refused by Ansible's get_url unless its SHA-256 is the one in the project's checksums file, and re-checked with sha256sum -c by the live test, which then plants a file holding an AWS access key that is not one and runs gitleaks detect over it, expecting 'leaks found: 1'. Original role, live-tested on Rocky Linux 10.

View module