aboutsummaryrefslogtreecommitdiff
path: root/cmd
AgeCommit message (Collapse)Author
2021-01-26Graceful shutdowns (#1734)Neil Alexander
* Initial graceful stop * Fix dendritejs * Use process context for outbound federation requests in destination queues * Reduce logging * Fix log level
2021-01-22NewClient and NewFederationClient updates (#1730)Neil Alexander
* 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-22Gate peeking behind msc flags (#1731)Kegsay
2021-01-18Fix lint error in generate-keysNeil Alexander
2021-01-15Enable MSC 2946 in CIKegan Dougal
2020-12-18Fix #1655 by re-adding the appservice alias query (#1660)Neil Alexander
2020-12-17Fix flakey complement (#1653)Kegsay
2020-12-04MSC2836 threading: part 2 (#1596)Kegsay
* 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-03Simplify create-account (#1608)Neil Alexander
2020-12-02Top-level setup package (#1605)Neil Alexander
* Move config, setup, mscs into "setup" top-level folder * oops, forgot the EDU server * Add setup * goimports
2020-12-01Give fsAPI to keyserver in polylith/gobindNeil Alexander
2020-11-19MSC2836: Threading - part one (#1589)Kegsay
* 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-16Pass pointers to events — reloaded (#1583)Neil Alexander
* Pass events as pointers * Fix lint errors * Update gomatrixserverlib * Update gomatrixserverlib * Update to matrix-org/gomatrixserverlib#240
2020-10-21Refactor forward extremities (#1556)Neil Alexander
* 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-20Multi-personality polylith binary (#1552)Neil Alexander
* Initial work oon multipersonality binary * Remove old binaries * Monolith and polylith binaries * Better logging * dendrite-poly-multi * Fix path * Copyright notices etc * Tweaks * Update Docker, INSTALL.md * Take first argument if flags package doesn't find any args * Postgres 9.6 or later, fix some more Docker stuff * Don't create unnecessary e2ekey DB * Run go mod tidy
2020-10-20fix create-account (#1546)Pika
2020-10-15Automatically upgrade databases on startup (#1529)Kegsay
* Support auto-upgrading accounts DB * Auto-upgrade device DB deltas * Support up/downgrading from cmd/goose * Linting * Create tables then do migrations then prepare statements To avoid failing due to some things not existing * Linting
2020-10-15Start Kafka connections for each component that needs them (#1527)Neil Alexander
* Start Kafka connection for each component that needs one * Fix roomserver unit tests * Rename to naffkaInstance (@Kegsay review comment) * Fix import cycle
2020-10-09Update federation timeouts (#1504)Neil Alexander
* Update to matrix-org/gomatrixserverlib#234 * Update gomatrixserverlib * Update federation timeouts * Fix dendritejs * Increase /send context time in destination queue
2020-10-09Extend device_devices table (#1471)S7evinK
* Add last_used_ts and IP to database * Add migrations * Rename column Prepare statements * Add interface method and implement it Signed-off-by: Till Faelligen <tfaelligen@gmail.com> * Rename struct fields * Add user_agent to database * Add userAgent to registration calls * Add missing "IF NOT EXISTS" * use txn writer * Add UserAgent to Device Co-authored-by: Kegsay <kegan@matrix.org>
2020-10-07Update monolith -api behaviour (#1484)Neil Alexander
* Update monolith -api mode listeners * Fix check * Fix another check * Update HTTP API addr behaviour * Redefine NoExternalListener * NoListener
2020-10-07Rename serverkeyapi to signingkeyserver (#1492)Kegsay
* Rename serverkeyapi to signingkeyserver We use "api" for public facing stuff and "server" for internal stuff. As the server key API is internal only, we call it 'signing key server', which also clarifies the type of key (as opposed to TLS keys, E2E keys, etc) * Convert docker/scripts to use signing-key-server * Rename missed bits
2020-10-06Don't give up if we fail to fetch a key (#1483)Neil Alexander
* Don't give up if we fail to fetch a key * Fix logging line * furl nolint
2020-10-06Add furl (#1482)Neil Alexander
* Add furl * Add POST support
2020-10-06Yggdrasil demo tweaksNeil Alexander
2020-10-05Add example goose sqlite3 migration (#1474)S7evinK
Signed-off-by: Till Faelligen <tfaelligen@gmail.com>
2020-10-02Don't drop federation retries for Yggdrasil demosNeil Alexander
2020-10-01Update HTTP clients (#1457)Neil Alexander
* Update gomatrixserverlib * Use separate HTTP client for API calls, set User-Agent for outbound HTTP requests
2020-09-16Implement rejected events (#1426)Kegsay
* WIP Event rejection * Still send back errors for rejected events Instead, discard them at the federationapi /send layer rather than re-implementing checks at the clientapi/PerformJoin layer. * Implement rejected events Critically, rejected events CAN cause state resolution to happen as it can merge forks in the DAG. This is fine, _provided_ we do not add the rejected event when performing state resolution, which is what this PR does. It also fixes the error handling when NotAllowed happens, as we were checking too early and needlessly handling NotAllowed in more than one place. * Update test to match reality * Modify InputRoomEvents to no longer return an error Errors do not serialise across HTTP boundaries in polylith mode, so instead set fields on the InputRoomEventsResponse. Add `Err()` function to make the API shape basically the same. * Remove redundant returns; linting * Update blacklist
2020-09-10Add support for database migrations (#1416)Kegsay
* Add support for database migrations Closes #1246 This PR does NOT add any migrations as an example. I have manually tested that the library works with SQL and Go based upgrades correctly. Documentation should be sufficient for devs to add migrations. * Clarifications * Linting
2020-09-07Remove current state server (#1405)Kegsay
* Remove current state server Closes #1365 #1272 #1357 * Remove current state server from scripts/docs
2020-09-07Remove QueryBulkStateContent from current state server (#1404)Kegsay
* Remove QueryBulkStateContent from current state server Expected fail due to db impl not existing * Implement query bulk state content * Fix up rejecting invites over federation * Fix bulk content marshalling
2020-09-04Remove QueryRoomsForUser from current state server (#1398)Kegsay
2020-09-03Rate limiting (#1385)Neil Alexander
* Initial rate limiting * Move rate limiting to client API * Update rate limits to hopefully be self-cleaning * Use X-Forwarded-For, add comments * Reduce rate limit threshold * Tweak interval * Configurable backoff * Review comments, set cleanup interval to 30 seconds * Allow generate-config to produce sane CI config * Fix Complement dockerfile
2020-09-02Use federation sender for backfill/getting missing events (#1379)Neil Alexander
* Use federation sender for backfill and getting missing events * Fix internal URL paths * Update go.mod/go.sum for matrix-org/gomatrixserverlib#218 * Add missing server implementations in HTTP interface
2020-08-27Remove device DB from clientapi (#1352)Kegsay
* Remove device DB from clientapi * Remove device DB from startup configuration It's all an impl detail now in user API
2020-08-21Fix embedding Element Web into demo-libp2p and demo-yggdrasilNeil Alexander
2020-08-20Add FederationClient interface to federationsender (#1284)Kegsay
* Add FederationClient interface to federationsender - Use a shim struct in HTTP mode to keep the same API as `FederationClient`. - Use `federationsender` instead of `FederationClient` in `keyserver`. * Pointers not values * Review comments * Fix unit tests * Rejig backoff * Unbreak test * Remove debug logs * Review comments and linting
2020-08-17Add SkipClean and UseEncodedPaths to intermediate routers (#1275)Neil Alexander
2020-08-13Fix Docker builds, polylith components (#1269)Neil Alexander
2020-08-13API setup refactoring (#1266)Neil Alexander
* Start HTTP endpoint refactoring * Update SetupAndServeHTTP * Fix builds * Don't set up external listener if no address configured * TLS HTTP setup * Break apart client/federation/key/media muxes * Tweaks * Fix P2P demos * Fix media API routing * Review comments @Kegsay * Update sample config * Fix gobind build * Fix External -> Public in federation API test
2020-08-11New sample config (#1258)Neil Alexander
* Config tweaks * Tweaks to config * Add new sample dendrite-config.yaml file * Review comments @Kegsay
2020-08-10Prefix-defined Kafka topics (#1254)Neil Alexander
* Prefix-defined Kafka topics * Fix current state server test
2020-08-10Configuration format v1 (#1230)Neil Alexander
* Initial pass at refactoring config (not finished) * Don't forget current state and EDU servers * More shifting around * Update server key API tests * Fix roomserver test * Fix more tests * Further tweaks * Fix current state server test (sort of) * Maybe fix appservices * Fix client API test * Include database connection string in database options * Fix sync API build * Update config test * Fix unit tests * Fix federation sender build * Fix gobind build * Set Listen address for all services in HTTP monolith mode * Validate config, reinstate appservice derived in directory, tweaks * Tweak federation API test * Set MaxOpenConnections/MaxIdleConnections to previous values * Update generate-config
2020-08-07Allow enforcing X.509 certificate validity (MSC1711) (#1249)Neil Alexander
* Configurable X.509 certificate validation * Fix dendritejs * Update go.mod/go.sum for matrix-org/gomatrixserverlib#214 * Update sample config
2020-08-06Yggdrasil demo updates (#1241)Neil Alexander
* PerformServersAlive in PerformBroadcastEDU * Don't double-pointer * More reliable QUIC session handling * Direct peer lookup, other tweaks * Tweaks * Try to wake up queues on incoming QUIC session * Set session callbak on gobind build * Fix incoming session storage * Stateless reset, other tweaks * Reset sessions when coordinates change * Disable HTTP connection reuse, tweak timeouts
2020-08-04Send device list updates to servers (outbound only) (#1237)Kegsay
* Add QueryDeviceMessages to serve up device keys and stream IDs * Consume key change events in fedsender Don't yet send them to destinations as we haven't worked them out yet * Send device list updates to all required servers * Glue it all together
2020-07-30Notify clients when devices are deleted (#1233)Kegsay
* Recheck device lists when join/leave events come in * Add PerformDeviceDeletion * Notify clients when devices are deleted * Unbreak things * Remove debug logging
2020-07-30Fix Yggdrasil demo buildsNeil Alexander
2020-07-30Hook up device list updates to the sync notifier (#1231)Kegsay
* WIP hooking up key changes * Fix import cycle, get tests passing and binary compiling * Linting and update whitelist