Debian Codegraph @

README.turnadmin

raw
1 GENERAL INFORMATION
2
3 turnadmin is a TURN administration tool. This tool can be used to manage
4 the user accounts (add/remove users, generate
5 TURN keys for the users). For security reasons, we do not recommend
6 storing passwords openly. The better option is to use pre-processed "keys"
7 which are then used for authentication. These keys are generated by turnadmin.
8 Turnadmin is a link to turnserver binary, but turnadmin performs different
9 functions.
10
11 Options note: turnadmin has long and short option names, for most options.
12 Some options have only long form, some options have only short form. Their syntax
13 somewhat different, if an argument is required:
14
15 The short form must be used as this (for example):
16
17 $ turnadmin -u <username> ...
18
19 The long form equivalent must use the "=" character:
20
21 $ turnadmin --user=<username> ...
22
23 If this is a flag option (no argument required) then their usage are the same, for example:
24
25 $ turnadmin -k ...
26
27 is equivalent to:
28
29 $ turnadmin --key ...
30
31 You have always the use the -r <realm> option with commands for long term credentials -
32 because data for multiple realms can be stored in the same database.
33
34 =====================================
35
36 NAME
37
38 turnadmin - a TURN relay administration tool.
39
40 SYNOPSIS
41
42 $ turnadmin [command] [options]
43
44 $ turnadmin [ -h | --help]
45
46 DESCRIPTION
47
48 Commands:
49
50 -P, --generate-encrypted-password Generate and print to the standard
51 output an encrypted form of a password (for web admin user or CLI).
52 The value then can be used as a safe key for the password
53 storage on disk or in the database. Every invocation for the same password
54 produces a different result. The format of the encrypted password is:
55 $5$<...salt...>$<...sha256(salt+password)...>. Salt is 16 characters,
56 the sha256 output is 64 characters. Character 5 is the algorithm id (sha256).
57 Only sha256 is supported as the hash function.
58
59 -k, --key Generate key for a long-term credentials mechanism user.
60
61 -a, --add Add or update a long-term user.
62
63 -A, --add-admin Add or update an admin user.
64
65 -d, --delete Delete a long-term user.
66
67 -D, --delete-admin Delete an admin user.
68
69 -l, --list List long-term users in the database.
70
71 -L, --list-admin List admin users in the database.
72
73 -s, --set-secret=<value> Add shared secret for TURN REST API
74
75 -S, --show-secret Show stored shared secrets for TURN REST API
76
77 -X, --delete-secret=<value> Delete a shared secret.
78 --delete-all_secrets Delete all shared secrets for REST API.
79
80 -O, --add-origin Add origin-to-realm relation.
81
82 -R, --del-origin Delete origin-to-realm relation.
83
84 -I, --list-origins List origin-to-realm relations.
85
86 -g, --set-realm-option Set realm params: max-bps, total-quota, user-quota.
87
88 -G, --list-realm-options List realm params.
89 -E, --generate-encrypted-password-aes Generate and print to the standard output
90 an encrypted form of password with AES-128
91
92 Options with required values:
93
94 -b, --db, --userdb SQLite user database file name (default - /var/db/turndb or
95 /usr/local/var/db/turndb or /var/lib/turn/turndb).
96 See the same option in the turnserver section.
97 -e, --psql-userdb PostgreSQL user database connection string.
98 See the --psql-userdb option in the turnserver section.
99 -M, --mysql-userdb MySQL user database connection string.
100 See the --mysql-userdb option in the turnserver section.
101 -J, --mongo-userdb MongoDB user database connection string.
102 See the --mysql-mongo option in the turnserver section.
103 -N, --redis-userdb Redis user database connection string.
104 See the --redis-userdb option in the turnserver section.
105 -u, --user User name.
106 -r, --realm Realm.
107 -p, --password Password.
108 -x, --key-path Generates a 128 bit key into the given path.
109 -f, --file-key-path Contains a 128 bit key in the given path.
110 -v, --verify Verify a given base64 encrypted type password.
111 -o, --origin Origin
112 --max-bps Set value of realm's max-bps parameter.
113 --total-quota Set value of realm's total-quota parameter.
114 --user-quota Set value of realm's user-quota parameter.
115 -h, --help Help.
116
117 Command examples:
118
119 Generate an encrypted form of a password:
120
121 $ turnadmin -P -p <password>
122
123 Generate a key:
124
125 $ turnadmin -k -u <username> -r <realm> -p <password>
126
127 Add/update a user in the in the database:
128
129 $ turnadmin -a [-b <userdb-file> | -e <db-connection-string> | -M <db-connection-string> | -N <db-connection-string> ] -u <username> -r <realm> -p <password>
130
131 Delete a user from the database:
132
133 $ turnadmin -d [-b <userdb-file> | -e <db-connection-string> | -M <db-connection-string> | -N <db-connection-string> ] -u <username> -r <realm>
134
135 List all long-term users in MySQL database:
136
137 $ turnadmin -l --mysql-userdb="<db-connection-string>" -r <realm>
138
139 List all admin users in Redis database:
140
141 $ turnadmin -L --redis-userdb="<db-connection-string>"
142
143 Set secret in MySQL database:
144
145 $ turnadmin -s <secret> --mysql-userdb="<db-connection-string>" -r <realm>
146
147 Show secret stored in PostgreSQL database:
148
149 $ turnadmin -S --psql-userdb="<db-connection-string>" -r <realm>
150
151 Set origin-to-realm relation in MySQL database:
152
153 $ turnadmin --mysql-userdb="<db-connection-string>" -r <realm> -o <origin>
154
155 Delete origin-to-realm relation from Redis DB:
156
157 $ turnadmin --redis-userdb="<db-connection-string>" -o <origin>
158
159 List all origin-to-realm relations in Redis DB:
160
161 $ turnadmin --redis-userdb="<db-connection-string>" -I
162
163 List the origin-to-realm relations in PostgreSQL DB for a single realm:
164
165 $ turnadmin --psql-userdb="<db-connection-string>" -I -r <realm>
166
167 Create new key file for mysql password encryption:
168
169 $ turnadmin -E --key-path <key-file>
170
171 Create encrypted mysql password:
172
173 $ turnadmin -E --file-key-path <key-file> -p <secret>
174
175 Verify/decrypt encrypted password:
176
177 $ turnadmin --file-key-path <key-file> -v <encrypted>
178
179
180 Help:
181
182 $ turnadmin -h
183
184 =======================================
185
186 DOCS
187
188 After installation, run the command:
189
190 $ man turnadmin
191
192 or in the project root directory:
193
194 $ man -M man turnadmin
195
196 to see the man page.
197
198 =====================================
199
200 FILES
201
202 /etc/turnserver.conf
203
204 /var/db/turndb
205
206 /usr/local/var/db/turndb
207
208 /var/lib/turn/turndb
209
210 /usr/local/etc/turnserver.conf
211
212 =====================================
213
214 DIRECTORIES
215
216 /usr/local/share/turnserver
217
218 /usr/local/share/doc/turnserver
219
220 /usr/local/share/examples/turnserver
221
222 ======================================
223
224 SEE ALSO
225
226 turnserver, turnutils
227
228 ======================================
229
230 WEB RESOURCES
231
232 project page:
233
234 https://github.com/coturn/coturn/
235
236 Wiki page:
237
238 https://github.com/coturn/coturn/wiki
239
240 forum:
241
242 https://groups.google.com/forum/?fromgroups=#!forum/turn-server-project-rfc5766-turn-server/
243
244 ======================================
245
246 AUTHORS
247
248 See the AUTHORS.md file in the coturn source distribution.