token.xml 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. <PAGE>
  2. <INCLUDE file="inc/header.tmpl" />
  3. <VAR match="VAR_SEL_FEATURES" replace="selected" />
  4. <VAR match="VAR_SEL_FEATURE_TOKEN" replace="selected" />
  5. <PARSE file="menu1.xml" />
  6. <PARSE file="menu2-features.xml" />
  7. <INCLUDE file="inc/content.tmpl" />
  8. <h1>One Time Password support</h1>
  9. <p>OpenConnect supports three types of software tokens for automatically
  10. generating one-time passwords:</p>
  11. <ul>
  12. <li><a href="https://en.wikipedia.org/wiki/SecurID">RSA SecurID</a> tokens using
  13. <a href="http://stoken.sf.net/">libstoken</a></li>
  14. <li>OATH TOTP <i>(<a href="https://tools.ietf.org/html/rfc6238">RFC6238</a>)</i> tokens</li>
  15. <li>OATH HOTP <i>(<a href="https://tools.ietf.org/html/rfc4226">RFC4226</a>)</i> tokens</li>
  16. </ul>
  17. <p>OATH HOTP/TOTP tokens are also supported in hardware by:</p>
  18. <ul><li><a href="https://developers.yubico.com/ykneo-oath/">ykneo-oath</a> applet on
  19. the <a href="https://www.yubico.com/products/yubikey-hardware/yubikey-neo/">Yubikey NEO</a>
  20. and similar devices</li></ul>
  21. <p>On the command line, the token mode is specified with the <tt>--token-mode</tt>
  22. argument, which can be one of <tt>rsa</tt>, <tt>totp</tt>, <tt>hotp</tt> or <tt>yubioath</tt>.</p>
  23. <p>The token secret is provided with the <tt>--token-secret</tt>
  24. argument, and the precise form it takes is dependent on the type of
  25. token as described below.</p>
  26. <p>For the <tt>openconnect</tt> command line program, if the first character of
  27. the <tt>--token-secret</tt> value is / or @, the argument is interpreted as a
  28. filename. The secret data will be loaded from <i>(and potentially saved back
  29. to, in the case of HOTP tokens)</i> the specified file.</p>
  30. <p>In each case, the automatic token generation will be tried twice before it
  31. is automatically disabled and the user asked to enter tokencodes manually.</p>
  32. <p>SecurID token codes will automatically fill in the primary password field in the
  33. authentication form presented by the server, while OATH token codes will
  34. fill in the secondary password field. This behaviour is empirically determined by
  35. the requirements of the servers that we have tested with; if you find a configuration
  36. in which it is not appropriate, please <a href="mail.html">let us know</a>.</p>
  37. <h2>SecurID</h2>
  38. <p>If no <tt>--token-secret</tt> argument is provided in SecurID mode, the
  39. default <tt>.stokenrc</tt> file from the user's home directory will be used.
  40. For the NetworkManager integration, this is a separate choice for the token
  41. type — the UI has separate choices for <i>"RSA SecurID - read from ~/.stokenrc"</i> vs.
  42. <i>"RSA SecurID - manually entered"</i>.</p>
  43. <p>If a token is provided — either directly on the command line, as the contents
  44. of a referenced file, or entered into the NetworkManager configuration dialog —
  45. it may take one of the many forms accepted by the <tt>stoken import</tt> command:</p>
  46. <ul>
  47. <li><b>286510182209303756117707012447003320623006...</b></li>
  48. <li><b>29658-21098-45467-64675-65731-01441-11337...</b><br/>
  49. Pure numeric (81-digit) "ctf" (compressed token format) strings,
  50. with or without dashes. These may have been furnished as-is, or
  51. they could have been derived from an sdtid file by the RSA
  52. TokenConverter program.</li>
  53. <li><b>com.rsa.securid.iphone://ctf?ctfData=229639330774927764401...</b><br/>
  54. iPhone-compatible token strings.</li>
  55. <li><b>http://127.0.0.1/securid/ctf?ctfData=250494932146245277466...</b></li>
  56. <li><b>http://127.0.0.1/securid/ctf?ctfData=AwAAfBc3QSopPxxjLGnxf...</b><br/>
  57. Android-compatible token strings.</li>
  58. <li><b>&amp;lt;?xml version=...</b><br/>
  59. RSA sdtid-formatted XML files. These should be generally be imported from a
  60. file: '<tt>--token-secret @<i>FILE.SDTID</i></tt>'</li>
  61. </ul>
  62. <p>Additionally, a filename <i>(prefixed by the <tt>@</tt> or <tt>/</tt> characters)</i>
  63. may refer to a stoken rcfile. The default behaviour if no <tt>--token-secret</tt> file
  64. is provided is therefore equivalent to:</p>
  65. <ul>
  66. <li><b>@<i>${HOME}</i>/.stokenrc</b></li>
  67. </ul>
  68. <p>SecurID two-factor authentication is based on something you have (a
  69. hardware or software token) and something you know (a 4-8 digit PIN code).
  70. SecurID administrators can provision software tokens in three different
  71. ways:</p>
  72. <ul>
  73. <li><b>PIN included in tokencode computation</b><br/>
  74. In most deployments, the software token application will prompt the user for
  75. a PIN, and then use the PIN to help calculate an 8-digit tokencode by summing
  76. each of the lower digits (modulo 10). The tokencode displayed by the app is
  77. then entered verbatim into the password field.</li>
  78. <li><b>PIN manually prepended to tokencode</b><br/>
  79. In other cases, the software token application will not prompt for a PIN; it
  80. will simply display a "bare" tokencode, often 6 digits long, similar to a
  81. SecurID hardware token (SID700 or equivalent). In response to the
  82. <i>Password:</i> prompt, the user concatenates his PIN and the tokencode:
  83. <i>PIN &amp; Tokencode = Passcode</i>.</li>
  84. <li><b>No PIN</b><br/>
  85. In rare cases, the server is configured such that a PIN is not required at
  86. all. In this case, the software token application does not prompt for a
  87. PIN and the user simply enters the tokencode into the password field.</li>
  88. </ul>
  89. <p>For the first case, OpenConnect will prompt for a PIN if the PIN has not
  90. been saved in <tt>~/.stokenrc</tt> using the <tt>stoken setpin</tt> command.
  91. Otherwise the saved PIN will automatically be used, permitting unattended
  92. operation. This works with all versions of libstoken.</p>
  93. <p>For the second and third cases, OpenConnect will unconditionally prompt
  94. for a PIN and concatenate the PIN with the generated tokencode. If
  95. appropriate, an empty PIN may be entered. This requires libstoken v0.8 or
  96. higher.</p>
  97. <h2>TOTP (Time-Based One-Time Password)</h2>
  98. <p>As with SecurID tokens, OATH TOTP tokens may be provided either directly on the command line, as the contents
  99. of a referenced file, or entered into the NetworkManager configuration dialog.
  100. They may be specified in one of the following forms:</p>
  101. <ul>
  102. <li><b>SecretSecret!</b></li>
  103. <li><b>sha256:SecretSecret!</b></li>
  104. <li><b>sha512:SecretSecret!</b><br/>
  105. For secrets which are actually UTF-8 strings instead of entirely randomly generated
  106. data, they may be specified directly in this form.</li>
  107. <li><b>0x53656372657453656372657421</b></li>
  108. <li><b>sha256:0x53656372657453656372657421</b></li>
  109. <li><b>sha512:0x53656372657453656372657421</b><br/>
  110. This is the hexadecimal form which <i>(without the leading <tt>0x</tt>)</i> is
  111. accepted by default by the
  112. <tt><a href="https://www.nongnu.org/oath-toolkit/oathtool.1.html">oathtool</a></tt>
  113. program.</li>
  114. <li><b>base32:KNSWG4TFORJWKY3SMV2CC===</b></li>
  115. <li><b>sha256:base32:KNSWG4TFORJWKY3SMV2CC===</b></li>
  116. <li><b>sha512:base32:KNSWG4TFORJWKY3SMV2CC===</b><br/>
  117. This is the base32 form which is accepted by the
  118. <tt><a href="https://www.nongnu.org/oath-toolkit/oathtool.1.html">oathtool</a></tt>
  119. program with its <tt>-b</tt> option..</li>
  120. <li><b>&amp;lt;?xml version=...</b><br/>
  121. PSKC XML files conforming to <a href="https://tools.ietf.org/html/rfc6030">RFC6030</a>.
  122. These should be generally be imported from a file: '<tt>--token-secret @<i>FILE.PSKC</i></tt>'</li>
  123. </ul>
  124. <p>The default HMAC algorithm for TOTP tokens is SHA-1. SHA-256 and
  125. SHA-512 are also supported; to use them prefix "<tt>sha256:</tt>" or
  126. "<tt>sha512:</tt>" when explicitly providing a key on the command line.
  127. Algorithms other than SHA-1 are not yet supported with PSKC files until
  128. the relevant standards have been updated to indicate how they shall be
  129. indicated in the PSKC file. See <a href="https://www.rfc-editor.org/errata_search.php?rfc=6238&amp;eid=4249">this erratum</a> to RFC6238 for current status.</p>
  130. <h2>HOTP (HMAC-Based One-Time Password)</h2>
  131. <p>HOTP tokens are very similar to TOTP tokens except that they are event-based, and
  132. contain an additional <i>counter</i> which is incremented each time a token is
  133. generated.</p>
  134. <p>For HOTP tokens, the secret and counter may be provided in one of the following forms:</p>
  135. <ul>
  136. <li><b>SecretSecret!,99</b></li>
  137. <li><b>0x53656372657453656372657421,99</b></li>
  138. <li><b>base32:KNSWG4TFORJWKY3SMV2CC===,99</b><br/>
  139. These correspond to the raw forms of the TOTP tokens given above, with the <i>counter</i>
  140. value appended in decimal form after a comma.</li>
  141. <li><b>&amp;lt;?xml version=...</b><br/>
  142. PSKC XML files conforming to <a href="https://tools.ietf.org/html/rfc6030">RFC6030</a> will
  143. contain the <i>counter</i> value.</li>
  144. </ul>
  145. <p>Although it is possible to specify HOTP tokens in their raw form
  146. on the command line, that's not very useful because any updates to the <i>counter</i> field
  147. will be discarded. Therefore it is advisable to use the <i>@filename</i> form of the
  148. <tt>--token-secret</tt> argument, and the updated secret with incremented <i>counter</i>
  149. value will be stored back to the file each time a token is generated.</p>
  150. <p>The token will be stored back to the file in the same form that it was originally
  151. provided.</p>
  152. <p>Although NetworkManager-openconnect only supports direct token
  153. entry <i>(you can't enter <tt>@filename</tt> into its GUI
  154. configuration and expect that to work)</i>, versions which are new enough
  155. to support HOTP will also have support for reading the updated counter values
  156. back from <tt>libopenconnect</tt> and storing them to the NetworkManager VPN
  157. configuration. So if you configure a VPN connection with a HOTP token secret of <tt>"0x1234,1"</tt>
  158. and authenticate once, you should be able to go back into the configuration and see
  159. that the token secret has been updated to <tt>"0x1234,2"</tt>.</p>
  160. <p>HOTP tokens also support SHA-256 and SHA-512 in precisely the same
  161. fashion as TOTP tokens, as described above.</p>
  162. <h2>Yubikey HOTP/TOTP</h2>
  163. <p>The <a href="https://developers.yubico.com/ykneo-oath/">ykneo-oath</a> applet
  164. implements secure HOTP/TOTP support by storing the private key within the hardware
  165. device so that it cannot be recovered.</p>
  166. <p>The applet can store multiple credentials. If a <tt>--token-secret</tt> argument
  167. is provided, it specifies the name of the credential which is to be used. Otherwise
  168. OpenConnect will use the first credential found on the device.</p>
  169. <p>Yubikey support is not yet implemented in NetworkManager.</p>
  170. <INCLUDE file="inc/footer.tmpl" />
  171. </PAGE>