Commit graph

24 commits

Author SHA1 Message Date
Daniel Aloni 95c638274b 🥅 Don't lint errcheck for conn.Close() of LDAP connection. 2023-07-10 17:44:13 +03:00
Daniel Aloni 0e289d024f Merge remote-tracking branch 'origin' into release/upstream-v0.13.1 2023-07-10 17:13:43 +03:00
Till 11b557097c
Drop reference_sha column (#3083)
Companion PR to https://github.com/matrix-org/gomatrixserverlib/pull/383
2023-05-24 12:14:42 +02:00
Daniel Aloni 74e795d23d Merge remote-tracking branch 'ldap/syncloud' into daniel/ldap-integration 2023-04-30 14:55:50 +03:00
Boris Rybalkin 985298cfc4
app service unix socket support (#3022)
This is the last part of unix socket support to talk to app servers, go
based app services already support unix sockets:

5a68173fe3
```
appservice:
  # The address that the homeserver can use to connect to this appservice.
  address: unix:///var/snap/matrix/current/whatsapp.socket

  # The hostname and port where this appservice should listen.
  hostname: /var/snap/matrix/current/whatsapp.socket
  port: 0
```

### Pull Request Checklist

<!-- Please read
https://matrix-org.github.io/dendrite/development/contributing before
submitting your pull request -->

* [x] I have added Go unit tests or [Complement integration
tests](https://github.com/matrix-org/complement) for this PR _or_ I have
justified why this PR doesn't need tests
* [x] Pull request includes a [sign off below using a legally
identifiable
name](https://matrix-org.github.io/dendrite/development/contributing#sign-off)
_or_ I have already signed off privately

Signed-off-by: `Boris Rybalkin <ribalkin@gmail.com>`
2023-04-04 09:42:46 +02:00
Daniel Aloni c550c2e8cb Merge remote-tracking branch 'origin' into release/upstream-v0.12.0 2023-03-15 12:30:11 +02:00
devonh 5b73592f5a
Initial Store & Forward Implementation (#2917)
This adds store & forward relays into dendrite for p2p.
A few things have changed:
- new relay api serves new http endpoints for s&f federation
- updated outbound federation queueing which will attempt to forward
using s&f if appropriate
- database entries to track s&f relays for other nodes
2023-01-23 17:55:12 +00:00
PiotrKozimor 1214c6137a
CD with GCP cloud builds (#12)
* Setup CD on GCP

* Squashed commit of the following:

commit 7823481a0e
Author: PiotrKozimor <37144818+PiotrKozimor@users.noreply.github.com>
Date:   Mon Jul 4 17:39:22 2022 +0200

    Merge v0.8.9 (#13)

    Squashed commit of the following:

    commit b5c55faf98
    Author: Neil Alexander <neilalexander@users.noreply.github.com>
    Date:   Fri Jul 1 12:00:32 2022 +0100

        Version 0.8.9 (#2549)

        * Version 0.8.9

        * Update changelog

    commit b50a24c666
    Author: Neil Alexander <neilalexander@users.noreply.github.com>
    Date:   Fri Jul 1 10:54:07 2022 +0100

        Roomserver producers package (#2546)

        * Give the roomserver a producers package

        * Change init point

        * Populate ACLs API

        * Fix build issues

        * `RoomEventProducer` naming

    commit 89cd0e8fc1
    Author: Till <2353100+S7evinK@users.noreply.github.com>
    Date:   Fri Jul 1 11:49:26 2022 +0200

        Try to fix backfilling (#2548)

        * Try to fix backfilling

        * Return start/end to not confuse clients

        * Update GMSL

        * Update GMSL

    commit 086f182e24
    Author: Neil Alexander <neilalexander@users.noreply.github.com>
    Date:   Fri Jul 1 09:50:06 2022 +0100

        Disable WebAssembly builds for now

    commit 54bed4c593
    Author: Neil Alexander <neilalexander@users.noreply.github.com>
    Date:   Fri Jul 1 09:37:54 2022 +0100

        Blacklist `Guest users can join guest_access rooms` test until it can be investigated

    commit 561c159ad7
    Author: Till <2353100+S7evinK@users.noreply.github.com>
    Date:   Thu Jun 30 12:34:37 2022 +0200

        Silence presence logs (#2547)

    commit 519bc1124b
    Author: Neil Alexander <neilalexander@users.noreply.github.com>
    Date:   Wed Jun 29 15:29:39 2022 +0100

        Add `evacuateUser` endpoint, use it when deactivating accounts (#2545)

        * Add `evacuateUser` endpoint, use it when deactivating accounts

        * Populate the API

        * Clean up user devices when deactivating

        * Include invites, delete pushers

    commit 2dea466685
    Author: Neil Alexander <neilalexander@users.noreply.github.com>
    Date:   Wed Jun 29 12:32:24 2022 +0100

        Return an error if trying to invite a malformed user ID (#2543)

    commit 2086992caf
    Author: Till <2353100+S7evinK@users.noreply.github.com>
    Date:   Wed Jun 29 10:49:12 2022 +0200

        Don't return `end` if there are not more messages (#2542)

        * Be more spec compliant

        * Move lazyLoadMembers to own method

    commit 920a20821b
    Author: Jean Lucas <jean@4ray.co>
    Date:   Mon Jun 27 04:15:19 2022 -0400

        Fix nats.go commit (#2540)

        Signed-off-by: Jean Lucas <jean@4ray.co>

    commit 7120eb6bc9
    Author: Neil Alexander <neilalexander@users.noreply.github.com>
    Date:   Wed Jun 15 14:27:07 2022 +0100

        Add `InputDeviceListUpdate` to the keyserver, remove old input API (#2536)

        * Add `InputDeviceListUpdate` to the keyserver, remove old input API

        * Fix copyright

        * Log more information when a device list update fails

    commit 1b90cc9536
    Author: Till <2353100+S7evinK@users.noreply.github.com>
    Date:   Wed Jun 15 12:50:02 2022 +0200

        Fix rare panic when returning user devices over federation (#2534)

    commit 4c2a10f1a6
    Author: Neil Alexander <neilalexander@users.noreply.github.com>
    Date:   Mon Jun 13 15:11:10 2022 +0100

        Handle state before, send history visibility in output (#2532)

        * Check state before event

        * Tweaks

        * Refactor a bit, include in output events

        * Don't waste time if soft failed either

        * Tweak control flow, comments, use GMSL history visibility type

    commit c500958583
    Author: Emanuele Aliberti <dev@mtka.eu>
    Date:   Mon Jun 13 13:08:46 2022 +0200

        generic CaddyFile in front of Dendrite (monolith) (#2531)

        for Caddy 2.5.x

        Co-authored-by: emanuele.aliberti <emanuele.aliberti@mtka.eu>

    commit e1136f4d3e
    Author: Till Faelligen <davidf@element.io>
    Date:   Mon Jun 13 11:46:59 2022 +0200

        Make the linter happy again

    commit 0a7f7dc716
    Author: Neil Alexander <neilalexander@users.noreply.github.com>
    Date:   Mon Jun 13 10:16:30 2022 +0100

        Add `--difference` to `resolve-state` tool

    commit 89d2adadbd
    Author: Neil Alexander <neilalexander@users.noreply.github.com>
    Date:   Fri Jun 10 10:58:04 2022 +0100

        Attempt to raise the file descriptor limit at startup (#2527)

    commit 1030072285
    Author: Neil Alexander <neilalexander@users.noreply.github.com>
    Date:   Fri Jun 10 10:18:32 2022 +0100

        Rename the page to "Optimise your installation"

    commit 16ed1633b6
    Author: Neil Alexander <neilalexander@users.noreply.github.com>
    Date:   Fri Jun 10 10:15:14 2022 +0100

        Highlighting in docs

    commit e2a64773ce
    Author: Neil Alexander <neilalexander@users.noreply.github.com>
    Date:   Fri Jun 10 10:14:15 2022 +0100

        Add new next steps page to the documentation

    commit 660f7839f5
    Author: Till <2353100+S7evinK@users.noreply.github.com>
    Date:   Thu Jun 9 18:38:07 2022 +0200

        Correctly redact events over federation (#2526)

        * Ensure we check powerlevel/origin before redacting an event

        * Add passing test

        * Use pl.UserLevel

        * Make check more readable, also check for the sender
2022-07-04 18:07:55 +02:00
PiotrKozimor 374b77a3df
Entry improvements (#11)
* Refactor ApplicationServiceWorkerState to be more robust

* Add launch.json to VS Code

* Implement login with JWT, registering with email, failed login rate limiting and reset password with m.login.email.identity auth type

* Log errors when JWT parsing failed

* Development build script

* Fix linter errors

* Use golangci-lint as a linter in VS Code

* Fix tests with RtFailedLogin

* Pass config load tests - parse JWT public key only if enabled

* Reduce CI steps

Do not support 386 arch and go 1.16, 1.17

* Fix linter errors

* Change RtFailedLogin logic - nil pointer can be provided

* Respect access token in query

* Fix typos

* Use only one mutex in RtFailedLogin

* Remove eventsRemaining across appservice component

* Push dendrite to production registry as well

* Rafactor TestRtFailedLogin
2022-06-30 14:56:45 +02:00
Neil Alexander 19a9166eb0
New documentation: https://matrix-org.github.io/dendrite/ 2022-05-11 15:39:36 +01:00
Dan f05ce478f0
Implement Push Notifications (#1842)
* Add Pushserver component with Pushers API

Co-authored-by: Tommie Gannert <tommie@gannert.se>
Co-authored-by: Dan Peleg <dan@globekeeper.com>

* Wire Pushserver component

Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>

* Add PushGatewayClient.

The full event format is required for Sytest.

* Add a pushrules module.

* Change user API account creation to use the new pushrules module's defaults.

Introduces "scope" as required by client API, and some small field
tweaks to make some 61push Sytests pass.

* Add push rules query/put API in Pushserver.

This manipulates account data over User API, and fires sync messages
for changes. Those sync messages should, according to an existing TODO
in clientapi, be moved to userapi.

Forks clientapi/producers/syncapi.go to pushserver/ for later extension.

* Add clientapi routes for push rules to Pushserver.

A cleanup would be to move more of the name-splitting logic into
pushrules.go, to depollute routing.go.

* Output rooms.join.unread_notifications in /sync.

This is the read-side. Pushserver will be the write-side.

* Implement pushserver/storage for notifications.

* Use PushGatewayClient and the pushrules module in Pushserver's room consumer.

* Use one goroutine per user to avoid locking up the entire server for
  one bad push gateway.
* Split pushing by format.
* Send one device per push. Sytest does not support coalescing
  multiple devices into one push. Matches Synapse. Either we change
  Sytest, or remove the group-by-url-and-format logic.
* Write OutputNotificationData from push server. Sync API is already
  the consumer.

* Implement read receipt consumers in Pushserver.

Supports m.read and m.fully_read receipts.

* Add clientapi route for /unstable/notifications.

* Rename to UpsertPusher for clarity and handle pusher update

* Fix linter errors

* Ignore body.Close() error check

* Fix push server internal http wiring

* Add 40 newly passing 61push tests to whitelist

* Add next 12 newly passing 61push tests to whitelist

* Send notification data before notifying users in EDU server consumer

* NATS JetStream

* Goodbye sarama

* Fix `NewStreamTokenFromString`

* Consume on the correct topic for the roomserver

* Don't panic, NAK instead

* Move push notifications into the User API

* Don't set null values since that apparently causes Element upsetti

* Also set omitempty on conditions

* Fix bug so that we don't override the push rules unnecessarily

* Tweak defaults

* Update defaults

* More tweaks

* Move `/notifications` onto `r0`/`v3` mux

* User API will consume events and read/fully read markers from the sync API with stream positions, instead of consuming directly

Co-authored-by: Piotr Kozimor <p1996k@gmail.com>
Co-authored-by: Tommie Gannert <tommie@gannert.se>
Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
2022-03-03 11:40:53 +00:00
Hoernschen 1d5fd99cad
Allow uppercase username on login (#2126)
* ADD jetstream folder to gitignore

* CHANGE login to check on uppercase if lowercase not exists

Co-authored-by: kegsay <kegan@matrix.org>
2022-01-31 13:44:52 +00:00
The Stranjer 17227f8e98
Don't let things added to the media_store/ directory find their way into the repo (#2057) 2021-11-24 12:55:13 +00:00
J. Ryan Stinnett 034f5ae3f1
Add startup testing for Wasm Pinecone build (#1910)
* Only include go-sqlite3 on the relevant binaries

* The driver name is always sqlite3 now

* Update to matrix-org/go-sqlite3-js@e537baa

* Add initial Wasm test harness

* Upgrade go-sqlite3-js

This fixes an error about semicolons in single statements.

* Add browser-like WebSocket API for testing

* Upgrade go-sqlite3-js

This upgrade includes printing panic messages next to stacks.

* Run for all PRs targeting any branch

* Use manual Node caching

* Temporarily run for all pushes

* Use npm ci instead of install

* Use HTTPS auth for repo packages

* Match path style from build.sh

* update utp

Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
2021-07-20 12:14:58 +01:00
Eric Eastwood 0ee1c56ffd
Use log directory that we will be able to write to (#1799)
Fix https://github.com/matrix-org/dendrite/issues/1644
2021-03-30 09:53:02 +01:00
Neil Alexander ce2517b9fb Support embedding Riot Web (#1113)
* Embed

    * Support for embedding is better now

    * HTTP on localhost for Ygg demo

    * Move embed into Yggdrasil demo
2020-06-11 10:16:46 +01:00
Neil Alexander 176f722d53 Update .gitignore 2020-03-10 11:42:40 +00:00
ruben 74827428bd use go module for dependencies (#594) 2019-05-21 21:56:55 +01:00
Alex Chen 5d2d0484d1 Fix build conflict between docker environment and host - #596 (#598)
Signed-off-by: Alex Chen <minecnly@gmail.com>
2019-03-04 14:47:29 +00:00
mujx 1bcb673e3c Set up a development environment with docker (#387)
Signed-off-by: Konstantinos Sideris <sideris.konstantin@gmail.com>
2018-01-02 18:26:37 +00:00
Richard van der Hoff 7e2362cd2e
Make travis builds a bit faster (#382)
* travis: clone depth=1
* cache kafka download
2017-12-19 14:09:15 +00:00
Erik Johnston 08b9940dde Make media repo use error rather than jsonErrorResponse (#235)
* Make media repo use error rather than jsonErrorResponse

* Update comments

* gb vendor github.com/pkg/errors

* Fixup error formats
2017-09-19 11:40:21 +01:00
Mark Haines a6bb92520c Ignore hidden files and kafka directories 2017-06-28 10:28:13 +01:00
Mark Haines 41c6a3737e A kafkaesque room event consumer for the roomserver. (#1)
* A kafkaesque room event consumer for the roomserver.

Implement the main input loop for the roomserver.

It will receive events from a kafkaesque event source and track
where it is in the stream.

It currently does nothing with the events it consumes.
2017-02-03 13:52:32 +00:00