Commit graph

203 commits

Author SHA1 Message Date
Neil Alexander 329fab7b9d
Storage updates 2021-04-26 16:19:49 +01:00
Neil Alexander 83014845ed
Merge branch 'master' into neilalexander/pinecone 2021-04-22 17:24:04 +01:00
Bruce MacDonald d27607af78
Implement OpenID module (#599) (#1812)
* Implement OpenID module (#599)

- Unrelated: change Riot references to Element in client API routing

Signed-off-by: Bruce MacDonald <contact@bruce-macdonald.com>

* OpenID module tweaks (#599)

- specify expiry is ms rather than vague ts
- add OpenID token lifetime to configuration
- use Go naming conventions for the path params
- store plaintext token rather than hash
- remove openid table sqllite mutex

* Add default OpenID token lifetime (#599)

* Update dendrite-config.yaml

Co-authored-by: Kegsay <kegsay@gmail.com>
Co-authored-by: Kegsay <kegan@matrix.org>
2021-04-07 13:26:20 +01:00
Neil Alexander d960248ea8
Retry room directory lookups if they fail 2021-03-19 14:31:37 +00:00
Neil Alexander 9f2b61fb37
Stay connected to static peers more stickily 2021-03-18 14:33:52 +00:00
Neil Alexander f2b10d854e
Attempt to reconnect to the static peer if it drops 2021-03-17 17:18:40 +00:00
Neil Alexander 36f7a47e42
Don't use HTTP/2 2021-03-16 09:54:09 +00:00
Neil Alexander 3be9f6d5d6
Use HTTP/2 2021-03-15 15:09:50 +00:00
Neil Alexander 346510c557
Test uTP+TLS 2021-03-15 13:58:33 +00:00
Neil Alexander 7691e206a7
Merge branch 'master' into neilalexander/pinecone 2021-03-09 10:25:41 +00:00
Kegsay 850abb1dde
Make bcrypt cost configurable (#1793) 2021-03-08 13:19:02 +00:00
Neil Alexander 1ad96e2e2d
Tweak AS registration check and AS component HTTP clients (#1785)
* Tweak AS registration check

* Check appservice usernames using correct function

* Update sytest-whitelist

* Use gomatrixserverlib.Client since that allows us to disable TLS validation using the config

* Add appservice-specific client and ability to control TLS validation for appservices only

* Set timeout on appservice client

* Review comments

* Remove dead code

* Enforce LoginTypeApplicationService after all

* Check correct auth type field
2021-03-05 10:40:27 +00:00
Neil Alexander d15836e260
Increase gocyclo complexity to 25 (and remove all but 2 golint directives related to it) (#1783) 2021-03-03 14:35:57 +00:00
Neil Alexander 8d195e12be
Configurability updates 2021-02-19 17:19:45 +00:00
Neil Alexander e3378174d7
Fix WebSocket connectivity 2021-02-18 11:22:49 +00:00
Neil Alexander 809c7f625a
Netconn context 2021-02-18 10:36:54 +00:00
Neil Alexander 81f1148a75
Bug fixes 2021-02-17 17:21:42 +00:00
Neil Alexander 158be63551
Add WebSocket support 2021-02-17 16:59:03 +00:00
Neil Alexander bd85f3dc88
Merge branch 'master' into neilalexander/pinecone 2021-02-16 17:12:37 +00:00
Neil Alexander 5d74a1757f
Don't query for servers so often in /send (#1766)
* Look up servers less often, don't hit API for missing auth events unless there are actually missing auth events

* Remove ResolveConflictsAdhoc (since it is already in GMSL), other tweaks

* Update gomatrixserverlib to matrix-org/gomatrixserverlib#254

* Fix resolve-state

* Initialise t.servers on first use
2021-02-16 17:12:17 +00:00
Neil Alexander 31d8f4a147
Update quic-go, fixes 2021-02-15 17:27:27 +00:00
Neil Alexander 0910f2e368
Pinecone demo fixes 2021-01-26 13:51:15 +00:00
Neil Alexander 51ceb4f9ab
Merge branch 'master' into neilalexander/pinecone 2021-01-26 13:38:43 +00:00
Neil Alexander 9f443317bc
Graceful shutdowns (#1734)
* Initial graceful stop

* Fix dendritejs

* Use process context for outbound federation requests in destination queues

* Reduce logging

* Fix log level
2021-01-26 12:56:20 +00:00
Neil Alexander 6757b67a32
NewClient and NewFederationClient updates (#1730)
* Use matrix-org/gomatrixserverlib#252

* Add missing WithSkipVerify to test

* Functions instead

* Update gomatrixserverlib to matrix-org/gomatrixserverlib#252

* Fix disabling TLS validation
2021-01-22 16:09:05 +00:00
Kegsay 93942f8ab6
Gate peeking behind msc flags (#1731) 2021-01-22 16:08:47 +00:00
Neil Alexander 6dadb1c06b
Fix lint error in generate-keys 2021-01-18 09:34:49 +00:00
Kegan Dougal 2113da5332 Enable MSC 2946 in CI 2021-01-15 17:56:50 +00:00
Neil Alexander fac71edc62
Fix #1655 by re-adding the appservice alias query (#1660) 2020-12-18 13:33:28 +00:00
Kegsay a518e2971a
Fix flakey complement (#1653) 2020-12-17 18:25:51 +00:00
Kegsay b507312d4c
MSC2836 threading: part 2 (#1596)
* Update GMSL

* Add MSC2836EventRelationships to fedsender

* Call MSC2836EventRelationships in reqCtx

* auth remote servers

* Extract room ID and servers from previous events; refactor a bit

* initial cut of federated threading

* Use the right client/fed struct in the response

* Add QueryAuthChain for use with MSC2836

* Add auth chain to federated response

* Fix pointers

* under CI: more logging and enable mscs, nil fix

* Handle direction: up

* Actually send message events to the roomserver..

* Add children and children_hash to unsigned, with tests

* Add logic for exploring threads and tracking children; missing storage functions

* Implement storage functions for children

* Add fetchUnknownEvent

* Do federated hits for include_children if we have unexplored children

* Use /ev_rel rather than /event as the former includes child metadata

* Remove cross-room threading impl

* Enable MSC2836 in the p2p demo

* Namespace mscs db

* Enable msc2836 for ygg

Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
2020-12-04 14:11:01 +00:00
Neil Alexander ec7a0e42ae
Simplify create-account (#1608) 2020-12-03 10:55:17 +00:00
Neil Alexander b5aa7ca3ab
Top-level setup package (#1605)
* Move config, setup, mscs into "setup" top-level folder

* oops, forgot the EDU server

* Add setup

* goimports
2020-12-02 17:41:00 +00:00
Neil Alexander 2c9031e576
Merge branch 'master' into neilalexander/pinecone 2020-12-01 10:52:12 +00:00
Neil Alexander c16abb089c
Give fsAPI to keyserver in polylith/gobind 2020-12-01 10:52:02 +00:00
Neil Alexander 7ac03c4bc4
Give fsAPI to keyserver 2020-12-01 10:49:37 +00:00
Neil Alexander fba64a28dc
Stop panics 2020-12-01 10:08:52 +00:00
Neil Alexander 9ab026d8d4
Use AuthenticatedConnect for dial 2020-11-30 13:32:06 +00:00
Neil Alexander d8d05ad82c
Fix public key value 2020-11-30 13:27:49 +00:00
Neil Alexander 39da41c3ba
Add pinecone listener 2020-11-26 16:35:23 +00:00
Neil Alexander aafd9418a6
Pinecone room directory support (early) 2020-11-26 15:31:07 +00:00
Neil Alexander 21c62ff489
Tweaks 2020-11-26 12:50:49 +00:00
Neil Alexander 7f138126ab
Update Pinecone demo 2020-11-25 15:55:11 +00:00
Neil Alexander f4ab36f480
Fix build 2020-11-23 17:52:53 +00:00
Neil Alexander fc282e6a4d
Fix multicast import 2020-11-23 17:12:32 +00:00
Neil Alexander 806c287585
Enable multicast, fix HTTP routing 2020-11-23 17:11:36 +00:00
Neil Alexander 8bcd6c7684
Pinecone demo 2020-11-23 17:07:13 +00:00
Kegsay 6353b0b7e4
MSC2836: Threading - part one (#1589)
* Add mscs/hooks package, begin work for msc2836

* Flesh out hooks and add SQL schema

* Begin implementing core msc2836 logic

* Add test harness

* Linting

* Implement visibility checks; stub out APIs for tests

* Flesh out testing

* Flesh out walkThread a bit

* Persist the origin_server_ts as well

* Edges table instead of relationships

* Add nodes table for event metadata

* LEFT JOIN to extract origin_server_ts for children

* Add graph walking structs

* Implement walking algorithm

* Add more graph walking tests

* Add auto_join for local rooms

* Fix create table syntax on postgres

* Add relationship_room_id|servers to the unsigned section of events

* Persist the parent room_id/servers in edge metadata

Other events cannot assert the true room_id/servers for the
parent event, only make claims to them, hence why this is
edge metadata.

* guts to pass through room_id/servers

* Refactor msc2836 to allow handling from federation

* Add JoinedVia to PerformJoin responses

* Fix tests; review comments
2020-11-19 11:34:59 +00:00
Neil Alexander 20a01bceb2
Pass pointers to events — reloaded (#1583)
* Pass events as pointers

* Fix lint errors

* Update gomatrixserverlib

* Update gomatrixserverlib

* Update to matrix-org/gomatrixserverlib#240
2020-11-16 15:44:53 +00:00
Neil Alexander 534f9a9eb6
Refactor forward extremities (#1556)
* Add resolve-state helper

* Tweaks

* Refactor forward extremities, again

* Tweaks

* Minor optimisation

* Make path a bit clearer

* Only process state/membership if forward extremities have changed

* Usage comments in resolve-state
2020-10-21 15:37:07 +01:00