Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 6655ea5

Browse files
authored
Add script for getting info about recently registered users (#10290)
1 parent c65067d commit 6655ea5

17 files changed

+309
-153
lines changed

changelog.d/10290.feature

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add script to print information about recently registered users.

debian/changelog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
matrix-synapse-py3 (1.37.1ubuntu1) UNRELEASED; urgency=medium
2+
3+
* Add synapse_review_recent_signups script
4+
5+
-- Erik Johnston <[email protected]> Thu, 01 Jul 2021 15:55:03 +0100
6+
17
matrix-synapse-py3 (1.37.1) stable; urgency=medium
28

39
* New synapse release 1.37.1.

debian/hash_password.1

Lines changed: 5 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,90 +1,58 @@
1-
.\" generated with Ronn/v0.7.3
2-
.\" http://github.com/rtomayko/ronn/tree/0.7.3
3-
.
4-
.TH "HASH_PASSWORD" "1" "February 2017" "" ""
5-
.
1+
.\" generated with Ronn-NG/v0.8.0
2+
.\" http://github.com/apjanke/ronn-ng/tree/0.8.0
3+
.TH "HASH_PASSWORD" "1" "July 2021" "" ""
64
.SH "NAME"
75
\fBhash_password\fR \- Calculate the hash of a new password, so that passwords can be reset
8-
.
96
.SH "SYNOPSIS"
107
\fBhash_password\fR [\fB\-p\fR|\fB\-\-password\fR [password]] [\fB\-c\fR|\fB\-\-config\fR \fIfile\fR]
11-
.
128
.SH "DESCRIPTION"
139
\fBhash_password\fR calculates the hash of a supplied password using bcrypt\.
14-
.
1510
.P
1611
\fBhash_password\fR takes a password as an parameter either on the command line or the \fBSTDIN\fR if not supplied\.
17-
.
1812
.P
1913
It accepts an YAML file which can be used to specify parameters like the number of rounds for bcrypt and password_config section having the pepper value used for the hashing\. By default \fBbcrypt_rounds\fR is set to \fB10\fR\.
20-
.
2114
.P
2215
The hashed password is written on the \fBSTDOUT\fR\.
23-
.
2416
.SH "FILES"
2517
A sample YAML file accepted by \fBhash_password\fR is described below:
26-
.
2718
.P
2819
bcrypt_rounds: 17 password_config: pepper: "random hashing pepper"
29-
.
3020
.SH "OPTIONS"
31-
.
3221
.TP
3322
\fB\-p\fR, \fB\-\-password\fR
3423
Read the password form the command line if [password] is supplied\. If not, prompt the user and read the password form the \fBSTDIN\fR\. It is not recommended to type the password on the command line directly\. Use the STDIN instead\.
35-
.
3624
.TP
3725
\fB\-c\fR, \fB\-\-config\fR
3826
Read the supplied YAML \fIfile\fR containing the options \fBbcrypt_rounds\fR and the \fBpassword_config\fR section containing the \fBpepper\fR value\.
39-
.
4027
.SH "EXAMPLES"
4128
Hash from the command line:
42-
.
4329
.IP "" 4
44-
.
4530
.nf
46-
4731
$ hash_password \-p "p@ssw0rd"
4832
$2b$12$VJNqWQYfsWTEwcELfoSi4Oa8eA17movHqqi8\.X8fWFpum7SxZ9MFe
49-
.
5033
.fi
51-
.
5234
.IP "" 0
53-
.
5435
.P
5536
Hash from the STDIN:
56-
.
5737
.IP "" 4
58-
.
5938
.nf
60-
6139
$ hash_password
6240
Password:
6341
Confirm password:
6442
$2b$12$AszlvfmJl2esnyhmn8m/kuR2tdXgROWtWxnX\.rcuAbM8ErLoUhybG
65-
.
6643
.fi
67-
.
6844
.IP "" 0
69-
.
7045
.P
7146
Using a config file:
72-
.
7347
.IP "" 4
74-
.
7548
.nf
76-
7749
$ hash_password \-c config\.yml
7850
Password:
7951
Confirm password:
8052
$2b$12$CwI\.wBNr\.w3kmiUlV3T5s\.GT2wH7uebDCovDrCOh18dFedlANK99O
81-
.
8253
.fi
83-
.
8454
.IP "" 0
85-
.
8655
.SH "COPYRIGHT"
87-
This man page was written by Rahul De <\fIrahulde@swecha\.net\fR> for Debian GNU/Linux distribution\.
88-
.
56+
This man page was written by Rahul De <\fI\%mailto:rahulde@swecha\.net\fR> for Debian GNU/Linux distribution\.
8957
.SH "SEE ALSO"
90-
synctl(1), synapse_port_db(1), register_new_matrix_user(1)
58+
synctl(1), synapse_port_db(1), register_new_matrix_user(1), synapse_review_recent_signups(1)

debian/hash_password.ronn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,4 @@ for Debian GNU/Linux distribution.
6666

6767
## SEE ALSO
6868

69-
synctl(1), synapse_port_db(1), register_new_matrix_user(1)
69+
synctl(1), synapse_port_db(1), register_new_matrix_user(1), synapse_review_recent_signups(1)

debian/manpages

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
debian/hash_password.1
22
debian/register_new_matrix_user.1
33
debian/synapse_port_db.1
4+
debian/synapse_review_recent_signups.1
45
debian/synctl.1

debian/matrix-synapse-py3.links

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
opt/venvs/matrix-synapse/bin/hash_password usr/bin/hash_password
22
opt/venvs/matrix-synapse/bin/register_new_matrix_user usr/bin/register_new_matrix_user
33
opt/venvs/matrix-synapse/bin/synapse_port_db usr/bin/synapse_port_db
4+
opt/venvs/matrix-synapse/bin/synapse_review_recent_signups usr/bin/synapse_review_recent_signups
45
opt/venvs/matrix-synapse/bin/synctl usr/bin/synctl

debian/register_new_matrix_user.1

Lines changed: 6 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,47 @@
1-
.\" generated with Ronn/v0.7.3
2-
.\" http://github.com/rtomayko/ronn/tree/0.7.3
3-
.
4-
.TH "REGISTER_NEW_MATRIX_USER" "1" "February 2017" "" ""
5-
.
1+
.\" generated with Ronn-NG/v0.8.0
2+
.\" http://github.com/apjanke/ronn-ng/tree/0.8.0
3+
.TH "REGISTER_NEW_MATRIX_USER" "1" "July 2021" "" ""
64
.SH "NAME"
75
\fBregister_new_matrix_user\fR \- Used to register new users with a given home server when registration has been disabled
8-
.
96
.SH "SYNOPSIS"
10-
\fBregister_new_matrix_user\fR options\.\.\.
11-
.
7+
\fBregister_new_matrix_user\fR options\|\.\|\.\|\.
128
.SH "DESCRIPTION"
139
\fBregister_new_matrix_user\fR registers new users with a given home server when registration has been disabled\. For this to work, the home server must be configured with the \'registration_shared_secret\' option set\.
14-
.
1510
.P
1611
This accepts the user credentials like the username, password, is user an admin or not and registers the user onto the homeserver database\. Also, a YAML file containing the shared secret can be provided\. If not, the shared secret can be provided via the command line\.
17-
.
1812
.P
1913
By default it assumes the home server URL to be \fBhttps://localhost:8448\fR\. This can be changed via the \fBserver_url\fR command line option\.
20-
.
2114
.SH "FILES"
2215
A sample YAML file accepted by \fBregister_new_matrix_user\fR is described below:
23-
.
2416
.IP "" 4
25-
.
2617
.nf
27-
2818
registration_shared_secret: "s3cr3t"
29-
.
3019
.fi
31-
.
3220
.IP "" 0
33-
.
3421
.SH "OPTIONS"
35-
.
3622
.TP
3723
\fB\-u\fR, \fB\-\-user\fR
3824
Local part of the new user\. Will prompt if omitted\.
39-
.
4025
.TP
4126
\fB\-p\fR, \fB\-\-password\fR
4227
New password for user\. Will prompt if omitted\. Supplying the password on the command line is not recommended\. Use the STDIN instead\.
43-
.
4428
.TP
4529
\fB\-a\fR, \fB\-\-admin\fR
4630
Register new user as an admin\. Will prompt if omitted\.
47-
.
4831
.TP
4932
\fB\-c\fR, \fB\-\-config\fR
5033
Path to server config file containing the shared secret\.
51-
.
5234
.TP
5335
\fB\-k\fR, \fB\-\-shared\-secret\fR
5436
Shared secret as defined in server config file\. This is an optional parameter as it can be also supplied via the YAML file\.
55-
.
5637
.TP
5738
\fBserver_url\fR
5839
URL of the home server\. Defaults to \'https://localhost:8448\'\.
59-
.
6040
.SH "EXAMPLES"
61-
.
6241
.nf
63-
6442
$ register_new_matrix_user \-u user1 \-p p@ssword \-a \-c config\.yaml
65-
.
6643
.fi
67-
.
6844
.SH "COPYRIGHT"
69-
This man page was written by Rahul De <\fIrahulde@swecha\.net\fR> for Debian GNU/Linux distribution\.
70-
.
45+
This man page was written by Rahul De <\fI\%mailto:rahulde@swecha\.net\fR> for Debian GNU/Linux distribution\.
7146
.SH "SEE ALSO"
72-
synctl(1), synapse_port_db(1), hash_password(1)
47+
synctl(1), synapse_port_db(1), hash_password(1), synapse_review_recent_signups(1)

debian/register_new_matrix_user.ronn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,4 @@ for Debian GNU/Linux distribution.
5858

5959
## SEE ALSO
6060

61-
synctl(1), synapse_port_db(1), hash_password(1)
61+
synctl(1), synapse_port_db(1), hash_password(1), synapse_review_recent_signups(1)

debian/synapse_port_db.1

Lines changed: 14 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,83 +1,56 @@
1-
.\" generated with Ronn/v0.7.3
2-
.\" http://github.com/rtomayko/ronn/tree/0.7.3
3-
.
4-
.TH "SYNAPSE_PORT_DB" "1" "February 2017" "" ""
5-
.
1+
.\" generated with Ronn-NG/v0.8.0
2+
.\" http://github.com/apjanke/ronn-ng/tree/0.8.0
3+
.TH "SYNAPSE_PORT_DB" "1" "July 2021" "" ""
64
.SH "NAME"
75
\fBsynapse_port_db\fR \- A script to port an existing synapse SQLite database to a new PostgreSQL database\.
8-
.
96
.SH "SYNOPSIS"
107
\fBsynapse_port_db\fR [\-v] \-\-sqlite\-database=\fIdbfile\fR \-\-postgres\-config=\fIyamlconfig\fR [\-\-curses] [\-\-batch\-size=\fIbatch\-size\fR]
11-
.
128
.SH "DESCRIPTION"
139
\fBsynapse_port_db\fR ports an existing synapse SQLite database to a new PostgreSQL database\.
14-
.
1510
.P
1611
SQLite database is specified with \fB\-\-sqlite\-database\fR option and PostgreSQL configuration required to connect to PostgreSQL database is provided using \fB\-\-postgres\-config\fR configuration\. The configuration is specified in YAML format\.
17-
.
1812
.SH "OPTIONS"
19-
.
2013
.TP
2114
\fB\-v\fR
2215
Print log messages in \fBdebug\fR level instead of \fBinfo\fR level\.
23-
.
2416
.TP
2517
\fB\-\-sqlite\-database\fR
2618
The snapshot of the SQLite database file\. This must not be currently used by a running synapse server\.
27-
.
2819
.TP
2920
\fB\-\-postgres\-config\fR
3021
The database config file for the PostgreSQL database\.
31-
.
3222
.TP
3323
\fB\-\-curses\fR
3424
Display a curses based progress UI\.
35-
.
3625
.SH "CONFIG FILE"
3726
The postgres configuration file must be a valid YAML file with the following options\.
38-
.
39-
.IP "\(bu" 4
27+
.IP "\[ci]" 4
4028
\fBdatabase\fR: Database configuration section\. This section header can be ignored and the options below may be specified as top level keys\.
41-
.
42-
.IP "\(bu" 4
29+
.IP "\[ci]" 4
4330
\fBname\fR: Connector to use when connecting to the database\. This value must be \fBpsycopg2\fR\.
44-
.
45-
.IP "\(bu" 4
31+
.IP "\[ci]" 4
4632
\fBargs\fR: DB API 2\.0 compatible arguments to send to the \fBpsycopg2\fR module\.
47-
.
48-
.IP "\(bu" 4
33+
.IP "\[ci]" 4
4934
\fBdbname\fR \- the database name
50-
.
51-
.IP "\(bu" 4
35+
.IP "\[ci]" 4
5236
\fBuser\fR \- user name used to authenticate
53-
.
54-
.IP "\(bu" 4
37+
.IP "\[ci]" 4
5538
\fBpassword\fR \- password used to authenticate
56-
.
57-
.IP "\(bu" 4
39+
.IP "\[ci]" 4
5840
\fBhost\fR \- database host address (defaults to UNIX socket if not provided)
59-
.
60-
.IP "\(bu" 4
41+
.IP "\[ci]" 4
6142
\fBport\fR \- connection port number (defaults to 5432 if not provided)
62-
.
6343
.IP "" 0
6444

65-
.
66-
.IP "\(bu" 4
45+
.IP "\[ci]" 4
6746
\fBsynchronous_commit\fR: Optional\. Default is True\. If the value is \fBFalse\fR, enable asynchronous commit and don\'t wait for the server to call fsync before ending the transaction\. See: https://www\.postgresql\.org/docs/current/static/wal\-async\-commit\.html
68-
.
6947
.IP "" 0
7048

71-
.
7249
.IP "" 0
73-
.
7450
.P
7551
Following example illustrates the configuration file format\.
76-
.
7752
.IP "" 4
78-
.
7953
.nf
80-
8154
database:
8255
name: psycopg2
8356
args:
@@ -86,13 +59,9 @@ database:
8659
password: ORohmi9Eet=ohphi
8760
host: localhost
8861
synchronous_commit: false
89-
.
9062
.fi
91-
.
9263
.IP "" 0
93-
.
9464
.SH "COPYRIGHT"
95-
This man page was written by Sunil Mohan Adapa <\fIsunil@medhas\.org\fR> for Debian GNU/Linux distribution\.
96-
.
65+
This man page was written by Sunil Mohan Adapa <\fI\%mailto:sunil@medhas\.org\fR> for Debian GNU/Linux distribution\.
9766
.SH "SEE ALSO"
98-
synctl(1), hash_password(1), register_new_matrix_user(1)
67+
synctl(1), hash_password(1), register_new_matrix_user(1), synapse_review_recent_signups(1)

debian/synapse_port_db.ronn

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ following options.
4747
* `args`:
4848
DB API 2.0 compatible arguments to send to the `psycopg2` module.
4949

50-
* `dbname` - the database name
50+
* `dbname` - the database name
5151

5252
* `user` - user name used to authenticate
5353

@@ -58,7 +58,7 @@ following options.
5858

5959
* `port` - connection port number (defaults to 5432 if not
6060
provided)
61-
61+
6262

6363
* `synchronous_commit`:
6464
Optional. Default is True. If the value is `False`, enable
@@ -76,12 +76,12 @@ Following example illustrates the configuration file format.
7676
password: ORohmi9Eet=ohphi
7777
host: localhost
7878
synchronous_commit: false
79-
79+
8080
## COPYRIGHT
8181

8282
This man page was written by Sunil Mohan Adapa <<[email protected]>> for
8383
Debian GNU/Linux distribution.
8484

8585
## SEE ALSO
8686

87-
synctl(1), hash_password(1), register_new_matrix_user(1)
87+
synctl(1), hash_password(1), register_new_matrix_user(1), synapse_review_recent_signups(1)

0 commit comments

Comments
 (0)