README.turnadmin 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  1. GENERAL INFORMATION
  2. turnadmin is a TURN administration tool. This tool can be used to manage
  3. the user accounts (add/remove users, generate
  4. TURN keys for the users). For security reasons, we do not recommend
  5. storing passwords openly. The better option is to use pre-processed "keys"
  6. which are then used for authentication. These keys are generated by turnadmin.
  7. Turnadmin is a link to turnserver binary, but turnadmin performs different
  8. functions.
  9. Options note: turnadmin has long and short option names, for most options.
  10. Some options have only long form, some options have only short form. Their syntax
  11. somewhat different, if an argument is required:
  12. The short form must be used as this (for example):
  13. $ turnadmin -u <username> ...
  14. The long form equivalent must use the "=" character:
  15. $ turnadmin --user=<username> ...
  16. If this is a flag option (no argument required) then their usage are the same, for example:
  17. $ turnadmin -k ...
  18. is equivalent to:
  19. $ turnadmin --key ...
  20. You have always the use the -r <realm> option with commands for long term credentials -
  21. because data for multiple realms can be stored in the same database.
  22. =====================================
  23. NAME
  24. turnadmin - a TURN relay administration tool.
  25. SYNOPSIS
  26. $ turnadmin [command] [options]
  27. $ turnadmin [ -h | --help]
  28. DESCRIPTION
  29. Commands:
  30. -k, --key Generate key for a long-term credentials mechanism user.
  31. -a, --add Add or update a long-term user.
  32. -A, --add-st Add or update a short-term credentials mechanism user.
  33. -d, --delete Delete a long-term user.
  34. -D, --delete-st Delete a short-term user.
  35. -l, --list List long-term users in the database.
  36. -L, --list-st List short-term users in the database.
  37. -s, --set-secret=<value> Add shared secret for TURN RESP API
  38. -S, --show-secret Show stored shared secrets for TURN REST API
  39. -X, --delete-secret=<value> Delete a shared secret.
  40. --delete-all_secrets Delete all shared secrets for REST API.
  41. -O, --add-origin Add origin-to-realm relation.
  42. -R, --del-origin Delete origin-to-realm relation.
  43. -I, --list-origins List origin-to-realm relations.
  44. -g, --set-realm-option Set realm params: max-bps, total-quota, user-quota.
  45. -G, --list-realm-options List realm params.
  46. Options with required values:
  47. -b, --db, --userdb SQLite user database file name (default - /var/db/turndb or
  48. /usr/local/var/db/turndb).
  49. See the same option in the turnserver section.
  50. -e, --psql-userdb PostgreSQL user database connection string.
  51. See the --psql-userdb option in the turnserver section.
  52. -M, --mysql-userdb MySQL user database connection string.
  53. See the --mysql-userdb option in the turnserver section.
  54. -J, --mongo-userdb MongoDB user database connection string.
  55. See the --mysql-mongo option in the turnserver section.
  56. -N, --redis-userdb Redis user database connection string.
  57. See the --redis-userdb option in the turnserver section.
  58. -u, --user User name.
  59. -r, --realm Realm, for long-term credentials mechanism only.
  60. -p, --password Password.
  61. -o, --origin Origin
  62. -H, --sha256 Use SHA256 as the keys hash function (a non-standard feature).
  63. By default, MD5 is used for the key storage encryption
  64. (as required by the current STUN/TURNstandards).
  65. --max-bps Set value of realm's max-bps parameter.
  66. --total-quota Set value of realm's total-quota parameter.
  67. --user-quota Set value of realm's user-quota parameter.
  68. -h, --help Help.
  69. Generate a key:
  70. $ turnadmin -k -u <username> -r <realm> -p <password>
  71. Add/update a user in the in the database:
  72. $ turnadmin -a [-b <userdb-file> | -e <db-connection-string> | -M <db-connection-string> | -N <db-connection-string> ] -u <username> -r <realm> -p <password>
  73. Delete a user from the database:
  74. $ turnadmin -d [-b <userdb-file> | -e <db-connection-string> | -M <db-connection-string> | -N <db-connection-string> ] -u <username> -r <realm>
  75. List all long-term users in MySQL database:
  76. $ turnadmin -l --mysql-userdb="<db-connection-string>" -r <realm>
  77. List all short-term users in Redis database:
  78. $ turnadmin -L --redis-userdb="<db-connection-string>"
  79. Set secret in MySQL database:
  80. $ turnadmin -s <secret> --mysql-userdb="<db-connection-string>" -r <realm>
  81. Show secret stored in PostgreSQL database:
  82. $ turnadmin -S --psql-userdb="<db-connection-string>" -r <realm>
  83. Set origin-to-realm relation in MySQL database:
  84. $ turnadmin --mysql-userdb="<db-connection-string>" -r <realm> -o <origin>
  85. Delete origin-to-realm relation from Redis DB:
  86. $ turnadmin --redis-userdb="<db-connection-string>" -o <origin>
  87. List all origin-to-realm relations in Redis DB:
  88. $ turnadmin --redis-userdb="<db-connection-string>" -I
  89. List the origin-to-realm relations in PostgreSQL DB for a single realm:
  90. $ turnadmin --psql-userdb="<db-connection-string>" -I -r <realm>
  91. Help:
  92. $ turnadmin -h
  93. =======================================
  94. DOCS
  95. After installation, run the command:
  96. $ man turnadmin
  97. or in the project root directory:
  98. $ man -M man turnadmin
  99. to see the man page.
  100. =====================================
  101. FILES
  102. /etc/turnserver.conf
  103. /var/db/turndb
  104. /usr/local/var/db/turndb
  105. /usr/local/etc/turnserver.conf
  106. =====================================
  107. DIRECTORIES
  108. /usr/local/share/turnserver
  109. /usr/local/share/doc/turnserver
  110. /usr/local/share/examples/turnserver
  111. ======================================
  112. SEE ALSO
  113. turnserver, turnutils
  114. ======================================
  115. WEB RESOURCES
  116. project page:
  117. http://code.google.com/p/coturn/
  118. Wiki page:
  119. http://code.google.com/p/coturn/wiki/Readme
  120. forum:
  121. https://groups.google.com/forum/?fromgroups=#!forum/turn-server-project-rfc5766-turn-server/
  122. ======================================
  123. AUTHORS
  124. Oleg Moskalenko <[email protected]>
  125. Gabor Kovesdan http://kovesdan.org/
  126. Daniel Pocock http://danielpocock.com/
  127. John Selbie ([email protected])
  128. Lee Sylvester <[email protected]>
  129. Erik Johnston <[email protected]>
  130. Roman Lisagor <[email protected]>
  131. Vladimir Tsanev <[email protected]>
  132. Po-sheng Lin <[email protected]>
  133. Peter Dunkley <[email protected]>
  134. Mutsutoshi Yoshimoto <[email protected]>
  135. Federico Pinna <[email protected]>
  136. Bradley T. Hughes <[email protected]>