summaryrefslogtreecommitdiff
path: root/man/man8/monkeysphere-authentication.8
blob: 7e295daa23ea29f19baedbe3f438ac9450f6f958 (plain)
  1. .TH MONKEYSPHERE-AUTHENTICATION "8" "March 13, 2013" "monkeysphere" "System Commands"
  2. .SH NAME
  3. monkeysphere\-authentication - Monkeysphere authentication admin tool.
  4. .SH SYNOPSIS
  5. .B monkeysphere\-authentication \fIsubcommand\fP [\fIargs\fP]
  6. .SH DESCRIPTION
  7. \fBMonkeysphere\fP is a framework to leverage the OpenPGP Web of Trust
  8. (WoT) for key-based authentication. OpenPGP keys are tracked via
  9. GnuPG, and added to the authorized_keys files used by OpenSSH for
  10. connection authentication.
  11. \fBmonkeysphere\-authentication\fP is a Monkeysphere server admin
  12. utility for configuring and managing SSH user authentication through
  13. the WoT.
  14. .SH SUBCOMMANDS
  15. \fBmonkeysphere\-authentication\fP takes various subcommands:
  16. .TP
  17. .B update\-users [USER]...
  18. Rebuild the monkeysphere-controlled authorized_keys files. For each
  19. specified account, the user ID's listed in the account's
  20. authorized_user_ids file are processed. For each user ID, gpg will be
  21. queried for keys associated with that user ID, optionally querying a
  22. keyserver. If an acceptable key is found (see KEY ACCEPTABILITY in
  23. monkeysphere(7)), the key is added to the account's
  24. monkeysphere-controlled authorized_keys file. If the
  25. RAW_AUTHORIZED_KEYS variable is set, then a separate authorized_keys
  26. file (usually ~USER/.ssh/authorized_keys) is appended to the
  27. monkeysphere-controlled authorized_keys file. If no accounts are
  28. specified, then all accounts on the system are processed. `u' may be
  29. used in place of `update\-users'.
  30. .TP
  31. .B keys\-for\-user USER
  32. Output to stdout authorized_keys lines for USER. This command behaves
  33. exactly like update\-users (above), except that the resulting
  34. authorized_keys lines are output to stdout, instead of being written
  35. to the monkeysphere-controlled authorized_keys file.
  36. .TP
  37. .B refresh\-keys
  38. Refresh all keys in the monkeysphere-authentication keyring. If no
  39. accounts are specified, then all accounts on the system are processed.
  40. `r' may be used in place of `refresh\-keys'.
  41. .TP
  42. .B add\-id\-certifier KEYID|FILE
  43. Instruct system to trust user identity certifications made by KEYID.
  44. The key ID will be loaded from the keyserver. A file may be loaded
  45. instead of pulling the key from the keyserver by specifying the path
  46. to the file as the argument, or by specifying `\-' to load from stdin.
  47. Using the `\-n' or `\-\-domain' option allows you to indicate that you
  48. only trust the given KEYID to make identifications within a specific
  49. domain (e.g. "trust KEYID to certify user identities within the
  50. @example.org domain"). A certifier trust level can be specified with
  51. the `\-t' or `\-\-trust' option (possible values are `marginal' and
  52. `full' (default is `full')). A certifier trust depth can be specified
  53. with the `\-d' or `\-\-depth' option (default is 1). `c+' may be used in
  54. place of `add\-id\-certifier'.
  55. .TP
  56. .B remove\-id\-certifier KEYID
  57. Instruct system to ignore user identity certifications made by KEYID.
  58. `c\-' may be used in place of `remove\-id\-certifier'.
  59. .TP
  60. .B list\-id\-certifiers
  61. List key IDs trusted by the system to certify user identities. `c'
  62. may be used in place of `list\-id\-certifiers'.
  63. .TP
  64. .B version
  65. Show the monkeysphere version number. `v' may be used in place of
  66. `version'.
  67. .TP
  68. .B help
  69. Output a brief usage summary. `h' or `?' may be used in place of
  70. `help'.
  71. Other commands:
  72. .TP
  73. .B setup
  74. Setup the server in preparation for Monkeysphere user authentication.
  75. This command is idempotent and run automatically by the other
  76. commands, and should therefore not usually need to be run manually.
  77. `s' may be used in place of `setup'.
  78. .TP
  79. .B diagnostics
  80. Review the state of the server with respect to authentication. `d'
  81. may be used in place of `diagnostics'.
  82. .TP
  83. .B gpg\-cmd
  84. Execute a gpg command, as the monkeysphere user, on the monkeysphere
  85. authentication `sphere' keyring. As of monkeysphere 0.36, this takes
  86. its arguments separately, not as a single string. Use this command
  87. with caution, as modifying the authentication sphere keyring can
  88. affect ssh user authentication.
  89. .SH SETUP USER AUTHENTICATION
  90. If the server will handle user authentication through
  91. monkeysphere-generated authorized_keys files, the server must be told
  92. which keys will act as identity certifiers. This is done with the
  93. \fBadd\-id\-certifier\fP command:
  94. # monkeysphere\-authentication add\-id\-certifier KEYID
  95. where KEYID is the key ID of the server admin, or whoever's
  96. certifications should be acceptable to the system for the purposes of
  97. authenticating remote users. You can run this command multiple times
  98. to indicate that multiple certifiers are trusted. You may also
  99. specify a filename instead of a key ID, as long as the file contains a
  100. single OpenPGP public key. Certifiers can be removed with the
  101. \fBremove\-id\-certifier\fP command, and listed with the
  102. \fBlist\-id\-certifiers\fP command.
  103. A remote user will be granted access to a local account based on the
  104. appropriately-signed and valid keys associated with user IDs listed in
  105. that account's authorized_user_ids file. By default, the
  106. authorized_user_ids file for an account is
  107. ~/.monkeysphere/authorized_user_ids. This can be changed in the
  108. monkeysphere\-authentication.conf file.
  109. The \fBupdate\-users\fP command is used to generate authorized_keys
  110. files for a local account based on the user IDs listed in the
  111. account's authorized_user_ids file:
  112. # monkeysphere\-authentication update\-users USER
  113. Not specifying USER will cause all accounts on the system to updated.
  114. The ssh server can use these monkeysphere-generated authorized_keys
  115. files to grant access to user accounts for remote users. In order for
  116. sshd to look at the monkeysphere-generated authorized_keys file for
  117. user authentication, the AuthorizedKeysFile parameter must be set in
  118. the sshd_config to point to the monkeysphere\-generated
  119. authorized_keys files:
  120. AuthorizedKeysFile __SYSDATADIR_PREFIX__/monkeysphere/authorized_keys/%u
  121. It is recommended to add "monkeysphere\-authentication update\-users"
  122. to a system crontab, so that user keys are kept up-to-date, and key
  123. revocations and expirations can be processed in a timely manner.
  124. .SH ENVIRONMENT
  125. The following environment variables will override those specified in
  126. the config file (defaults in parentheses):
  127. .TP
  128. MONKEYSPHERE_MONKEYSPHERE_USER
  129. User to control authentication keychain. (monkeysphere)
  130. .TP
  131. MONKEYSPHERE_LOG_LEVEL
  132. Set the log level. Can be SILENT, ERROR, INFO, VERBOSE, DEBUG, in
  133. increasing order of verbosity. (INFO)
  134. .TP
  135. MONKEYSPHERE_KEYSERVER
  136. OpenPGP keyserver to use. (pool.sks\-keyservers.net)
  137. .TP
  138. MONKEYSPHERE_CHECK_KEYSERVER
  139. Whether or not to check the keyserver when making gpg queries. (true)
  140. .TP
  141. MONKEYSPHERE_AUTHORIZED_USER_IDS
  142. Path to user's authorized_user_ids file. %h gets replaced with the
  143. user's homedir, %u with the username.
  144. (%h/.monkeysphere/authorized_user_ids)
  145. .TP
  146. MONKEYSPHERE_RAW_AUTHORIZED_KEYS
  147. Path to regular ssh-style authorized_keys file to append to
  148. monkeysphere-generated authorized_keys. `none' means not to add any
  149. raw authorized_keys file. %h gets replaced with the user's homedir,
  150. %u with the username. (%h/.ssh/authorized_keys)
  151. .TP
  152. MONKEYSPHERE_PROMPT
  153. If set to `false', never prompt the user for confirmation. (true)
  154. .TP
  155. MONKEYSPHERE_STRICT_MODES
  156. If set to `false', ignore too-loose permissions on known_hosts,
  157. authorized_keys, and authorized_user_ids files. NOTE: setting this to
  158. false may expose users to abuse by other users on the system. (true)
  159. .SH FILES
  160. .TP
  161. __SYSCONFDIR_PREFIX__/etc/monkeysphere/monkeysphere\-authentication.conf
  162. System monkeysphere-authentication config file.
  163. .TP
  164. __SYSCONFDIR_PREFIX__/etc/monkeysphere/monkeysphere\-authentication\-x509\-anchors.crt or\p \
  165. __SYSCONFDIR_PREFIX__/etc/monkeysphere/monkeysphere\-x509\-anchors.crt
  166. If monkeysphere-authentication is configured to query an hkps
  167. keyserver, it will use X.509 Certificate Authority certificates in
  168. this file to validate any X.509 certificates used by the keyserver.
  169. If the monkeysphere-authentication-x509 file is present, the
  170. monkeysphere-x509 file will be ignored.
  171. .TP
  172. __SYSDATADIR_PREFIX__/monkeysphere/authorized_keys/USER
  173. Monkeysphere-controlled user authorized_keys files.
  174. .TP
  175. ~/.monkeysphere/authorized_user_ids
  176. A list of OpenPGP user IDs, one per line. OpenPGP keys with an
  177. exactly-matching User ID (calculated valid by the designated identity
  178. certifiers), will have any valid authorization-capable keys or subkeys
  179. added to the given user's authorized_keys file. Any line with initial
  180. whitespace will be interpreted as ssh authorized_keys options
  181. applicable to the preceding User ID.
  182. .SH AUTHOR
  183. This man page was written by:
  184. Jameson Rollins <jrollins@finestructure.net>,
  185. Daniel Kahn Gillmor <dkg@fifthhorseman.net>,
  186. Matthew Goins <mjgoins@openflows.com>
  187. .SH SEE ALSO
  188. .BR monkeysphere (1),
  189. .BR monkeysphere\-host (8),
  190. .BR monkeysphere (7),
  191. .BR gpg (1),
  192. .BR ssh (1),
  193. .BR sshd (8),
  194. .BR sshd_config (5)