Compare commits

...

77 Commits

Author SHA1 Message Date
Girish Ramakrishnan
6ca10fe63d Version 1.41.1 2022-04-20 15:51:50 -07:00
Girish Ramakrishnan
08e65a0769 Update synapse to 1.57.1 2022-04-20 09:04:41 -07:00
Girish Ramakrishnan
bc031e515e Update postinstall 2022-04-19 10:04:27 -05:00
Girish Ramakrishnan
ce74f2b418 Set enable_registration_without_verification to true 2022-04-19 10:03:47 -05:00
Johannes Zellner
292ffd482b Bump version for 1.57.0 2022-04-19 15:27:12 +02:00
Girish Ramakrishnan
8267b04c4f Update test packages 2022-04-05 10:36:18 -07:00
Girish Ramakrishnan
4ab831470b Update Synapse to 1.56.0 2022-04-05 09:10:51 -07:00
Girish Ramakrishnan
203fcc8baf Version 1.40.1-1 2022-03-24 17:34:29 -07:00
Girish Ramakrishnan
dbb03144dd Update Synapse to 1.55.2 2022-03-24 17:08:12 -07:00
Girish Ramakrishnan
3e384b6ea4 Version 1.40.1 2022-03-24 12:16:47 -07:00
Girish Ramakrishnan
2b70590b4f Update Synapse to 1.55.1 2022-03-24 12:05:12 -07:00
Girish Ramakrishnan
f32618bc44 Version 1.40.0 2022-03-22 15:55:57 -07:00
Girish Ramakrishnan
63389b8969 Update test packages 2022-03-22 15:35:17 -07:00
Girish Ramakrishnan
2faf4a83c1 Update Synapse to 1.55.0 2022-03-22 15:30:11 -07:00
Johannes Zellner
0de4fcd2c1 Update test deps 2022-03-08 18:12:43 +01:00
Johannes Zellner
4501f517cd Bump version for 1.54.0 2022-03-08 18:12:23 +01:00
Johannes Zellner
50b81437a3 Update test deps 2022-02-22 14:19:02 +01:00
Johannes Zellner
cb2effd01e Bump version for 1.53.0 2022-02-22 14:18:44 +01:00
Johannes Zellner
8a0741d6a2 Update test deps 2022-02-08 17:05:35 +01:00
Johannes Zellner
8605a2801f Bump version for 1.52.0 2022-02-08 17:05:18 +01:00
Johannes Zellner
39b8fe59e8 Update test deps 2022-01-25 13:45:11 +01:00
Johannes Zellner
ab0335ff1a Bump version for 1.51.0 2022-01-25 13:43:50 +01:00
Johannes Zellner
e6d27ee341 Update test deps 2022-01-24 16:31:23 +01:00
Johannes Zellner
306ee5dadb Bump version for 1.50.2 2022-01-24 16:31:09 +01:00
Johannes Zellner
e6b9d6cafb Jump to 1.50.1 2022-01-18 22:04:38 +01:00
Johannes Zellner
8e02930fbd Update test deps 2022-01-18 13:24:46 +01:00
Johannes Zellner
8c3209768d Bump version for 1.50.0 2022-01-18 13:24:30 +01:00
Girish Ramakrishnan
cdab116284 Version 1.38.1 2021-12-21 11:16:25 -08:00
Girish Ramakrishnan
092b466ff4 Update test packages 2021-12-21 11:08:59 -08:00
Girish Ramakrishnan
6177240cf6 Update synapse to 1.49.2 2021-12-21 11:03:24 -08:00
Girish Ramakrishnan
cf22aa6ae7 Update Synapse to 1.49.1 2021-12-21 09:23:09 -08:00
Johannes Zellner
aa02b23016 Bump version for 1.49.0 2021-12-14 16:38:09 +01:00
Johannes Zellner
2cd92623e2 Bump version for 1.48.0 2021-11-30 16:17:32 +01:00
Johannes Zellner
ee7878d3d2 Update test deps 2021-11-23 14:33:16 +01:00
Johannes Zellner
33dca51dcd Bump version for 1.47.1 2021-11-23 14:33:02 +01:00
Johannes Zellner
122b16805f Update test deps 2021-11-17 16:29:12 +01:00
Johannes Zellner
3a69b0c615 Bump version for 1.47.0 2021-11-17 16:28:56 +01:00
Johannes Zellner
f27425775e Update test deps 2021-11-02 16:07:28 +01:00
Johannes Zellner
47855846f5 Bump version for 1.46.0 2021-11-02 16:07:07 +01:00
Johannes Zellner
96bfd2839c Bump version for 1.45.1 2021-10-21 11:19:50 +02:00
Johannes Zellner
e6f8f7b246 Update test deps 2021-10-19 14:47:32 +02:00
Johannes Zellner
426035f1d5 Bump version for 1.45.0 2021-10-19 14:46:47 +02:00
Girish Ramakrishnan
c2d2f9bd03 Version 1.33.0 2021-10-05 09:35:20 -07:00
Girish Ramakrishnan
4e5fb767f6 Update test packages 2021-10-05 09:29:26 -07:00
Girish Ramakrishnan
feb0208b8d Update synapse to 1.44.0 2021-10-05 09:25:59 -07:00
Johannes Zellner
ec4900372c Bump version for 1.43.0 2021-09-21 16:50:19 +02:00
Johannes Zellner
340a757d88 Update test deps 2021-09-08 11:33:58 +02:00
Johannes Zellner
93ec693780 Bump version for 1.42.0 2021-09-08 11:30:54 +02:00
Girish Ramakrishnan
668112e865 Version 1.30.2 2021-08-31 12:32:30 -07:00
Girish Ramakrishnan
233a26a8db Update synapse to 1.41.1 2021-08-31 11:26:11 -07:00
Girish Ramakrishnan
5703b98d6f Version 1.30.1 2021-08-30 23:05:59 -07:00
Girish Ramakrishnan
ee10da9df5 Fix postinstall message 2021-08-30 22:42:00 -07:00
Johannes Zellner
7123688a92 Ensure we log to stdout/stderr 2021-08-30 15:50:49 +02:00
Girish Ramakrishnan
38cd11c0b7 Version 1.30.0 2021-08-24 09:53:13 -07:00
Girish Ramakrishnan
d06f83a567 Update synapse to 1.41.0 2021-08-24 09:45:09 -07:00
Girish Ramakrishnan
fb83f5a54e Version 1.29.0 2021-08-10 11:23:44 -07:00
Girish Ramakrishnan
ad4d18e706 Update synapse to 1.40.0 2021-08-10 11:10:43 -07:00
Girish Ramakrishnan
80425602a3 Update test packages 2021-08-02 23:08:28 -07:00
Girish Ramakrishnan
de44651747 delete password_providers on update 2021-08-02 23:08:16 -07:00
Johannes Zellner
79c17c17f1 Update test deps 2021-07-29 21:43:40 +02:00
Johannes Zellner
605a809a32 Bump version for 1.39.0 2021-07-29 21:43:02 +02:00
Girish Ramakrishnan
b5963b4276 Version 1.27.1 2021-07-24 00:08:49 -07:00
Girish Ramakrishnan
a6c93ac360 Update synapse to 1.38.1 2021-07-24 00:03:54 -07:00
Girish Ramakrishnan
b5662ec4dc Version 1.27.0 2021-07-24 00:02:44 -07:00
Girish Ramakrishnan
6775418daf delete password_providers section without sso 2021-07-23 23:56:08 -07:00
Johannes Zellner
66231bcae5 Update test deps 2021-07-13 16:43:14 +02:00
Johannes Zellner
acd9e9cbf6 Bump version for 1.38.0 2021-07-13 16:42:50 +02:00
Johannes Zellner
f7a3528db0 Bump version for 1.37.1 2021-07-01 12:12:58 +02:00
Johannes Zellner
affa9850a3 Rework test to follow new patterns 2021-06-29 14:56:14 +02:00
Johannes Zellner
ad9429c622 Update test deps 2021-06-29 14:13:55 +02:00
Johannes Zellner
208b5b689d Bump version for 1.37.0 2021-06-29 14:13:26 +02:00
Girish Ramakrishnan
54428229bb Version 1.26.0 2021-06-15 09:42:40 -07:00
Girish Ramakrishnan
805349b360 Update Synapse to 1.36.0 2021-06-15 09:41:54 -07:00
Johannes Zellner
47dcff5e35 Update test deps 2021-06-04 10:21:08 +02:00
Johannes Zellner
260198817d Bump version for 1.35.1 2021-06-04 10:11:04 +02:00
Girish Ramakrishnan
f9f5353f42 Version 1.25.0 2021-06-02 18:31:44 -07:00
Girish Ramakrishnan
4d0ef3f614 Update Synapse to 1.35.0 2021-06-02 18:21:41 -07:00
10 changed files with 2364 additions and 457 deletions

179
CHANGELOG
View File

@@ -421,3 +421,182 @@
* Improve performance after joining a large room when presence is enabled. (#9910, #9916) * Improve performance after joining a large room when presence is enabled. (#9910, #9916)
* Support stable identifiers for MSC1772 Spaces. m.space.child events will now be taken into account when populating the experimental spaces summary response. Please see the upgrade notes if you have customised room_invite_state_types in your configuration. (#9915, #9966) * Support stable identifiers for MSC1772 Spaces. m.space.child events will now be taken into account when populating the experimental spaces summary response. Please see the upgrade notes if you have customised room_invite_state_types in your configuration. (#9915, #9966)
* Improve performance of backfilling in large rooms. (#9935) * Improve performance of backfilling in large rooms. (#9935)
[1.25.0]
* Update Synapse to 1.35.0
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.35.0)
* Add experimental support to allow a user who could join a restricted room to view it in the spaces summary. (#9922, #10007, #10038)
* Reduce memory usage when joining very large rooms over federation. (#9958)
* Add a configuration option which allows enabling opentracing by user id. (#9978)
* Enable experimental support for MSC2946 (spaces summary API) and MSC3083 (restricted join rules) by default. (#10011)
[1.25.1]
* Update Synapse to 1.35.1
* Fix a bug introduced in v1.35.0 where invite-only rooms would be shown to all users in a space, regardless of if the user had access to it. (#10109)
[1.26.0]
* Update Synapse to 1.36.0
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.36.0)
[1.27.0]
* Update Synapse to 1.38.0
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.38.0)
* Implement refresh tokens as specified by MSC2918. (#9450)
* Add support for evicting cache entries based on last access time. (#10205)
* Omit empty fields from the /sync response. Contributed by @deepbluev7. (#10214)
* Improve validation on federation send_{join,leave,knock} endpoints. (#10225, #10243)
* Mark events received over federation which fail a spam check as "soft-failed". (#10263)
* Add metrics for new inbound federation staging area. (#10284)
* Add script to print information about recently registered users. (#10290)
[1.27.1]
* Update Synapse to 1.38.1
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.38.1)
[1.28.0]
* Update Synapse to 1.39.0
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.39.0)
[1.29.0]
* Update Synapse to 1.40.0
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.40.0)
[1.30.0]
* Update Synapse to 1.41.0
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.41.0)
[1.30.1]
* Send logs to the console
* Fix postinstall message about federation
[1.30.2]
* Update Synapse to 1.41.1
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.41.1)
* GHSA-3x4c-pq33-4w3q / CVE-2021-39164: Enumerating a private room's list of members and their display names.
* GHSA-jj53-8fmw-f2w2 / CVE-2021-39163: Disclosing a private room's name, avatar, topic, and number of members.
[1.31.0]
* Update Synapse to 1.42.0
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.42.0)
* Support room version 9 from MSC3375. (#10747)
* Add support for MSC3231: Token authenticated registration. Users can be required to submit a token during registration to authenticate themselves. Contributed by Callum Brown. (#10142)
* Add support for MSC3283: Expose enable_set_displayname in capabilities. (#10452)
* Port the PresenceRouter module interface to the new generic interface. (#10524)
* Add pagination to the spaces summary based on updates to MSC2946. (#10613, #10725)
[1.32.0]
* Update Synapse to 1.43.0
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.43.0)
[1.33.0]
* Update Synapse to 1.44.0
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.44.0)
* Only allow the MSC2716 /batch_send?chunk_id=xxx endpoint to connect to an already existing insertion event. (#10776)
* Improve oEmbed URL previews by processing the author name, photo, and video information. (#10814, #10819)
* Speed up responding with large JSON objects to requests. (#10868, #10905)
* Add a user_may_create_room_with_invites spam checker callback to allow modules to allow or deny a room creation request based on the invites and/or 3PID invites it includes. (#10898)
[1.34.0]
* Update Synapse to 1.45.0
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.45.0)
* Fix a long-standing bug when using multiple event persister workers where events were not correctly sent down /sync due to a race. (#11045)
* Fix a bug introduced in Synapse 1.45.0rc1 where the user directory would stop updating if it processed an event from a user not in the users table. (#11053)
* Fix a bug introduced in Synapse 1.44.0 when logging errors during oEmbed processing. (#11061)
[1.34.1]
* Update Synapse to 1.45.1
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.45.1)
* Revert change to counting of deactivated users towards the monthly active users limit, introduced in 1.45.0rc1. (#11127)
[1.35.0]
* Update Synapse to 1.46.0
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.46.0)
* Fix a bug introduced in v1.46.0rc1 where URL previews of some XML documents would fail. (#11196)
[1.36.0]
* Update Synapse to 1.47.0
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.47.0)
* Fix a bug introduced in 1.47.0rc1 which caused worker processes to not halt startup in the presence of outstanding database migrations. (#11346)
* Fix a bug introduced in 1.47.0rc1 which prevented the 'remove deleted devices from device_inbox column' background process from running when updating from a recent Synapse version. (#11303, #11353)
[1.36.1]
* Update Synapse to 1.47.1
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.47.1)
* GHSA-3hfw-x7gx-437c / CVE-2021-41281: Path traversal when downloading remote media.
[1.37.0]
* Update Synapse to 1.48.0
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.48.0)
[1.38.0]
* Update Synapse to 1.49.0
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.49.0)
[1.38.1]
* Update Synapse to 1.49.2
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.49.2)
[1.38.2]
* Update Synapse to 1.50.1
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.50.1)
[1.38.3]
* Update Synapse to 1.50.2
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.50.2)
* Fix a bug introduced in Synapse 1.40.0 that caused Synapse to fail to process incoming federation traffic after handling a large amount of events in a v1 room. (#11806)
[1.38.4]
* Update Synapse to 1.51.0
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.51.0)
[1.38.5]
* Update Synapse to 1.52.0
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.52.0)
* Remove account data (including client config, push rules and ignored users) upon user deactivation. (#11621, #11788, #11789)
* Add an admin API to reset connection timeouts for remote server. (#11639)
* Add an admin API to get a list of rooms that federate with a given remote homeserver. (#11658)
* Add a config flag to inhibit M_USER_IN_USE during registration. (#11743)
* Add a module callback to set username at registration. (#11790)
* Allow configuring a maximum file size as well as a list of allowed content types for avatars. (#11846)
[1.38.6]
* Update Synapse to 1.53.0
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.53.0)
* Add experimental support for sending to-device messages to application services, as specified by MSC2409. (#11215, #11966)
* Add a background database update to purge account data for deactivated users. (#11655)
* Experimental support for MSC3666: including bundled aggregations in server side search results. (#11837)
* Enable cache time-based expiry by default. The expiry_time config flag has been superseded by expire_caches and cache_entry_ttl. (#11849)
* Add a callback to allow modules to allow or forbid a 3PID (email address, phone number) from being associated to a local account. (#11854)
* Stabilize support and remove unstable endpoints for MSC3231. Clients must switch to the stable identifier and endpoint. See the upgrade notes for more information. (#11867)
* Allow modules to retrieve the current instance's server name and worker name. (#11868)
* Use a dedicated configurable rate limiter for 3PID invites. (#11892)
* Support the stable API endpoint for MSC3283: new settings in /capabilities endpoint. (#11933, #11989)
* Support the dir parameter on the /relations endpoint, per MSC3715. (#11941)
* Experimental implementation of MSC3706: extensions to /send_join to support reduced response size. (#11967)
[1.39.0]
* Update Synapse to 1.54.0
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.54.0)
* Fix a bug introduced in Synapse 1.54.0rc1 preventing the new module callbacks introduced in this release from being registered by modules. (#12141)
* Fix a bug introduced in Synapse 1.54.0rc1 where runtime dependency version checks would mistakenly check development dependencies if they were present and would not accept pre-release versions of dependencies. (#12129, #12177)
[1.40.0]
* Update Synapse to 1.55.0
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.55.0)
* Add third-party rules callbacks check_can_shutdown_room and check_can_deactivate_user. (#12028)
* Improve performance of logging in for large accounts. (#12132)
* Support the stable identifiers from MSC3440: threads. (#12151)
* Add a new Jinja2 template filter to extract the local part of an email address. (#12212)
[1.40.1]
* Update Synapse to 1.55.2
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.55.2)
[1.41.0]
* Update Synapse to 1.57.0
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.57.0)
[1.41.1]
* Update Synapse to 1.57.1
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.57.1)

View File

@@ -5,7 +5,8 @@
"description": "file://DESCRIPTION.md", "description": "file://DESCRIPTION.md",
"changelog": "file://CHANGELOG", "changelog": "file://CHANGELOG",
"tagline": "Secure & decentralized communication", "tagline": "Secure & decentralized communication",
"version": "1.24.0", "version": "1.41.1",
"upstreamVersion": "1.57.1",
"healthCheckPath": "/", "healthCheckPath": "/",
"httpPort": 8008, "httpPort": 8008,
"memoryLimit": 536870912, "memoryLimit": 536870912,
@@ -30,7 +31,7 @@
], ],
"changelog": "file://CHANGELOG", "changelog": "file://CHANGELOG",
"postInstallMessage": "file://POSTINSTALL.md", "postInstallMessage": "file://POSTINSTALL.md",
"minBoxVersion": "5.3.0", "minBoxVersion": "7.1.2",
"forumUrl": "https://forum.cloudron.io/category/50/matrix-synapse-riot", "forumUrl": "https://forum.cloudron.io/category/50/matrix-synapse-riot",
"documentationUrl": "https://docs.cloudron.io/apps/synapse/", "documentationUrl": "https://docs.cloudron.io/apps/synapse/",
"optionalSso": true "optionalSso": true

View File

@@ -1,12 +1,10 @@
This app packages Synapse <upstream>1.34.0</upstream>.
**This package only provides the Matrix backend. A variety of clients are available **This package only provides the Matrix backend. A variety of clients are available
[here](https://matrix.org/clients/). Riot is a popular web frontend for Matrix and [here](https://matrix.org/clients/). Riot is a popular web frontend for Matrix and
is available as a separate app.** is available as a separate app.**
Matrix is an ambitious new ecosystem for open federated Instant Messaging and VoIP. ## About
## Matrix Matrix is an ambitious new ecosystem for open federated Instant Messaging and VoIP.
Matrix specifies a set of pragmatic RESTful HTTP JSON APIs as an open standard, which handle: Matrix specifies a set of pragmatic RESTful HTTP JSON APIs as an open standard, which handle:
@@ -18,7 +16,7 @@ Matrix specifies a set of pragmatic RESTful HTTP JSON APIs as an open standard,
* Using 3rd Party IDs (3PIDs) such as email addresses, phone numbers, Facebook accounts to authenticate, identify and discover users on Matrix. * Using 3rd Party IDs (3PIDs) such as email addresses, phone numbers, Facebook accounts to authenticate, identify and discover users on Matrix.
* Placing 1:1 VoIP and Video calls * Placing 1:1 VoIP and Video calls
## Synapse ## What is Synapse?
Synapse is a reference "homeserver" implementation of Matrix from the core development Synapse is a reference "homeserver" implementation of Matrix from the core development
team at matrix.org, written in Python/Twisted. team at matrix.org, written in Python/Twisted.

View File

@@ -1,4 +1,4 @@
FROM cloudron/base:3.0.0@sha256:455c70428723e3a823198c57472785437eb6eab082e79b3ff04ea584faf46e92 FROM cloudron/base:3.2.0@sha256:ba1d566164a67c266782545ea9809dc611c4152e27686fd14060332dd88263ea
RUN mkdir -p /app/pkg RUN mkdir -p /app/pkg
@@ -9,7 +9,7 @@ RUN virtualenv -p python3 /app/code/env
ENV VIRTUAL_ENV=/app/code/env ENV VIRTUAL_ENV=/app/code/env
ENV PATH="$VIRTUAL_ENV/bin:$PATH" ENV PATH="$VIRTUAL_ENV/bin:$PATH"
ARG VERSION=v1.34.0 ARG VERSION=v1.57.1
# Synapse (https://github.com/matrix-org/synapse/blob/master/INSTALL.md) # Synapse (https://github.com/matrix-org/synapse/blob/master/INSTALL.md)
# lxml - required for previews # lxml - required for previews

View File

@@ -1,8 +1,6 @@
Account ids are created with the username and the second level domain under which the Account ids are created with the username and the second level domain under which the
app is installed e.g. `@$CLOUDRON-USERNAME@$CLOUDRON-APP-DOMAIN`. app is installed e.g. `@$CLOUDRON-USERNAME@$CLOUDRON-APP-DOMAIN`.
For federation to work, the second level domain has to be configured to serve up the For federation to work, the delegation URI `https://$CLOUDRON-APP-DOMAIN/.well-known/matrix/server`
`.well-known/domain.com/matrix` URI. See the must be configured. See the [docs](https://docs.cloudron.io/apps/synapse/#post-installation) on how to do this.
[federation docs](https://cloudron.io/documentation/apps/synapse/) on
how to do this.

View File

@@ -72,6 +72,7 @@ federation_ip_range_blacklist:
- 'fc00::/7' - 'fc00::/7'
enable_registration: false enable_registration: false
enable_registration_without_verification: true
registration_shared_secret: "somesecret" registration_shared_secret: "somesecret"
allow_guest_access: false allow_guest_access: false

View File

@@ -22,7 +22,10 @@ if [[ ! -f /app/data/configs/homeserver.yaml ]]; then
cp /app/pkg/homeserver.yaml.template /app/data/configs/homeserver.yaml cp /app/pkg/homeserver.yaml.template /app/data/configs/homeserver.yaml
mv /app/data/configs/${server_name}.log.config /app/data/configs/log.config mv /app/data/configs/${server_name}.log.config /app/data/configs/log.config
yq eval -i ".log_config=\"/app/data/configs/log.config\"" /app/data/configs/homeserver.yaml yq eval -i ".log_config=\"/app/data/configs/log.config\"" /app/data/configs/homeserver.yaml
yq eval -i ".handlers.file.filename=\"/run/synapse/homeserver.log\"" /app/data/configs/log.config
# delete default file and buffer handlers
yq eval -i "del(.handlers.file)" /app/data/configs/log.config
yq eval -i "del(.handlers.buffer)" /app/data/configs/log.config
mv /app/data/configs/${server_name}.signing.key /app/data/configs/signing.key mv /app/data/configs/${server_name}.signing.key /app/data/configs/signing.key
@@ -35,9 +38,15 @@ if [[ ! -f /app/data/configs/homeserver.yaml ]]; then
if [[ -z "${CLOUDRON_LDAP_SERVER:-}" ]]; then if [[ -z "${CLOUDRON_LDAP_SERVER:-}" ]]; then
yq eval -i ".enable_registration=true" /app/data/configs/homeserver.yaml yq eval -i ".enable_registration=true" /app/data/configs/homeserver.yaml
yq eval -i ".password_config.pepper=\"$(pwgen -1s 12)\"" /app/data/configs/homeserver.yaml yq eval -i ".password_config.pepper=\"$(pwgen -1s 12)\"" /app/data/configs/homeserver.yaml
# just setting enabled to false is not enough. see https://github.com/matrix-org/matrix-synapse-ldap3/issues/123
yq eval -i "del(.password_providers)" /app/data/configs/homeserver.yaml
fi fi
fi fi
echo "==> Ensure we log to console"
yq eval -i ".root.handlers=[\"console\"]" /app/data/configs/log.config
yq eval -i ".loggers.twisted.handlers=[\"console\"]" /app/data/configs/log.config
[[ ! -f /app/data/index.html ]] && cp /app/pkg/index.html /app/data/index.html [[ ! -f /app/data/index.html ]] && cp /app/pkg/index.html /app/data/index.html
echo "==> Configuring synapse" echo "==> Configuring synapse"
@@ -67,6 +76,8 @@ if [[ -n "${CLOUDRON_LDAP_SERVER:-}" ]]; then
else else
yq eval -i ".password_config.localdb_enabled=true" /app/data/configs/homeserver.yaml yq eval -i ".password_config.localdb_enabled=true" /app/data/configs/homeserver.yaml
# just setting enabled to false is not enough. see https://github.com/matrix-org/matrix-synapse-ldap3/issues/123
yq eval -i "del(.password_providers)" /app/data/configs/homeserver.yaml
fi fi
# turn (https://github.com/matrix-org/synapse/blob/master/docs/turn-howto.md#synapse-setup) # turn (https://github.com/matrix-org/synapse/blob/master/docs/turn-howto.md#synapse-setup)

2449
test/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -9,11 +9,11 @@
"author": "", "author": "",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"chromedriver": "^90.0.0", "chromedriver": "^100.0.0",
"expect.js": "^0.3.1", "expect.js": "^0.3.1",
"mocha": "^8.4.0", "mocha": "^9.2.2",
"selenium-server-standalone-jar": "^3.141.59", "selenium-server-standalone-jar": "^3.141.59",
"selenium-webdriver": "^3.6.0", "selenium-webdriver": "^4.1.1",
"superagent": "^6.1.0" "superagent": "^7.1.1"
} }
} }

View File

@@ -1,11 +1,11 @@
#!/usr/bin/env node #!/usr/bin/env node
/* jslint node:true */ /* jshint esversion: 8 */
/* global it:false */ /* global describe */
/* global xit:false */ /* global before */
/* global describe:false */ /* global after */
/* global before:false */ /* global it */
/* global after:false */ /* global xit */
'use strict'; 'use strict';
@@ -15,47 +15,42 @@ var execSync = require('child_process').execSync,
expect = require('expect.js'), expect = require('expect.js'),
path = require('path'), path = require('path'),
superagent = require('superagent'), superagent = require('superagent'),
webdriver = require('selenium-webdriver'); { Builder, By, Key, until } = require('selenium-webdriver'),
{ Options } = require('selenium-webdriver/chrome');
var by = require('selenium-webdriver').By,
until = require('selenium-webdriver').until,
Key = require('selenium-webdriver').Key;
describe('Application life cycle test', function () { describe('Application life cycle test', function () {
this.timeout(0); this.timeout(0);
var server, browser = new webdriver.Builder().forBrowser('chrome').build();
var LOCATION = 'test'; const LOCATION = 'test';
var app; const TEST_TIMEOUT = 10000;
var username = process.env.USERNAME; const EXEC_ARGS = { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' };
var password = process.env.PASSWORD;
var TIMEOUT = process.env.TIMEOUT | 30000; const username = process.env.USERNAME;
const password = process.env.PASSWORD;
var app, browser;
var token, roomId; var token, roomId;
before(function (done) { before(function () {
if (!process.env.USERNAME) return done(new Error('USERNAME env var not set')); if (!process.env.USERNAME) throw new Error('USERNAME env var not set');
if (!process.env.PASSWORD) return done(new Error('PASSWORD env var not set')); if (!process.env.PASSWORD) throw new Error('PASSWORD env var not set');
var seleniumJar= require('selenium-server-standalone-jar'); browser = new Builder().forBrowser('chrome').setChromeOptions(new Options().windowSize({ width: 1280, height: 1024 })).build();
var SeleniumServer = require('selenium-webdriver/remote').SeleniumServer;
server = new SeleniumServer(seleniumJar.path, { port: 4444 });
server.start();
done();
}); });
after(function (done) { after(function () {
browser.quit(); browser.quit();
server.stop();
done();
}); });
function checkLandingPage(done) { function getAppInfo() {
browser.get('https://' + app.fqdn).then(function () { var inspect = JSON.parse(execSync('cloudron inspect'));
return browser.wait(until.elementLocated(by.xpath('//h1[contains(text(),"Synapse is running")]')), TIMEOUT); app = inspect.apps.filter(function (a) { return a.location.indexOf(LOCATION) === 0; })[0];
}).then(function () { expect(app).to.be.an('object');
done(); }
});
async function checkLandingPage() {
await browser.get(`https://${app.fqdn}`);
await browser.wait(until.elementLocated(By.xpath('//h1[contains(text(),"Synapse is running")]')), TEST_TIMEOUT);
} }
// https://matrix.org/docs/spec/client_server/latest#user-interactive-api-in-the-rest-api // https://matrix.org/docs/spec/client_server/latest#user-interactive-api-in-the-rest-api
@@ -82,7 +77,7 @@ describe('Application life cycle test', function () {
if (error) return done(error); if (error) return done(error);
if (result.statusCode !== 200) return done(new Error('Login failed with status ' + result.statusCode)); if (result.statusCode !== 200) return done(new Error('Login failed with status ' + result.statusCode));
console.log('registered user with id', result.user_id); console.log('registered user with id', result.body.user_id);
done(); done();
}); });
@@ -141,22 +136,12 @@ describe('Application life cycle test', function () {
}); });
} }
xit('build app', function () { xit('build app', function () { execSync('cloudron build', EXEC_ARGS); });
execSync('cloudron build', { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
});
// No SSO // No SSO
it('install app (no sso)', function () { it('install app (no sso)', function () { execSync('cloudron install --no-sso --location ' + LOCATION, EXEC_ARGS); });
execSync('cloudron install --no-sso --location ' + LOCATION, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
});
it('can get app information', function () { it('can get app information', getAppInfo);
var inspect = JSON.parse(execSync('cloudron inspect'));
app = inspect.apps.filter(function (a) { return a.location === LOCATION; })[0];
expect(app).to.be.an('object');
});
it('check landing page', checkLandingPage); it('check landing page', checkLandingPage);
it('can register new user', registerUser); it('can register new user', registerUser);
@@ -165,22 +150,12 @@ describe('Application life cycle test', function () {
it('create room', createRoom); it('create room', createRoom);
it('check room', checkRoom); it('check room', checkRoom);
it('uninstall app', function () { it('uninstall app', function () { execSync('cloudron uninstall --app ' + app.id, EXEC_ARGS); });
execSync('cloudron uninstall --app ' + app.id, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
});
// SSO // SSO
it('install app', function () { it('install app', function () { execSync('cloudron install --location ' + LOCATION, EXEC_ARGS); });
execSync('cloudron install --location ' + LOCATION, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
});
it('can get app information', function () { it('can get app information', getAppInfo);
var inspect = JSON.parse(execSync('cloudron inspect'));
app = inspect.apps.filter(function (a) { return a.location === LOCATION; })[0];
expect(app).to.be.an('object');
});
it('check landing page', checkLandingPage); it('check landing page', checkLandingPage);
it('can login', checkLogin); it('can login', checkLogin);
@@ -188,28 +163,22 @@ describe('Application life cycle test', function () {
it('create room', createRoom); it('create room', createRoom);
it('check room', checkRoom); it('check room', checkRoom);
it('can restart app', function (done) { it('can restart app', function () { execSync('cloudron restart'); });
execSync('cloudron restart');
done();
});
it('check landing page', checkLandingPage); it('check landing page', checkLandingPage);
it('check room', checkRoom); it('check room', checkRoom);
it('backup app', function () { it('backup app', function () { execSync('cloudron backup create --app ' + app.id, EXEC_ARGS); });
execSync('cloudron backup create --app ' + app.id, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
});
it('check landing page', checkLandingPage); it('check landing page', checkLandingPage);
it('check room', checkRoom); it('check room', checkRoom);
it('restore app', function () { it('restore app', function () {
const backups = JSON.parse(execSync('cloudron backup list --raw')); const backups = JSON.parse(execSync('cloudron backup list --raw'));
execSync('cloudron uninstall --app ' + app.id, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' }); execSync('cloudron uninstall --app ' + app.id, EXEC_ARGS);
execSync('cloudron install --location ' + LOCATION, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' }); execSync('cloudron install --location ' + LOCATION, EXEC_ARGS);
var inspect = JSON.parse(execSync('cloudron inspect')); getAppInfo();
app = inspect.apps.filter(function (a) { return a.location === LOCATION; })[0]; execSync(`cloudron restore --backup ${backups[0].id} --app ${app.id}`, EXEC_ARGS);
execSync(`cloudron restore --backup ${backups[0].id} --app ${app.id}`, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
}); });
it('check landing page', checkLandingPage); it('check landing page', checkLandingPage);
@@ -217,40 +186,29 @@ describe('Application life cycle test', function () {
it('move to different location', function () { it('move to different location', function () {
browser.manage().deleteAllCookies(); browser.manage().deleteAllCookies();
execSync('cloudron configure --location ' + LOCATION + '2', { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' }); execSync('cloudron configure --location ' + LOCATION + '2', EXEC_ARGS);
var inspect = JSON.parse(execSync('cloudron inspect')); getAppInfo();
app = inspect.apps.filter(function (a) { return a.location === LOCATION + '2'; })[0];
expect(app).to.be.an('object');
}); });
it('check landing page', checkLandingPage); it('check landing page', checkLandingPage);
it('check room', checkRoom); it('check room', checkRoom);
it('uninstall app', function () { it('uninstall app', function () { execSync('cloudron uninstall --app ' + app.id, EXEC_ARGS); });
execSync('cloudron uninstall --app ' + app.id, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
});
// test update // test update
it('can install app', function () { it('can install app', function () { execSync('cloudron install --appstore-id org.matrix.synapse --location ' + LOCATION, EXEC_ARGS); });
execSync('cloudron install --appstore-id org.matrix.synapse --location ' + LOCATION, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
var inspect = JSON.parse(execSync('cloudron inspect')); it('can get app information', getAppInfo);
app = inspect.apps.filter(function (a) { return a.location === LOCATION; })[0];
expect(app).to.be.an('object');
});
it('check landing page', checkLandingPage); it('check landing page', checkLandingPage);
it('can login', checkLogin); it('can login', checkLogin);
it('create room', createRoom); it('create room', createRoom);
it('check room', checkRoom); it('check room', checkRoom);
it('can update', function () { it('can update', function () { execSync('cloudron update --app ' + LOCATION, EXEC_ARGS); });
execSync('cloudron update --app ' + LOCATION, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
});
it('check landing page', checkLandingPage); it('check landing page', checkLandingPage);
it('check room', checkRoom); it('check room', checkRoom);
it('uninstall app', function () {
execSync('cloudron uninstall --app ' + app.id, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
});
});
it('uninstall app', function () { execSync('cloudron uninstall --app ' + app.id, EXEC_ARGS); });
});