Skip to content

The road to a authenticator-based two-factor authentication #62

@scheb

Description

@scheb

The bundle is supporting authenticator-based security since v5

(Shamelessly stealing the title from Wouter's symfony/symfony#39308)

I create this issue to let everyone know what the plan is with bundle's next major version and authenticator-based security.

The bundle is supporting authenticator-based security since 5.0.0. It's an experimental feature in Symfony, also the bundle's implementation has been experimental. I've continously adopted new features arriving with Symfony 5.x minor releases to make the authenticator intgeration better and cleaner. Because of that, if you want to use authenticator-base security with the current bundle version (at time of writing 5.7.0), it requires at least Symfony 5.2, with #61 that will be Symfony 5.3.

Symfony maintainers plan to remove the old security system and make authenticator-based security officially the new security system in Symfony 6, planned for November 2021. I plan to have the next major bundle version (also 6) to be released close to that. That version will be the one supporting Symfony 6, bundle version 5 will not support Symfony 6.

The goal for this upcoming major version is to have finally a clean implementation for two-factor authentication. I want to remove any kind of "hacks" the bundle does to make two-factor authentication work. These are mostly DIC hacks to decorate (internal) services from Symfony's security to inject some extra 2fa-bundle logic. Furthermore, since bundle version 6 is targeting Symfony 6, I'll remove support for the old security system. That allows me to remove a big chunk of code that's no longer needed. Also various compatibility layers for older Symfony versions can be removed.


Summary:

  • Bundle version 6 releases close to Symfony 6
  • That bundle version will target Symfony 6
  • To support early testing, I'm likely going to release a v6-beta version of the bundle, which is supporting Symfony's respective beta and RC versions
  • Bump up minimum supported PHP version to 8.0 (*) and adopt new language features (i.e. property types)
  • Drop support for the old Symfony security system, only the authenticators-based system will be supported
  • Symfony 5.4 will be supported as a migration path, but only authenticator security. If you try using Symfony 5.4 and the old security system, there will be an error
  • Clean up code that is no longer needed and remove compatibility layers

* Symfony 6 will require PHP 8.0 (symfony/symfony#40389)


Todo:

  • Remove classes related to old security system
  • Remove Symfony compatibility layers for Symfony <= 5.4
  • Remove non-authenticators config from integration tests and app readme
  • Make sure the bundle errors when used on Symfony 5.4 with old security system
  • Add passport to the authentication context
  • Update build matrix (unit + integration test suite)
  • Upgrade notes, mention switch to authenticator security
  • Beta release: Allow Symfony beta-level releases (composer.json in repo root + sub-packages + app folder )
  • Stable release: Only Symfony stable-level releases (composer.json in repo root + sub-packages + app folder)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions