Anyone here who has used the Generate Password ("Genpass") module in conjunction with the Password Policy module?

Ref.
http://drupal.org/project/genpass
https://www.drupal.org/project/password_policy

Comments

erikwebb’s picture

I doubt it. Since this validates the password fields explicitly, I doubt they will work together. Are you asking if you can have Genpass follow the policies of Password Policy?

erikwebb’s picture

Status: Active » Postponed
erikwebb’s picture

Title: Does this module play nicely with the Genpass module? » Integrate with Password Policy module
Project: Password Policy » Generate Password
Category: support » task
Status: Postponed » Active

I would argue that the Genpass module should add the support needed for integration. Since this module only checks the provided password, the Genpass module should provide new passwords until the validation passes.

joelstein’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

I won't be writing this patch, but somebody else is welcome to and re-open this issue, and I'll be happy to review it.

laxman.ghavte’s picture

Status: Closed (won't fix) » Needs work
Leeteq’s picture

Issue summary: View changes
Leeteq’s picture

Reference:

From the front page of Password Policy module:

Limitations:

"Password policies only apply to passwords set via user forms in the web interface. Passwords changed by other means (Drush, web services, etc.) may not be subject to password policy constraints. Please see the following issue if you would like to contribute to removing this limitation: "

#2451159: Password policy doesn't work when updating the user

laxman.ghavte’s picture

I have created sandbox module using which we can use Generate Password ("Genpass") module in conjunction with the Password Policy module.

This new module "Genpass Password policy" reads password criteria set by password policy module and generate new password.

https://www.drupal.org/sandbox/laxmang/2555131

laxman.ghavte’s picture

Status: Needs work » Needs review
greggles’s picture

Title: Integrate with Password Policy module » Integrate with Password Policy module so the generated password meets policy requirement
Category: Task » Feature request
Status: Needs review » Active

@laxman.ghavte - could you post that as a patch? That's how Drupal issues become "needs review" is via the patch process. Moving back to active. I looked at the module and it seems it is incomplete with some elements hard-coded and has a bit of debug code left around in comments.

Another possible solution to this issue is to ensure that the generated password from genpass is very strong and therefore meets a lot of policies. I believe that would be handled by #2975168: Genpass 7.x-2.x. Am I naive to think about policies like that? :)

texas-bronius’s picture

Status: Active » Closed (works as designed)

In my opinion, it should not be the responsibility of genpass to enforce "password policy" (hmm.. unless Policy becomes core maybe). Instead, genpass provides a hook (hook_password) which a dev can implement to provide his own policy-compliant password generator and a mechanism to select it as the method.

Such a password gen could easily call itself and check against Policy repetitively until it generates a compliant password. In practice, I got maybe 1 out of 4 password generations fail on me in genpass beta, and the new 1.0 branch promises to generate more complicated passwords out of the box:

> It should help to always pass basically any password policy since it's longer and has more variation in the kinds of characters that are included.

so should improve chances. This is to say that if you need it, implement such a hook, and if you find that it's running more than some low number of acceptable iterations, then re-open this issue.

greggles’s picture

I agree with the closure in #11. It seems this issue is largely solved by the new improved complexity of passwords that exists in 8.x-1.0 and in 7.x-2.x branch. If that proves not to be the case we can consider increasing the strength of those passwords further on a case-by-case basis.