1
0

secstore 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. .TH SECSTORE 1
  2. .SH NAME
  3. aescbc, secstore, ipso \- secstore commands
  4. .SH SYNOPSIS
  5. .B auth/secstore
  6. [
  7. .B -s
  8. .I server
  9. ]
  10. [
  11. .B -(g|G)
  12. .I getfile
  13. ]
  14. [
  15. .B -p
  16. .I putfile
  17. ]
  18. [
  19. .B -r
  20. .I rmfile
  21. ]
  22. [
  23. .B -c
  24. ]
  25. [
  26. .B -u
  27. .I user
  28. ]
  29. [
  30. .B -v
  31. ]
  32. [
  33. .B -i
  34. ]
  35. .PP
  36. .B auth/aescbc
  37. -e
  38. .I <cleartext
  39. .I >ciphertext
  40. .br
  41. .B auth/aescbc
  42. -d
  43. .I <ciphertext
  44. .I >cleartext
  45. .PP
  46. .B ipso
  47. [
  48. .B -as
  49. ] [
  50. .I file
  51. \&...
  52. ]
  53. .PP
  54. .SH DESCRIPTION
  55. .PP
  56. .I Secstore
  57. authenticates to the server
  58. using a password and optionally a hardware token,
  59. then saves or retrieves a file.
  60. This is intended to be a credentials store (public/private keypairs,
  61. passwords, and other secrets) for a factotum.
  62. .PP
  63. Option
  64. .B -p
  65. stores a file on the secstore.
  66. .PP
  67. Option
  68. .B -g
  69. retrieves a file to the local directory;
  70. option
  71. .B -G
  72. writes it to standard output instead.
  73. Specifying
  74. .I getfile
  75. of . will send to standard output
  76. a list of remote files with dates, lengths and SHA1 hashes.
  77. .PP
  78. Option
  79. .B -r
  80. removes a file from the secstore.
  81. .PP
  82. Option
  83. .B -c
  84. prompts for a password change.
  85. .PP
  86. Option
  87. .B -v
  88. produces more verbose output, in particular providing a few
  89. bits of feedback to help the user detect mistyping.
  90. .PP
  91. Option
  92. .B -i
  93. says that the password should be read from standard input
  94. instead of from
  95. .BR /dev/cons .
  96. .PP
  97. Option
  98. .B -n
  99. says that the password should be read from NVRAM
  100. (see
  101. .IR authsrv (2))
  102. instead of from
  103. .BR /dev/cons .
  104. .PP
  105. The server is
  106. .BR tcp!$auth!5356 ,
  107. or the server specified by option
  108. .BR -s .
  109. .PP
  110. For example, to add a secret to the file read by
  111. .IR factotum (4)
  112. at startup, open a new window, type
  113. .sp
  114. .EX
  115. % ramfs -p; cd /tmp
  116. % auth/secstore -g factotum
  117. secstore password:
  118. % echo 'key proto=apop dom=x.com user=ehg !password=hi' >> factotum
  119. % auth/secstore -p factotum
  120. secstore password:
  121. % read -m factotum > /mnt/factotum/ctl
  122. .EE
  123. .PP
  124. and delete the window.
  125. The first line creates an ephemeral memory-resident workspace,
  126. invisible to others and automatically removed when the window is deleted.
  127. The next three commands fetch the persistent copy of the secrets,
  128. append a new secret,
  129. and save the updated file back to secstore.
  130. The final command loads the new secret into the running factotum.
  131. .PP
  132. The
  133. .I ipso
  134. command packages this sequence into a convenient script to simplify editing of
  135. .I files
  136. stored on a secure store.
  137. It copies the named
  138. .I files
  139. into a local
  140. .IR ramfs (4)
  141. and invokes
  142. .IR acme (1)
  143. on them. When the editor exits,
  144. .I ipso
  145. prompts the user to confirm copying modifed or newly created files back to
  146. .I secstore.
  147. If no
  148. .I file
  149. is mentioned,
  150. .I ipso
  151. grabs all the user's files from
  152. .I secstore
  153. for editing.
  154. .PP
  155. .PP
  156. The
  157. .B -s
  158. option of
  159. .I ipso
  160. invokes
  161. .IR sam (1)
  162. as the editor insted of
  163. .BR acme ;
  164. the
  165. .B -a
  166. option provides a similar service for files encrypted by
  167. .I aescbc
  168. .RI ( q.v. ).
  169. With the
  170. .B -a
  171. option, the full rooted pathname of the
  172. .I file
  173. must be specified and all
  174. .I files
  175. must be encrypted with the same key.
  176. Also with
  177. .BR -a ,
  178. newly created files are ignored.
  179. .PP
  180. .I Aescbc
  181. encrypts and decrypts using AES (Rijndael) in cipher
  182. block chaining (CBC) mode.
  183. .SH SOURCE
  184. .B /sys/src/cmd/auth/secstore
  185. .SH SEE ALSO
  186. .IR factotum (4),
  187. .IR secstore (8)
  188. .SH BUGS
  189. There is deliberately no backup of files on the secstore, so
  190. .B -r
  191. (or a disk crash) is irrevocable. You are advised to store
  192. important secrets in a second location.
  193. .PP
  194. When using
  195. .IR ipso ,
  196. secrets will appear as plain text in the editor window,
  197. so use the command in private.