Erik Johnston
5d40af7ecf
Update rules on which events to add to `auth_events`
6 years ago
Erik Johnston
86b5486445
Add missing clauses to and fix authorization rules
...
They are still missing third party invites.
6 years ago
Erik Johnston
0b7b3bfcb0
Reindent auth rules section
...
RST expects sub lists to be indented by three or more spaces. By doing
so we can then rely on `#.` for automatic numbering.
6 years ago
Richard van der Hoff
d493c82e82
even more clarification
6 years ago
Erik Johnston
7327656965
Merge pull request #1581 from matrix-org/erikj/limit_txn_size
...
Specify a limit on the number of EDUs and PDUs a transaction can contain
6 years ago
Richard van der Hoff
78d8118846
Further server_name clarification
6 years ago
Richard van der Hoff
f15eafae7f
Remove trailing spaces
6 years ago
Richard van der Hoff
08fba5de51
Link to grammar rather than duplicating.
6 years ago
Erik Johnston
fc1fdc95af
Specify a limit on the number of EDUs and PDUs a transaction can contain
6 years ago
Travis Ralston
cff5b8b205
More versioned links
6 years ago
Travis Ralston
be97e95dc1
Promote device management to be a dedicated section
6 years ago
Travis Ralston
8069981252
Add federation /user/* endpoints
...
Fixes https://github.com/matrix-org/matrix-doc/issues/1438
6 years ago
Travis Ralston
d370a2c6fd
Prepare the identity service and server-server APIs for r0
...
* Create the changelog scaffolding
* Set up the variables for versioning
6 years ago
Travis Ralston
ef41b5c2bf
Server ACLs
...
Implements the proposal for https://github.com/matrix-org/matrix-doc/issues/1383
6 years ago
Travis Ralston
ebca4c7d86
Merge remote-tracking branch 'matrix-org/master' into travis/s2s/presence
6 years ago
Travis Ralston
21dc6f823a
Merge pull request #1484 from turt2live/travis/s2s/read-receipts
...
Document how read receipts work over federation
6 years ago
Travis Ralston
44d1f8dbe5
s/timeline/event graph
6 years ago
Travis Ralston
a53fa9300d
Merge remote-tracking branch 'matrix-org/master' into travis/s2s/presence
6 years ago
Travis Ralston
ff1afaa8f7
Add a note about how presence lists work
6 years ago
Travis Ralston
e7aed3da26
Remove poll/unpoll from presence
6 years ago
Travis Ralston
4b9922b641
Merge pull request #1494 from turt2live/travis/general/openid
...
Document OpenID in the client-server and server-server APIs
6 years ago
Travis Ralston
2eab07ade4
Fix header in server-server API
6 years ago
Travis Ralston
2aa0e7b00f
Merge pull request #1483 from turt2live/travis/s2s/typing
...
Document how typing notifications work over federation
6 years ago
Travis Ralston
88b35d1be5
Clarify how third party invites work
...
This adds several diagrams to the Client-Server API about how invites
are handled, including what the server is expected to do. This helps
implementors know what they are supposed to do in the common cases,
and infer where needed to get the more complex cases correct.
Although lacking in some areas, this is how third party invites work
today.
A link to the now-improved client-server documentation for third party
invites has been added to the server-server specification. The existing
server-server specification needed no further changes on the subject.
Fixes https://github.com/matrix-org/matrix-doc/issues/1366
6 years ago
Travis Ralston
50fc1c4d16
Move backfill/get events so that joins, leaves, and invites are together
6 years ago
Travis Ralston
83ea90f7ba
Move the Authentication section higher in the spec
...
It forms the foundation for all the requests under it, so it should appear before the endpoints that need it.
6 years ago
Travis Ralston
32178bb07e
Tidy up the specification
...
* Minor word choice changes
* Remove the now-empty "Protocol URLs" section
6 years ago
Travis Ralston
56dbeeb22a
Merge pull request #1469 from turt2live/travis/s2s/backfill
...
Improve documentation for backfilling rooms
6 years ago
Travis Ralston
c8a8fdfa8d
Merge pull request #1493 from turt2live/travis/s2s/media
...
Mention how the content repository works over federation
6 years ago
Travis Ralston
0a7e670715
Document how typing notifications work over federation
...
Relevant synapse code: d69decd5c7/synapse/handlers/typing.py (L221-L230)
6 years ago
Travis Ralston
e03bfbc47b
Document how read receipts work over federation
...
Federation format: d69decd5c7/synapse/handlers/receipts.py (L153-L166)
Population of the fields that the above uses to construct the EDU: d69decd5c7/synapse/handlers/receipts.py (L48-L56)
6 years ago
Travis Ralston
05a2427c73
Document how presence EDUs work between servers
...
It's worth noting that Synapse does not make use of the `poll` or `unpoll` fields, and therefore the wording has been updated to permit servers to reject users. In the case of synapse, it would automatically reject everyone in the list by nature of ignoring it.
6 years ago
Travis Ralston
a77975ba68
Merge pull request #1450 from turt2live/travis/s2s/inviting-rooms
...
Improve documentation for how non-third party invites work
6 years ago
Travis Ralston
0f8954d839
Merge pull request #1463 from turt2live/travis/s2s/pdus-and-edus
...
Improve documentation around EDUs and PDUs
6 years ago
Travis Ralston
dcae88c290
Document OpenID in the server-server API
...
Part of https://github.com/matrix-org/matrix-doc/issues/857
Reference: d69decd5c7/synapse/federation/transport/server.py (L543-L557)
6 years ago
Travis Ralston
cdcd72c0e3
Fix stray hash on client-server API link
...
This shouldn't be here, and nothing appears to need it. Removing it now because it has been noticed.
6 years ago
Travis Ralston
0858e7bd23
Mention how the content repository works over federation
...
We might want to consider promoting the media repo to it's own API, and maybe consider calling it the Media Repo rather than Content Repo.
Source of information: experience.
6 years ago
Travis Ralston
521dcdd5d5
Merge remote-tracking branch 'matrix-org/master' into travis/s2s/backfill
6 years ago
Travis Ralston
35f15ba3d8
Merge pull request #1477 from turt2live/travis/s2s/public-rooms
...
Document the /publicRooms endpoint for federation
6 years ago
Travis Ralston
d712bfc73d
Merge pull request #1479 from turt2live/travis/s2s/server-discovery
...
Federation: Document the Host header; Clarify how literal IP addresses are handled
6 years ago
Travis Ralston
e10770ae8b
Merge pull request #1475 from turt2live/travis/s2s/event-auth
...
Document /event_auth and /query_auth
6 years ago
Florian Jacob
e7cebf670e
Fix minor spelling mistake from #1472
...
Signed-off-by: Florian Jacob <projects+git AT florianjacob )DOT( de>
6 years ago
Travis Ralston
dcb39f8890
Fix wording from bad merge
6 years ago
Will Hunt
c826edf23b
Remove dns_name from S2S Api
6 years ago
Will Hunt
7a46bdae02
Spacing
6 years ago
Will Hunt
632101dcde
Merge branch 'master' into hs/dns-to-be-hostname
6 years ago
Travis Ralston
5fbaa1deb5
Federation: Document the Host header; Clarify how literal IP addresses are handled
...
Fixes https://github.com/matrix-org/matrix-doc/issues/1161
The IP address clarification is to add an explicit mention of how to handle the case. The prior documentation assumed that all servers would be resolvable with DNS, and does technically have a fallback to use the fallback port, however making it clear feels like a good idea.
6 years ago
Travis Ralston
2ac80d38d7
Document the /publicRooms endpoint for federation
...
This intentionally doesn't document the third party network aspect of the endpoint. This is scheduled for a later area for dealing with third party network/IDs and is reported as https://github.com/matrix-org/matrix-doc/issues/1476
The client-server response has been broken out to a shared file: both the client-server and server-server /publicRoom endpoints return the same thing, with slightly different inputs.
The inputs (and behaviour) are based upon the docstring here: 43ecfe0b10/synapse/federation/transport/server.py (L583-L612)
6 years ago
Travis Ralston
73958ecbff
Document /event_auth and /query_auth
...
/event_auth is a fairly easy endpoint to determine the use case of. /query_auth is a little harder to investigate and has a fairly interesting purpose: it appears to be used for the sending server to admit defeat and shop around for the right auth chain, correcting it's own perspective as it goes.
/query_auth is based off the following research points in synapse:
* 43ecfe0b10/synapse/handlers/federation.py (L1947-L1990)
* 43ecfe0b10/synapse/handlers/federation.py (L2049-L2187)
* 43ecfe0b10/synapse/handlers/federation.py (L1716-L1761)
* 43ecfe0b10/synapse/federation/federation_server.py (L393-L446)
* https://github.com/matrix-org/synapse/blob/master/synapse/federation/transport/server.py#L482-L487
6 years ago
Travis Ralston
6b67d501e4
Merge branch 'master' into travis/s2s/query
6 years ago
Travis Ralston
3a9fb11c9b
Merge branch 'master' into travis/s2s/backfill
6 years ago
Travis Ralston
1578da453b
Merge branch 'master' into travis/s2s/get-event
6 years ago
Travis Ralston
86d7f42173
Merge pull request #1455 from turt2live/travis/s2s/leaving-rooms
...
Document how leaving rooms/rejecting invites over federation works
6 years ago
Travis Ralston
d48f1e1713
Merge pull request #1461 from turt2live/travis/s2s/transactions
...
Improve documentation on how Transactions work
6 years ago
Travis Ralston
cda88f3b3d
Document /get_missing_events
...
Fixes https://github.com/matrix-org/matrix-doc/issues/1385
6 years ago
Travis Ralston
05bb7e1050
Spelling and word choice
6 years ago
Travis Ralston
53d4003d3a
manual merge of master into travis/s2s/query
6 years ago
Travis Ralston
48972addbf
Merge pull request #1428 from turt2live/travis/s2s/joining-rooms
...
Improve the documentation for joining rooms
6 years ago
Travis Ralston
a9258ed195
an -> a
6 years ago
Travis Ralston
9d474bb819
Document event retrieval endpoints in more detail
...
This also adds a previously-undocumented endpoint: /state_ids
Backfill is technically not part of this section, however it is being left untouched to make the merge with #1469 easier (which moves it out of the file).
Reference material:
* Some calls to synapse on these endpoints with a relatively simple private room.
6 years ago
Travis Ralston
5aef545128
Improve documentation for backfilling rooms
...
There's not a whole lot to improve here - most of the changes are about reorganization and minor clarifications.
6 years ago
Travis Ralston
5027a9a59a
Improve documentation around EDUs and PDUs
...
Clarify fields, improve examples, and make the tables in the spec be generated rather than duplicated.
6 years ago
Travis Ralston
7679b4f1d1
Improve documentation on how Transactions work
...
The response is based upon various sections of the Synapse code in how it generates a response.
There are no new fields added to the transaction. Originally, `previous_ids` and `pdu_failures` were to be documented however neither of these are used in the real world.
6 years ago
Travis Ralston
8f1a4ae0ea
Formatting
6 years ago
Travis Ralston
9fdd8a6f96
Document how leaving rooms/rejecting invites over federation works
...
Fixes https://github.com/matrix-org/matrix-doc/issues/1401
This is very similar to the joining rooms handshake, and much of it is a near copy/paste of the make_join and send_join API. The major difference is the send_leave API doesn't return anything.
References:
* Handling of make_leave: d69decd5c7/synapse/handlers/federation.py (L1285-L1310)
* send_leave route: d69decd5c7/synapse/federation/transport/client.py (L267)
* make_leave route: d69decd5c7/synapse/federation/transport/server.py (L396)
* send_leave returning nothing: d69decd5c7/synapse/handlers/federation.py (L1346)
6 years ago
Travis Ralston
f873bae0cc
Improve documentation for how non-third party invites work
...
The details are fairly straightforward. An `event` has been added to the response body because that's what Synapse returns, despite the spec saying otherwise until now: d69decd5c7/synapse/federation/federation_server.py (L339)
6 years ago
Travis Ralston
c2f1c6e78d
Improve the joining rooms handshake documentation
...
There isn't a whole lot to this section that needed work. The section overall lost the table schema in favour of having the endpoints close by.
The directory query is improved in https://github.com/matrix-org/matrix-doc/pull/1443
6 years ago
Travis Ralston
8e97b0ca81
Improve the server key exchange portion of the s2s specification
...
Most of the text has been shuffled into the swagger definitions to bring it closer to where it matters.
This also attempts to clarify what is out in the wild. Most importantly, the first version of the key exchange is outright removed from the specification. Other research points/questions are:
* What is a "Key ID"?
* 1241156c82/synapse/rest/key/v2/local_key_resource.py (L81-L83)
* 1241156c82/synapse/rest/key/v2/local_key_resource.py (L88-L91)
* Returning a cached response if the server throws a 400, 500, or otherwise not-offline status code
* 1241156c82/synapse/rest/key/v2/remote_key_resource.py (L227-L229)
* `minimum_valid_until_ts` default
* This branch of the ladder: 1241156c82/synapse/rest/key/v2/remote_key_resource.py (L192)
* Returning empty arrays when querying offline/no servers
* Queried by hand against matrix.org as a notary server with a fake domain name to query
* Returning all keys even when querying for specific keys
* Queried by hand using matrix.org as a notary server against a server publishing multiple keys.
The examples and descriptions were also improved as part of this commit.
6 years ago
Travis Ralston
0ddf578b61
Combine all queries into their own section
...
This removes the Directory and Profile sections, instead opting to document them as Queries.
The behaviour of profile queries is based on Synapse's behaviour. A few issues have been opened to improve the behaviour:
* https://github.com/matrix-org/matrix-doc/issues/1434
* https://github.com/matrix-org/matrix-doc/issues/1435
* https://github.com/matrix-org/matrix-doc/issues/1436
* https://github.com/matrix-org/matrix-doc/issues/1437
This fixes https://github.com/matrix-org/matrix-doc/issues/1404
6 years ago
Will Hunt
bdb881420c
Merge branch 'master' into hs/dns-to-be-hostname
6 years ago
Travis Ralston
004998b98f
Convert invites to swagger
...
The whole section reads like a description for the endpoint, and has been replaced by the swagger definition now (rather than at a later stage). All the same information should be kept.
6 years ago
Travis Ralston
f09c4fd286
Convert joins to swagger
6 years ago
Travis Ralston
cb4fcd1d09
Merge remote-tracking branch 'matrix-org/master' into travis/s2s/transactions-swagger
6 years ago
Travis Ralston
2aafde4549
Merge pull request #1419 from turt2live/travis/s2s/3pinvites-swagger
...
Convert third party invite exchange to swagger
6 years ago
Travis Ralston
e226b60c7f
Merge remote-tracking branch 'matrix-org/master' into travis/s2s/transactions-swagger
6 years ago
Travis Ralston
7cb918407d
Merge remote-tracking branch 'matrix-org/master' into travis/s2s/keys-swagger
6 years ago
Travis Ralston
cf93c88337
Convert third party invite exchange to swagger
6 years ago
Travis Ralston
51faf8ed2e
Convert the general query API to swagger
...
Includes "moving" the directory query API into the same area. This will make more sense once the other query types are specified.
6 years ago
Travis Ralston
374ec00046
Convert things that mention "Transaction" to swagger
...
There's two kinds of transactions currently: one with EDUs and one without. The one with EDUs is only used on /send, however the schema is still somewhat worth splitting out for simplicity.
The examples are brought apart to make them slightly more reusable for when they get dumped into the relevant sections of the spec (see TODO in server_server_api.rst)
Further, the Transactions stuff introduces tuples to the spec. The units.py has been updated to support this.
6 years ago
Travis Ralston
96889f16e9
Split out and fix the /server and /query key APIs
6 years ago
Travis Ralston
bd2c0b7c98
Convert server keys to swagger
6 years ago
Will Hunt
92f3989f2b
Dirty replace of DNS name -> hostname
6 years ago
Travis Ralston
2fc2926461
Clearly say that the server/server API is unstable and subject to change
6 years ago
user
54c3003b74
newly joined -> newly-joined
6 years ago
user
5ab5fe08d1
Small grammatical and stylistic fixes
6 years ago
Andrew Morgan
2e5cdaf51c
Fix typo
...
"To stream events all the events" -> "To stream all the events"
6 years ago
Richard van der Hoff
cefd1a832e
server_server_api: fix typo in auth section
...
fixes "destintation" typo
7 years ago
Richard van der Hoff
3dfa643b8b
Fix membership state names
...
It's called 'join', not 'joined'.
7 years ago
Richard van der Hoff
15ca952cc3
remove spurious word
7 years ago
Richard van der Hoff
1fb7647021
send_join: clarify auth_chain description
...
The auth_chain field should contain all of the auth events required to auth the
state events, as well as those required to auth the join event itself.
(cf https://github.com/matrix-org/synapse/blob/e148438/synapse/handlers/federation.py#L1076-L1077 ).
7 years ago
Richard van der Hoff
08d137a588
We sign the request body, not the JSON
...
when signing federation requests, we put the actual request body into the
canonicaljson to be signed, not the JSON representation of it.
7 years ago
Richard van der Hoff
56f878842c
Add a warning that state resolution has problems
7 years ago
Richard van der Hoff
5ab9ee6b88
Link to auth rules
7 years ago
Richard van der Hoff
0960229a80
Document the state resolution algorithm
...
or at least, my understanding of it.
7 years ago
Maxime Dor
e8af5622a7
Use proper room event type for redaction
7 years ago
Richard van der Hoff
96d93e11d7
Tweak wording of auth rules slightly
7 years ago
Maxime Dor
c4f53f58d7
Fix auth rules to allow first PL event
7 years ago
Richard van der Hoff
58a3fa3d60
Merge pull request #1075 from matrix-org/rav/pdu_fields
...
Improve documentation of Transactions and PDUs
7 years ago
Richard van der Hoff
6a653b742c
Document auth_events
7 years ago
Richard van der Hoff
632ba032af
Improve Transaction and PDU documentation
...
Fix a bunch of lies about the fields in these structures.
7 years ago