Generate Password 2.0.0 stable release

Created on 6 July 2023, 12 months ago
Updated 13 October 2023, 9 months ago

Problem/Motivation

Generate Password 2.0.0-alpha1 was released on: 7 Feb 2023
https://www.drupal.org/project/genpass/releases/2.0.0-alpha1 β†’

Proposed resolution

  • Manage all other Drupal ~10.1.0 changes
  • Release a beta and RC with changes
  • List issues to be in for the stable 2.0.0 tag release

Remaining tasks

  • βœ… File an issue
  • βž– Testing to ensure no regression
  • βž– Automated unit testing coverage
  • βž– Automated functional testing coverage
  • βž– UX/UI designer responsibilities
  • βž– Readability
  • βž– Accessibility
  • βž– Performance
  • βž– Security
  • βž– Documentation
  • βž– Code review by maintainers
  • βž– Full testing and approval
  • βž– Credit contributors
  • βž– Review with the product owner
  • βž– Release notes snippet
  • ❌ Release

User interface changes

  • Action plugin to set random password for users via user admin page
  • Option to hide password field from admins
  • Option to use Genpass for all password generation normally done by core's generator

API changes

  • Hook to allow other forms ids to work with this module
  • Password generation service
  • Removal of hook_password(), genpass_generate(), genpass_password()

Data model changes

  • N/A

Release notes snippet

This is the first stable Drupal 10 compatible release. All future features and development of the module will be in the 2.0.x branch.

This version is also compatible with Drupal 9.1. Drupal 8 support has been dropped, although still supported by the 8.x-1.x branch.

NB: The hook_generate() implemented by this module has been removed in favour of a service implementing Drupal\Core\Password\PasswordGeneratorInterface. Genpass now installs itself by default as the password generating service of the site.

Bug fixes

New features and changes

🌱 Plan
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡―πŸ‡΄Jordan Rajab Natshah Jordan

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @Rajab Natshah
  • Status changed to Needs work 10 months ago
  • πŸ‡¦πŸ‡ΊAustralia ELC

    I'd like to add ^8.9 to the core_version_requirement, effectively replacing the 8.x-1.x branch and allowing site upgrades all the way from D8 to D10 without needing to also update this module.

    I'm in the process of getting all the new features into the 2.x branch, and I don't wish to duplicate that work into the 8.x-1.x branch. Once 2.x is stable, it should also be marked suggested and 8.x-1.x downgraded from that status. Give it a period and then mark it unsupported. Would a month do?

    Issues for release:

  • πŸ‡ΊπŸ‡ΈUnited States greggles Denver, Colorado, USA

    This plan seems great to me. I think a period of 2-3 months might be better before people get warnings in their site. Is there any reason to remove support from 8.x faster than 3 months?

  • πŸ‡ΊπŸ‡ΈUnited States greggles Denver, Colorado, USA

    One more thought - maybe the decision can depend in part on how many new issues (especially bugs) are reported? If there are few bugs reported that would argue for dropping support sooner.

  • πŸ‡¦πŸ‡ΊAustralia ELC

    3 months sounds fine. No real reason to speed it up unless everyone switches over in a hurry. Setting a schedule would be good.

    For 2.x branch
    - Finish adding these features + bug fixes
    - +1 week. Make a RC
    - +1 month no complaints, stable release

    For 8.x-1.x branch
    - Upon 2.x stable release:
    - Remove recommend
    - Make a 8.x-1.x release just with the existing tiny changes in that branch, plus a notice that it will soon be unsupported and it's easy upgrade to 2.x branch - hook requirements warning? A bit cheeky. At least with an update it might trigger people to see "oh there's a new version to get"
    - +2-3 months: Mark as unsupported

    • ELC β†’ committed e7498dfe on 2.0.x
      Issue #3372973 by ELC: Change minimum core requirement to 8.9.
      
      The 2.x...
  • πŸ‡ΊπŸ‡ΈUnited States greggles Denver, Colorado, USA

    Seems like a great plan to me. Thanks for all your work on this module!

    • ELC β†’ committed a3e89545 on 2.0.x
      Issue #3372973 by ELC: Use old interface for module listing before D9.4.
      
  • πŸ‡¦πŸ‡ΊAustralia ELC

    I just added πŸ“Œ Tidy up Settings UI Fixed to the list of issues but I also have another 2 in mind.

    • Add a password generator service, using the same interface as Drupal Core - DrupalPasswordInterface
      • Add option to use that password service in place of drupal core - either full replacement of service class, or decorate.
    • Remove hook_password facility. If you want to use Genpass for password generation, replace the drupal core's generator. Any module that wants to do the same, can write their own service to replace core's generator. There's no need for this module to provide the facility any more.

    This is available since Drupal 8 and the password service instead of user_password() function.

    The reason to use the replacement password service would be so that Genpass is actually used for all of the password generation, which is what is implied by the settings page, but it in only in use when a password field would normally be on the form. When email verification is enabled, only drupal core's generator is currently used. By outright replacing it, Genpass is used in all situations.

    Not sure that password display can always happen if desired. The token should still.

  • πŸ‡¦πŸ‡ΊAustralia ELC

    A couple of additional changes that have been credited against this issue:

    Change default install option for "genpass_mode" (User password entry) from PASSWORD_OPTIONAL (1) to PASSWORD_RESTRICTED (2). This lines up with D9 standard install which sets "email verification" on by default. This is the only option the lines up with the expected behaviour.

    Change the genpass_algorithm_modules() to use a different method. This doesn't really matter at this point as I'm posting issues to remove these bits of code completely anyway.

    • ELC β†’ committed 9b8889ff on 2.0.x
      Issue #3372973 by ELC: Change installed default for genpass_mode.
      
    • ELC β†’ committed 1ba7e340 on 2.0.x
      Issue #3372973 by ELC: Use extension.list.module and module_handler.
      
  • πŸ‡¦πŸ‡ΊAustralia ELC

    Attempting to πŸ“Œ Add PasswordGeneratorInterface based service. Remove hook_password Fixed has encountered the problem that I am replacing a service that was only introduced in D9.1. I have tried to make it configurable and work back with 8.9 by making it optional, and providing just a stand-alone service for the earlier versions, but it simply doesn't work. (See the issue for more details)

    Given this also removes all of the code that was part of the fallback to 8.9, this puts a very solid rock in the road to fork off and create a distinctly different 2.0.x release which really is D9.1+ and D10 only. Trying to keep D8 is just too hard, plus it's not supported anyway. Good-bye D8 support in this release.

    This does mean I would then update the plan to keep the 8.x-1.x release, but mark it not recommended instead after a 2.x release. There would be a 1.2 release to fix the known bug in it.

    Q: Should Genpass put itself in place of Core's DefaultPasswordGenerator by default? At present Genpass is only used on Admin user create/User Register forms; all other password generation slips through to core.

  • πŸ‡ΊπŸ‡ΈUnited States greggles Denver, Colorado, USA

    Q: Should Genpass put itself in place of Core's DefaultPasswordGenerator by default? At present Genpass is only used on Admin user create/User Register forms; all other password generation slips through to core.

    I think that would make sense. There have been issues over the years about making genpass work reliably for users created in a variety of ways, so putting it in place of core by default makes sense to me.

  • πŸ‡¦πŸ‡ΊAustralia ELC

    Remaining task is ✨ Allow other modules to specify which forms should work with this module (multiple add user forms) Fixed .

    All other tasks and issues are in the branches for 7.x-1.x, 8.x-1.x (still in feature branch), and 2.0.x releases.

    Sorry, it seems that 7.x-2.x is languishing. It's a different zero config version.

  • Status changed to Needs review 9 months ago
  • πŸ‡¦πŸ‡ΊAustralia ELC

    Last issue has been merged into dev. The dev-2.x branch is now all the code to include in a tagged 2.0.0 release. Should it be 2.0.0-rc1 instead due to the lack of feedback so far?

    Updated proposed release notes in issue summary.

  • πŸ‡ΊπŸ‡ΈUnited States greggles Denver, Colorado, USA

    I would go for 2.0.0. You can always release a 2.0.1 if there's a bug :)

    Thanks for all the good work!

  • Status changed to Fixed 9 months ago
  • πŸ‡¦πŸ‡ΊAustralia ELC

    Release has been made.

    3 at the same time! What could go wrong?

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.69.0 2024