Commit graph

28 commits

Author SHA1 Message Date
Neil Alexander 8009093695 Tweaks 2020-06-15 17:05:03 +01:00
Neil Alexander 8afee910ef missing func 2020-06-15 16:51:59 +01:00
Neil Alexander 094ef9bd6a Fetcher timeouts 2020-06-15 16:51:30 +01:00
Neil Alexander d4e30f2838 Fetcher timeouts 2020-06-15 16:42:14 +01:00
Neil Alexander 1efab75853 oops 2020-06-15 16:36:06 +01:00
Neil Alexander 2e2cece7e3 Perform final comparison against original set of requests 2020-06-15 16:35:25 +01:00
Neil Alexander 0a92c1f5ce Debug logging 2020-06-15 16:01:19 +01:00
Neil Alexander f38ae82826 Debug logging 2020-06-15 15:53:10 +01:00
Neil Alexander 5c7a4571de Update comments, add fixes from forward-merge 2020-06-15 15:23:51 +01:00
Neil Alexander bf6faa4290 Merge branch 'master' into neilalexander/keysagain 2020-06-15 15:11:46 +01:00
Neil Alexander e630190272 Tweak caching behaviour, update tests 2020-06-15 15:03:06 +01:00
Neil Alexander aabd45995a Don't run tests for now 2020-06-15 14:26:10 +01:00
Neil Alexander 811c2d8162 Don't store our own keys in the database 2020-06-15 14:21:18 +01:00
Neil Alexander 5e01375637 Don't store our own keys in the database 2020-06-15 14:20:09 +01:00
Neil Alexander d7eb54c5b3 Move responsibility for generating local keys into server key API, don't register prom in caches unless needed, start tests 2020-06-15 14:05:57 +01:00
Kegsay ecd7accbad
Rehuffle where things are in the internal package (#1122)
renamed:    internal/eventcontent.go -> internal/eventutil/eventcontent.go
	renamed:    internal/events.go -> internal/eventutil/events.go
	renamed:    internal/types.go -> internal/eventutil/types.go
	renamed:    internal/http/http.go -> internal/httputil/http.go
	renamed:    internal/httpapi.go -> internal/httputil/httpapi.go
	renamed:    internal/httpapi_test.go -> internal/httputil/httpapi_test.go
	renamed:    internal/httpapis/paths.go -> internal/httputil/paths.go
	renamed:    internal/routing.go -> internal/httputil/routing.go
	renamed:    internal/basecomponent/base.go -> internal/setup/base.go
	renamed:    internal/basecomponent/flags.go -> internal/setup/flags.go
	renamed:    internal/partition_offset_table.go -> internal/sqlutil/partition_offset_table.go
	renamed:    internal/postgres.go -> internal/sqlutil/postgres.go
	renamed:    internal/postgres_wasm.go -> internal/sqlutil/postgres_wasm.go
	renamed:    internal/sql.go -> internal/sqlutil/sql.go
2020-06-12 14:55:57 +01:00
Neil Alexander 079d8fe8fb
More key tweaks (#1116) 2020-06-12 11:07:26 +01:00
Neil Alexander 81f4ef5e09 Start testing stuff 2020-06-11 13:02:11 +01:00
Neil Alexander 687326933e More key tweaks 2020-06-11 10:50:48 +01:00
Neil Alexander d9d6f4568c
Use ServerKeyAPI as keyring (#1110)
* Use ServerKeyAPI as keyring

* Update fetcher name for debug logs
2020-06-10 11:02:03 +01:00
Kegsay 4f171c56a8
Split out SetupFooComponent (#1106)
* Split out adding HTTP routes from making internal APIs for clarity

* Split out more components

* Split out more things

* Finish converting

* internal mux for internal routes
2020-06-08 15:51:07 +01:00
Neil Alexander e7b19d2c70
More flexible caching (#1101) 2020-06-05 16:42:01 +01:00
Kegsay 2bd12f635c
Convert serverkeys to inthttp (#1097) 2020-06-04 16:26:35 +01:00
Neil Alexander d785ad82b9
Add key validity fetching to server key API (#1094)
* Add key validity checks

* Store fetched keys

* Don't double-cache key results

* Perform server key API operations using new context

* Revert "Perform server key API operations using new context"

This reverts commit 02172223f5.

* Perform server key API operations using new context
2020-06-04 15:40:23 +01:00
Kegsay 097cdf879c
s/Base64String/Base64Bytes/g (#1093)
* s/Base64String/Base64Bytes/g

Requires https://github.com/matrix-org/gomatrixserverlib/pull/203 to land first

* update gmsl
2020-06-04 11:50:57 +01:00
Kegsay e7d1ac84c3
Add ParseFileURI and use it when dealing with file URIs (#1088)
* Add ParseFileURI and use it when dealing with file URIs

Fixes #1059

* Missing file

* Linting
2020-06-04 11:18:08 +01:00
Kegan Dougal 2411007c4b Parse URIs correctly 2020-05-28 12:28:21 +01:00
Neil Alexander 7d6461dd3c
Server key component (#1050)
* Server key API (works for monolith but not for polylith yet)

* Re-enable caching on server key API component

* Groundwork for HTTP APIs for server key API

* Hopefully implement HTTP for server key API

* Simplify public key request marshalling from map keys

* Update gomatrixserverlib

* go mod tidy

* Common -> internal

* remove keyring.go

* Update Docker Hub for server key API

* YAML is funny about indentation

* Wire in new server key API into hybrid monolith mode

* Create maps

* Route server key API endpoints on internal API mux

* Fix server key API URLs

* Add fetcher behaviour into server key API implementation

* Return error if we failed to fetch some keys

* Return results anyway

* Move things about a bit

* Remove unused code

* Fix comments, don't use federation sender URL in polylith mode

* Add server_key_api to sample config

* Review comments

* HTTP API to cache keys that have been requested

* Overwrite server_key_api listen in monolith hybrid mode
2020-05-27 10:19:24 +01:00