turnadmin.1 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381
  1. .\" Text automatically generated by txt2man
  2. .TH TURN 1 "07 January 2021" "" ""
  3. .SH GENERAL INFORMATION
  4. \fIturnadmin\fP is a TURN administration tool. This tool can be used to manage
  5. the user accounts (add/remove users, generate
  6. TURN keys for the users). For security reasons, we do not recommend
  7. storing passwords openly. The better option is to use pre\-processed "keys"
  8. which are then used for authentication. These keys are generated by \fIturnadmin\fP.
  9. Turnadmin is a link to \fIturnserver\fP binary, but \fIturnadmin\fP performs different
  10. functions.
  11. .PP
  12. Options note: \fIturnadmin\fP has long and short option names, for most options.
  13. Some options have only long form, some options have only short form. Their syntax
  14. somewhat different, if an argument is required:
  15. .PP
  16. The short form must be used as this (for example):
  17. .PP
  18. .nf
  19. .fam C
  20. $ turnadmin \-u <username> \.\.\.
  21. .fam T
  22. .fi
  23. The long form equivalent must use the "=" character:
  24. .PP
  25. .nf
  26. .fam C
  27. $ turnadmin \-\-user=<username> \.\.\.
  28. .fam T
  29. .fi
  30. If this is a flag option (no argument required) then their usage are the same, for example:
  31. .PP
  32. .nf
  33. .fam C
  34. $ turnadmin \-k \.\.\.
  35. .fam T
  36. .fi
  37. is equivalent to:
  38. .PP
  39. .nf
  40. .fam C
  41. $ turnadmin \-\-key \.\.\.
  42. .fam T
  43. .fi
  44. You have always the use the \fB\-r\fP <realm> option with commands for long term credentials \-
  45. because data for multiple realms can be stored in the same database.
  46. .PP
  47. =====================================
  48. .SS NAME
  49. \fB
  50. \fBturnadmin \fP\- a TURN relay administration tool.
  51. \fB
  52. .SS SYNOPSIS
  53. .nf
  54. .fam C
  55. $ \fIturnadmin\fP [\fIcommand\fP] [\fIoptions\fP]
  56. $ \fIturnadmin\fP [ \fB\-h\fP | \fB\-\-help\fP]
  57. .fam T
  58. .fi
  59. .fam T
  60. .fi
  61. .SS DESCRIPTION
  62. Commands:
  63. .TP
  64. .B
  65. \fB\-P\fP, \fB\-\-generate\-encrypted\-password\fP
  66. Generate and print to the standard
  67. output an encrypted form of a password (for web admin user or CLI).
  68. The value then can be used as a safe key for the password
  69. storage on disk or in the database. Every invocation for the same password
  70. produces a different result. The format of the encrypted password is:
  71. $5$<\.\.\.salt\.\.\.>$<\.\.\.sha256(salt+password)\.\.\.>. Salt is 16 characters,
  72. the sha256 output is 64 characters. Character 5 is the algorithm id (sha256).
  73. Only sha256 is supported as the hash function.
  74. .TP
  75. .B
  76. \fB\-k\fP, \fB\-\-key\fP
  77. Generate key for a long\-term credentials mechanism user.
  78. .TP
  79. .B
  80. \fB\-a\fP, \fB\-\-add\fP
  81. Add or update a long\-term user.
  82. .TP
  83. .B
  84. \fB\-A\fP, \fB\-\-add\-admin\fP
  85. Add or update an admin user.
  86. .TP
  87. .B
  88. \fB\-d\fP, \fB\-\-delete\fP
  89. Delete a long\-term user.
  90. .TP
  91. .B
  92. \fB\-D\fP, \fB\-\-delete\-admin\fP
  93. Delete an admin user.
  94. .TP
  95. .B
  96. \fB\-l\fP, \fB\-\-list\fP
  97. List long\-term users in the database.
  98. .TP
  99. .B
  100. \fB\-L\fP, \fB\-\-list\-admin\fP
  101. List admin users in the database.
  102. .PP
  103. \fB\-s\fP, \fB\-\-set\-secret\fP=<value> Add shared secret for TURN REST API
  104. .TP
  105. .B
  106. \fB\-S\fP, \fB\-\-show\-secret\fP
  107. Show stored shared secrets for TURN REST API
  108. .PP
  109. \fB\-X\fP, \fB\-\-delete\-secret\fP=<value> Delete a shared secret.
  110. .RS
  111. .TP
  112. .B
  113. \fB\-\-delete\-all_secrets\fP
  114. Delete all shared secrets for REST API.
  115. .RE
  116. .TP
  117. .B
  118. \fB\-O\fP, \fB\-\-add\-origin\fP
  119. Add origin\-to\-realm relation.
  120. .TP
  121. .B
  122. \fB\-R\fP, \fB\-\-del\-origin\fP
  123. Delete origin\-to\-realm relation.
  124. .TP
  125. .B
  126. \fB\-I\fP, \fB\-\-list\-origins\fP
  127. List origin\-to\-realm relations.
  128. .TP
  129. .B
  130. \fB\-g\fP, \fB\-\-set\-realm\-option\fP
  131. Set realm params: max\-bps, total\-quota, user\-quota.
  132. .TP
  133. .B
  134. \fB\-G\fP, \fB\-\-list\-realm\fP\-\fIoptions\fP
  135. List realm params.
  136. .TP
  137. .B
  138. \fB\-E\fP, \fB\-\-generate\-encrypted\-password\-aes\fP
  139. Generate and print to the standard output
  140. an encrypted form of password with AES\-128
  141. .PP
  142. Options with required values:
  143. .TP
  144. .B
  145. \fB\-b\fP, \fB\-\-db\fP, \fB\-\-userdb\fP
  146. SQLite user database file name (default \- /var/db/turndb or
  147. /usr/local/var/db/turndb or /var/lib/turn/turndb).
  148. See the same option in the \fIturnserver\fP section.
  149. .TP
  150. .B
  151. \fB\-e\fP, \fB\-\-psql\-userdb\fP
  152. PostgreSQL user database connection string.
  153. See the \fB\-\-psql\-userdb\fP option in the \fIturnserver\fP section.
  154. .TP
  155. .B
  156. \fB\-M\fP, \fB\-\-mysql\-userdb\fP
  157. MySQL user database connection string.
  158. See the \fB\-\-mysql\-userdb\fP option in the \fIturnserver\fP section.
  159. .TP
  160. .B
  161. \fB\-J\fP, \fB\-\-mongo\-userdb\fP
  162. MongoDB user database connection string.
  163. See the \fB\-\-mysql\-mongo\fP option in the \fIturnserver\fP section.
  164. .TP
  165. .B
  166. \fB\-N\fP, \fB\-\-redis\-userdb\fP
  167. Redis user database connection string.
  168. See the \fB\-\-redis\-userdb\fP option in the \fIturnserver\fP section.
  169. .TP
  170. .B
  171. \fB\-u\fP, \fB\-\-user\fP
  172. User name.
  173. .TP
  174. .B
  175. \fB\-r\fP, \fB\-\-realm\fP
  176. Realm.
  177. .TP
  178. .B
  179. \fB\-p\fP, \fB\-\-password\fP
  180. Password.
  181. .TP
  182. .B
  183. \fB\-x\fP, \fB\-\-key\-path\fP
  184. Generates a 128 bit key into the given path.
  185. .TP
  186. .B
  187. \fB\-f\fP, \fB\-\-file\-key\-path\fP
  188. Contains a 128 bit key in the given path.
  189. .TP
  190. .B
  191. \fB\-v\fP, \fB\-\-verify\fP
  192. Verify a given base64 encrypted type password.
  193. .TP
  194. .B
  195. \fB\-o\fP, \fB\-\-origin\fP
  196. Origin
  197. .TP
  198. .B
  199. \fB\-\-max\-bps\fP
  200. Set value of realm's max\-bps parameter.
  201. .TP
  202. .B
  203. \fB\-\-total\-quota\fP
  204. Set value of realm's total\-quota parameter.
  205. .TP
  206. .B
  207. \fB\-\-user\-quota\fP
  208. Set value of realm's user\-quota parameter.
  209. .TP
  210. .B
  211. \fB\-h\fP, \fB\-\-help\fP
  212. Help.
  213. .PP
  214. Command examples:
  215. .PP
  216. Generate an encrypted form of a password:
  217. .PP
  218. $ \fIturnadmin\fP \fB\-P\fP \fB\-p\fP <password>
  219. .PP
  220. Generate a key:
  221. .PP
  222. $ \fIturnadmin\fP \fB\-k\fP \fB\-u\fP <username> \fB\-r\fP <realm> \fB\-p\fP <password>
  223. .PP
  224. Add/update a user in the in the database:
  225. .PP
  226. $ \fIturnadmin\fP \fB\-a\fP [\fB\-b\fP <userdb\-file> | \fB\-e\fP <db\-connection\-string> | \fB\-M\fP <db\-connection\-string> | \fB\-N\fP <db\-connection\-string> ] \fB\-u\fP <username> \fB\-r\fP <realm> \fB\-p\fP <password>
  227. .PP
  228. Delete a user from the database:
  229. .PP
  230. $ \fIturnadmin\fP \fB\-d\fP [\fB\-b\fP <userdb\-file> | \fB\-e\fP <db\-connection\-string> | \fB\-M\fP <db\-connection\-string> | \fB\-N\fP <db\-connection\-string> ] \fB\-u\fP <username> \fB\-r\fP <realm>
  231. .PP
  232. List all long\-term users in MySQL database:
  233. .PP
  234. $ \fIturnadmin\fP \fB\-l\fP \fB\-\-mysql\-userdb\fP="<db\-connection\-string>" \fB\-r\fP <realm>
  235. .PP
  236. List all admin users in Redis database:
  237. .PP
  238. $ \fIturnadmin\fP \fB\-L\fP \fB\-\-redis\-userdb\fP="<db\-connection\-string>"
  239. .PP
  240. Set secret in MySQL database:
  241. .PP
  242. $ \fIturnadmin\fP \fB\-s\fP <secret> \fB\-\-mysql\-userdb\fP="<db\-connection\-string>" \fB\-r\fP <realm>
  243. .PP
  244. Show secret stored in PostgreSQL database:
  245. .PP
  246. $ \fIturnadmin\fP \fB\-S\fP \fB\-\-psql\-userdb\fP="<db\-connection\-string>" \fB\-r\fP <realm>
  247. .PP
  248. Set origin\-to\-realm relation in MySQL database:
  249. .PP
  250. $ \fIturnadmin\fP \fB\-\-mysql\-userdb\fP="<db\-connection\-string>" \fB\-r\fP <realm> \fB\-o\fP <origin>
  251. .PP
  252. Delete origin\-to\-realm relation from Redis DB:
  253. .PP
  254. $ \fIturnadmin\fP \fB\-\-redis\-userdb\fP="<db\-connection\-string>" \fB\-o\fP <origin>
  255. .PP
  256. List all origin\-to\-realm relations in Redis DB:
  257. .PP
  258. $ \fIturnadmin\fP \fB\-\-redis\-userdb\fP="<db\-connection\-string>" \fB\-I\fP
  259. .PP
  260. List the origin\-to\-realm relations in PostgreSQL DB for a single realm:
  261. .PP
  262. $ \fIturnadmin\fP \fB\-\-psql\-userdb\fP="<db\-connection\-string>" \fB\-I\fP \fB\-r\fP <realm>
  263. .PP
  264. Create new key file for mysql password encryption:
  265. .PP
  266. $ \fIturnadmin\fP \fB\-E\fP \fB\-\-key\-path\fP <key\-file>
  267. .PP
  268. Create encrypted mysql password:
  269. .PP
  270. $ \fIturnadmin\fP \fB\-E\fP \fB\-\-file\-key\-path\fP <key\-file> \fB\-p\fP <secret>
  271. .PP
  272. Verify/decrypt encrypted password:
  273. .PP
  274. $ \fIturnadmin\fP \fB\-\-file\-key\-path\fP <key\-file> \fB\-v\fP <encrypted>
  275. .RE
  276. .PP
  277. .RS
  278. Help:
  279. .PP
  280. $ \fIturnadmin\fP \fB\-h\fP
  281. .PP
  282. =======================================
  283. .SS DOCS
  284. After installation, run the \fIcommand\fP:
  285. .PP
  286. $ man \fIturnadmin\fP
  287. .PP
  288. or in the project root directory:
  289. .PP
  290. $ man \fB\-M\fP man \fIturnadmin\fP
  291. .PP
  292. to see the man page.
  293. .PP
  294. =====================================
  295. .SS FILES
  296. /etc/turnserver.conf
  297. .PP
  298. /var/db/turndb
  299. .PP
  300. /usr/local/var/db/turndb
  301. .PP
  302. /var/lib/turn/turndb
  303. .PP
  304. /usr/local/etc/turnserver.conf
  305. .PP
  306. =====================================
  307. .SS DIRECTORIES
  308. /usr/local/share/\fIturnserver\fP
  309. .PP
  310. /usr/local/share/doc/\fIturnserver\fP
  311. .PP
  312. /usr/local/share/examples/\fIturnserver\fP
  313. .PP
  314. ======================================
  315. .SS SEE ALSO
  316. \fIturnserver\fP, \fIturnutils\fP
  317. .RE
  318. .PP
  319. ======================================
  320. .SS WEB RESOURCES
  321. project page:
  322. .PP
  323. https://github.com/coturn/coturn/
  324. .PP
  325. Wiki page:
  326. .PP
  327. https://github.com/coturn/coturn/wiki
  328. .PP
  329. forum:
  330. .PP
  331. https://groups.google.com/forum/?fromgroups=#!forum/turn\-server\-project\-rfc5766\-turn\-server/
  332. .RE
  333. .PP
  334. ======================================
  335. .SS AUTHORS
  336. Oleg Moskalenko <[email protected]>
  337. .PP
  338. Gabor Kovesdan http://kovesdan.org/
  339. .PP
  340. Daniel Pocock http://danielpocock.com/
  341. .PP
  342. John Selbie ([email protected])
  343. .PP
  344. Lee Sylvester <[email protected]>
  345. .PP
  346. Erik Johnston <[email protected]>
  347. .PP
  348. Roman Lisagor <[email protected]>
  349. .PP
  350. Vladimir Tsanev <[email protected]>
  351. .PP
  352. Po\-sheng Lin <[email protected]>
  353. .PP
  354. Peter Dunkley <[email protected]>
  355. .PP
  356. Mutsutoshi Yoshimoto <[email protected]>
  357. .PP
  358. Federico Pinna <[email protected]>
  359. .PP
  360. Bradley T. Hughes <[email protected]>
  361. .PP
  362. Mihály Mészáros <[email protected]>
  363. .SS ACTIVE MAINTAINERS
  364. Mihály Mészáros <[email protected]>