two_factor.rst.txt 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. .. _2fa:
  2. Two-factor authentication
  3. =========================
  4. .. versionadded:: 4.8.0
  5. Since phpMyAdmin 4.8.0 you can configure two-factor authentication to be
  6. used when logging in. To use this, you first need to configure the
  7. :ref:`linked-tables`. Once this is done, every user can opt-in for the second
  8. authentication factor in the :guilabel:`Settings`.
  9. When running phpMyAdmin from the Git source repository, the dependencies must be installed
  10. manually; the typical way of doing so is with the command:
  11. .. code-block:: sh
  12. composer require pragmarx/google2fa bacon/bacon-qr-code
  13. Or when using a hardware security key with FIDO U2F:
  14. .. code-block:: sh
  15. composer require samyoul/u2f-php-server
  16. Authentication Application (2FA)
  17. --------------------------------
  18. Using an application for authentication is a quite common approach based on HOTP and
  19. `TOTP <https://en.wikipedia.org/wiki/Time-based_One-time_Password_Algorithm>`_.
  20. It is based on transmitting a private key from phpMyAdmin to the authentication
  21. application and the application is then able to generate one time codes based
  22. on this key. The easiest way to enter the key in to the application from phpMyAdmin is
  23. through scanning a QR code.
  24. There are dozens of applications available for mobile phones to implement these
  25. standards, the most widely used include:
  26. * `FreeOTP for iOS, Android and Pebble <https://freeotp.github.io/>`_
  27. * `Authy for iOS, Android, Chrome, OS X <https://authy.com/>`_
  28. * `Google Authenticator for iOS <https://apps.apple.com/us/app/google-authenticator/id388497605>`_
  29. * `Google Authenticator for Android <https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2>`_
  30. * `LastPass Authenticator for iOS, Android, OS X, Windows <https://lastpass.com/auth/>`_
  31. Hardware Security Key (FIDO U2F)
  32. --------------------------------
  33. Using hardware tokens is considered to be more secure than a software based
  34. solution. phpMyAdmin supports `FIDO U2F <https://en.wikipedia.org/wiki/Universal_2nd_Factor>`_
  35. tokens.
  36. There are several manufacturers of these tokens, for example:
  37. * `youbico FIDO U2F Security Key <https://www.yubico.com/fido-u2f/>`_
  38. * `HyperFIDO <https://www.hypersecu.com/tmp/products/hyperfido>`_
  39. * `Trezor Hardware Wallet <https://trezor.io/?offer_id=12&aff_id=1592&source=phpmyadmin>`_ can act as an `U2F token <https://wiki.trezor.io/User_manual:Two-factor_Authentication_with_U2F>`_
  40. * `List of Two Factor Auth (2FA) Dongles <https://www.dongleauth.info/dongles/>`_
  41. .. _simple2fa:
  42. Simple two-factor authentication
  43. --------------------------------
  44. This authentication is included for testing and demonstration purposes only as
  45. it really does not provide two-factor authentication, it just asks the user to confirm login by
  46. clicking on the button.
  47. It should not be used in the production and is disabled unless
  48. :config:option:`$cfg['DBG']['simple2fa']` is set.