two_factor.html 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
  6. <title>Two-factor authentication &#8212; phpMyAdmin 5.2.2 documentation</title>
  7. <link rel="stylesheet" type="text/css" href="_static/pygments.css" />
  8. <link rel="stylesheet" type="text/css" href="_static/classic.css" />
  9. <script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
  10. <script src="_static/jquery.js"></script>
  11. <script src="_static/underscore.js"></script>
  12. <script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
  13. <script src="_static/doctools.js"></script>
  14. <script src="_static/sphinx_highlight.js"></script>
  15. <link rel="index" title="Index" href="genindex.html" />
  16. <link rel="search" title="Search" href="search.html" />
  17. <link rel="copyright" title="Copyright" href="copyright.html" />
  18. <link rel="next" title="Transformations" href="transformations.html" />
  19. <link rel="prev" title="Configuring phpMyAdmin" href="settings.html" />
  20. </head><body>
  21. <div class="related" role="navigation" aria-label="related navigation">
  22. <h3>Navigation</h3>
  23. <ul>
  24. <li class="right" style="margin-right: 10px">
  25. <a href="genindex.html" title="General Index"
  26. accesskey="I">index</a></li>
  27. <li class="right" >
  28. <a href="transformations.html" title="Transformations"
  29. accesskey="N">next</a> |</li>
  30. <li class="right" >
  31. <a href="settings.html" title="Configuring phpMyAdmin"
  32. accesskey="P">previous</a> |</li>
  33. <li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 5.2.2 documentation</a> &#187;</li>
  34. <li class="nav-item nav-item-1"><a href="user.html" accesskey="U">User Guide</a> &#187;</li>
  35. <li class="nav-item nav-item-this"><a href="">Two-factor authentication</a></li>
  36. </ul>
  37. </div>
  38. <div class="document">
  39. <div class="documentwrapper">
  40. <div class="bodywrapper">
  41. <div class="body" role="main">
  42. <section id="two-factor-authentication">
  43. <span id="fa"></span><h1>Two-factor authentication<a class="headerlink" href="#two-factor-authentication" title="Permalink to this heading">¶</a></h1>
  44. <div class="versionadded">
  45. <p><span class="versionmodified added">New in version 4.8.0.</span></p>
  46. </div>
  47. <p>Since phpMyAdmin 4.8.0 you can configure two-factor authentication to be
  48. used when logging in. To use this, you first need to configure the
  49. <a class="reference internal" href="setup.html#linked-tables"><span class="std std-ref">phpMyAdmin configuration storage</span></a>. Once this is done, every user can opt-in for the second
  50. authentication factor in the <span class="guilabel">Settings</span>.</p>
  51. <p>When running phpMyAdmin from the Git source repository, the dependencies must be installed
  52. manually; the typical way of doing so is with the command:</p>
  53. <div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>composer<span class="w"> </span>require<span class="w"> </span>pragmarx/google2fa-qrcode<span class="w"> </span>bacon/bacon-qr-code
  54. </pre></div>
  55. </div>
  56. <p>Or when using a hardware security key with FIDO U2F:</p>
  57. <div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>composer<span class="w"> </span>require<span class="w"> </span>code-lts/u2f-php-server
  58. </pre></div>
  59. </div>
  60. <section id="authentication-application-2fa">
  61. <h2>Authentication Application (2FA)<a class="headerlink" href="#authentication-application-2fa" title="Permalink to this heading">¶</a></h2>
  62. <p>Using an application for authentication is a quite common approach based on HOTP and
  63. <a class="reference external" href="https://en.wikipedia.org/wiki/Time-based_One-time_Password_Algorithm">TOTP</a>.
  64. It is based on transmitting a private key from phpMyAdmin to the authentication
  65. application and the application is then able to generate one time codes based
  66. on this key. The easiest way to enter the key in to the application from phpMyAdmin is
  67. through scanning a QR code.</p>
  68. <p>There are dozens of applications available for mobile phones to implement these
  69. standards, the most widely used include:</p>
  70. <ul class="simple">
  71. <li><p><a class="reference external" href="https://freeotp.github.io/">FreeOTP for iOS, Android and Pebble</a></p></li>
  72. <li><p><a class="reference external" href="https://authy.com/">Authy for iOS, Android, Chrome, OS X</a></p></li>
  73. <li><p><a class="reference external" href="https://apps.apple.com/us/app/google-authenticator/id388497605">Google Authenticator for iOS</a></p></li>
  74. <li><p><a class="reference external" href="https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2">Google Authenticator for Android</a></p></li>
  75. <li><p><a class="reference external" href="https://lastpass.com/auth/">LastPass Authenticator for iOS, Android, OS X, Windows</a></p></li>
  76. </ul>
  77. </section>
  78. <section id="hardware-security-key-fido-u2f">
  79. <h2>Hardware Security Key (FIDO U2F)<a class="headerlink" href="#hardware-security-key-fido-u2f" title="Permalink to this heading">¶</a></h2>
  80. <p>Using hardware tokens is considered to be more secure than a software based
  81. solution. phpMyAdmin supports <a class="reference external" href="https://en.wikipedia.org/wiki/Universal_2nd_Factor">FIDO U2F</a>
  82. tokens.</p>
  83. <p>There are several manufacturers of these tokens, for example:</p>
  84. <ul class="simple">
  85. <li><p><a class="reference external" href="https://www.yubico.com/fido-u2f/">youbico FIDO U2F Security Key</a></p></li>
  86. <li><p><a class="reference external" href="https://www.hypersecu.com/hyperfido">HyperFIDO</a></p></li>
  87. <li><p><a class="reference external" href="https://trezor.io/?offer_id=12&amp;aff_id=1592&amp;source=phpmyadmin">Trezor Hardware Wallet</a> can act as an <a class="reference external" href="https://trezor.io/learn/a/what-is-u2f">U2F token</a></p></li>
  88. <li><p><a class="reference external" href="https://www.dongleauth.com/dongles/">List of Two Factor Auth (2FA) Dongles</a></p></li>
  89. </ul>
  90. </section>
  91. <section id="simple-two-factor-authentication">
  92. <span id="simple2fa"></span><h2>Simple two-factor authentication<a class="headerlink" href="#simple-two-factor-authentication" title="Permalink to this heading">¶</a></h2>
  93. <p>This authentication is included for testing and demonstration purposes only as
  94. it really does not provide two-factor authentication, it just asks the user to confirm login by
  95. clicking on the button.</p>
  96. <p>It should not be used in the production and is disabled unless
  97. <span class="target" id="index-0"></span><a class="reference internal" href="config.html#cfg_DBG_simple2fa"><code class="xref config config-option docutils literal notranslate"><span class="pre">$cfg['DBG']['simple2fa']</span></code></a> is set.</p>
  98. </section>
  99. </section>
  100. <div class="clearer"></div>
  101. </div>
  102. </div>
  103. </div>
  104. <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
  105. <div class="sphinxsidebarwrapper">
  106. <div>
  107. <h3><a href="index.html">Table of Contents</a></h3>
  108. <ul>
  109. <li><a class="reference internal" href="#">Two-factor authentication</a><ul>
  110. <li><a class="reference internal" href="#authentication-application-2fa">Authentication Application (2FA)</a></li>
  111. <li><a class="reference internal" href="#hardware-security-key-fido-u2f">Hardware Security Key (FIDO U2F)</a></li>
  112. <li><a class="reference internal" href="#simple-two-factor-authentication">Simple two-factor authentication</a></li>
  113. </ul>
  114. </li>
  115. </ul>
  116. </div>
  117. <div>
  118. <h4>Previous topic</h4>
  119. <p class="topless"><a href="settings.html"
  120. title="previous chapter">Configuring phpMyAdmin</a></p>
  121. </div>
  122. <div>
  123. <h4>Next topic</h4>
  124. <p class="topless"><a href="transformations.html"
  125. title="next chapter">Transformations</a></p>
  126. </div>
  127. <div role="note" aria-label="source link">
  128. <h3>This Page</h3>
  129. <ul class="this-page-menu">
  130. <li><a href="_sources/two_factor.rst.txt"
  131. rel="nofollow">Show Source</a></li>
  132. </ul>
  133. </div>
  134. <div id="searchbox" style="display: none" role="search">
  135. <h3 id="searchlabel">Quick search</h3>
  136. <div class="searchformwrapper">
  137. <form class="search" action="search.html" method="get">
  138. <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
  139. <input type="submit" value="Go" />
  140. </form>
  141. </div>
  142. </div>
  143. <script>document.getElementById('searchbox').style.display = "block"</script>
  144. </div>
  145. </div>
  146. <div class="clearer"></div>
  147. </div>
  148. <div class="related" role="navigation" aria-label="related navigation">
  149. <h3>Navigation</h3>
  150. <ul>
  151. <li class="right" style="margin-right: 10px">
  152. <a href="genindex.html" title="General Index"
  153. >index</a></li>
  154. <li class="right" >
  155. <a href="transformations.html" title="Transformations"
  156. >next</a> |</li>
  157. <li class="right" >
  158. <a href="settings.html" title="Configuring phpMyAdmin"
  159. >previous</a> |</li>
  160. <li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 5.2.2 documentation</a> &#187;</li>
  161. <li class="nav-item nav-item-1"><a href="user.html" >User Guide</a> &#187;</li>
  162. <li class="nav-item nav-item-this"><a href="">Two-factor authentication</a></li>
  163. </ul>
  164. </div>
  165. <div class="footer" role="contentinfo">
  166. &#169; <a href="copyright.html">Copyright</a> 2012 - 2024, The phpMyAdmin devel team.
  167. Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.3.0.
  168. </div>
  169. </body>
  170. </html>