two_factor.html 9.2 KB

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