Skip to content

KC-1423: fix validation for passwords and passphrase in record creation and updation, and apply domain-specific policies to manual passwords and passphrases - #2453

Merged
sshrushanth-ks merged 5 commits into
passphrase-policy-validation-fixfrom
passphrase-policy-validation-fix-int
Oct 30, 2026
Merged

sshrushanth-ks merged 5 commits into
passphrase-policy-validation-fixfrom
passphrase-policy-validation-fix-int

Conversation

@sshrushanth-ks

@sshrushanth-ks sshrushanth-ks commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Apply password complexity rules to generated passwords, passphrase rules to generated passphrases, and matching domain-specific policies to manually entered passwords and passphrases. Manual entries are not checked against generator defaults when no domain policy matches.

Changes

  • keepercommander/enforcement.py: Added domain policy matching, generator policy selection, and manual password or allowed passphrase validation.
  • keepercommander/generator.py: Applied domain passphrase settings during generation.
  • keepercommander/commands/record_edit.py: Applied policy selection to typed record add and update flows; prioritized the main URL field.
  • keepercommander/commands/recordv2.py: Updated legacy add and edit policy handling, including the --force override.
  • keepercommander/commands/recordv3.py: Applied domain-aware validation to v3 record operations.
  • keepercommander/commands/nested_share_folder/record_commands.py: Added policy validation to NSF record operations and update retries.
  • unit-tests/: Added coverage for domain matching, generated and manual password/passphrase validation, URL selection, legacy overrides, and NSF retries.

Select generator policies by record URL and validate generated passwords
and passphrases with their respective rules. Apply explicit domain
policies to manually entered passwords and passphrases, while leaving
manual entries unchecked when no domain policy matches.
Cover record add and update flows, including legacy and nested records.
Add regression tests for policy selection and manual password validation.
@sshrushanth-ks sshrushanth-ks self-assigned this Oct 22, 2026
Normalize passphrase words to NFC and accept Unicode letters during
manual passphrase validation. Remove the unused NSF field resolver and
add regression coverage for domain-policy enforcement in NSF updates.
@sshrushanth-ks
sshrushanth-ks marked this pull request as ready for review October 22, 2026 07:11
passphrase intent from separators. Keep passphrase rules for generated
passphrases and add regression coverage for hyphenated passwords.
Use matching domain settings for passphrase generation and allow manual
entries that satisfy the domain’s password or permitted passphrase rules.
Prefer the primary record URL, add a policy override for legacy edits,
and revalidate manual passwords on NSF update retries.

Add regression coverage for policy selection, URL precedence, overrides,
and retry validation.
@sshrushanth-ks
sshrushanth-ks merged commit 0465a0a into passphrase-policy-validation-fix Oct 30, 2026
4 checks passed
sshrushanth-ks added a commit that referenced this pull request Oct 30, 2026
…on and updation, and apply domain-specific policies to manual passwords and passphrases (#2453)

* fix validation for passwords and passphrase in record creation and updation

* Apply domain-specific policies to generated and manual passwords

Select generator policies by record URL and validate generated passwords
and passphrases with their respective rules. Apply explicit domain
policies to manually entered passwords and passphrases, while leaving
manual entries unchecked when no domain policy matches.
Cover record add and update flows, including legacy and nested records.
Add regression tests for policy selection and manual password validation.

* Handle Unicode passphrases in domain policy validation

Normalize passphrase words to NFC and accept Unicode letters during
manual passphrase validation. Remove the unused NSF field resolver and
add regression coverage for domain-policy enforcement in NSF updates.

* Apply domain password rules to manual entries without inferring
passphrase intent from separators. Keep passphrase rules for generated
passphrases and add regression coverage for hyphenated passwords.

* Addressed review comments:

Use matching domain settings for passphrase generation and allow manual
entries that satisfy the domain’s password or permitted passphrase rules.
Prefer the primary record URL, add a policy override for legacy edits,
and revalidate manual passwords on NSF update retries.

Add regression coverage for policy selection, URL precedence, overrides,
and retry validation.
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.

4 participants