Merge pull request #1481 from turt2live/travis/s2s/authentication

Define authorization requirements on federation swagger APIs
pull/1531/head
Travis Ralston 6 years ago committed by GitHub
commit 49ec0a36a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -24,6 +24,8 @@ consumes:
- application/json - application/json
produces: produces:
- application/json - application/json
securityDefinitions:
$ref: definitions/security.yaml
paths: paths:
"/backfill/{roomId}": "/backfill/{roomId}":
get: get:
@ -33,6 +35,8 @@ paths:
Starting from the PDU ID(s) given in the ``v`` argument, the PDUs that preceded it Starting from the PDU ID(s) given in the ``v`` argument, the PDUs that preceded it
are retrieved, up to the total number given by the ``limit``. are retrieved, up to the total number given by the ``limit``.
operationId: backfillRoom operationId: backfillRoom
security:
- signedRequest: []
parameters: parameters:
- in: path - in: path
name: roomId name: roomId
@ -85,6 +89,8 @@ paths:
walk of the ``prev_events`` for the ``latest_events``, ignoring any events in ``earliest_events`` walk of the ``prev_events`` for the ``latest_events``, ignoring any events in ``earliest_events``
and stopping at the ``limit``. and stopping at the ``limit``.
operationId: getMissingPreviousEvents operationId: getMissingPreviousEvents
security:
- signedRequest: []
parameters: parameters:
- in: path - in: path
name: roomId name: roomId

@ -0,0 +1,19 @@
# Copyright 2018 New Vector Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
signedRequest:
type: apiKey
description: |-
The ``Authorization`` header defined in the `Authentication`_ section.
name: Authorization
in: header

@ -24,6 +24,8 @@ consumes:
- application/json - application/json
produces: produces:
- application/json - application/json
securityDefinitions:
$ref: definitions/security.yaml
paths: paths:
"/event_auth/{roomId}/{eventId}": "/event_auth/{roomId}/{eventId}":
get: get:
@ -31,6 +33,8 @@ paths:
description: |- description: |-
Retrieves the complete auth chain for a given event. Retrieves the complete auth chain for a given event.
operationId: getEventAuth operationId: getEventAuth
security:
- signedRequest: []
parameters: parameters:
- in: path - in: path
name: roomId name: roomId
@ -72,6 +76,8 @@ paths:
bottom-up after sorting each chain by depth then by event ID. The differences bottom-up after sorting each chain by depth then by event ID. The differences
are then discovered and returned as the response to this API call. are then discovered and returned as the response to this API call.
operationId: compareEventAuth operationId: compareEventAuth
security:
- signedRequest: []
parameters: parameters:
- in: path - in: path
name: roomId name: roomId

@ -22,6 +22,8 @@ schemes:
basePath: /_matrix/federation/v1 basePath: /_matrix/federation/v1
produces: produces:
- application/json - application/json
securityDefinitions:
$ref: definitions/security.yaml
paths: paths:
"/state/{roomId}": "/state/{roomId}":
get: get:
@ -29,6 +31,8 @@ paths:
description: |- description: |-
Retrieves a snapshot of a room's state at a given event. Retrieves a snapshot of a room's state at a given event.
operationId: getRoomState operationId: getRoomState
security:
- signedRequest: []
parameters: parameters:
- in: path - in: path
name: roomId name: roomId
@ -74,6 +78,8 @@ paths:
event IDs. This performs the same function as calling ``/state/{roomId}``, event IDs. This performs the same function as calling ``/state/{roomId}``,
however this returns just the event IDs rather than the full events. however this returns just the event IDs rather than the full events.
operationId: getRoomStateIds operationId: getRoomStateIds
security:
- signedRequest: []
parameters: parameters:
- in: path - in: path
name: roomId name: roomId
@ -117,6 +123,8 @@ paths:
description: |- description: |-
Retrieves a single event. Retrieves a single event.
operationId: getEvent operationId: getEvent
security:
- signedRequest: []
parameters: parameters:
- in: path - in: path
name: eventId name: eventId

@ -24,6 +24,8 @@ consumes:
- application/json - application/json
produces: produces:
- application/json - application/json
securityDefinitions:
$ref: definitions/security.yaml
paths: paths:
"/invite/{roomId}/{eventId}": "/invite/{roomId}/{eventId}":
put: put:
@ -33,6 +35,8 @@ paths:
homeserver and the invited homeserver, it can be sent to all of the servers in the homeserver and the invited homeserver, it can be sent to all of the servers in the
room by the inviting homeserver. room by the inviting homeserver.
operationId: sendInvite operationId: sendInvite
security:
- signedRequest: []
parameters: parameters:
- in: path - in: path
name: roomId name: roomId

@ -24,6 +24,8 @@ consumes:
- application/json - application/json
produces: produces:
- application/json - application/json
securityDefinitions:
$ref: definitions/security.yaml
paths: paths:
"/make_join/{roomId}/{userId}": "/make_join/{roomId}/{userId}":
get: get:
@ -32,6 +34,8 @@ paths:
Asks the receiving server to return information that the sending Asks the receiving server to return information that the sending
server will need to prepare a join event to get into the room. server will need to prepare a join event to get into the room.
operationId: makeJoin operationId: makeJoin
security:
- signedRequest: []
parameters: parameters:
- in: path - in: path
name: roomId name: roomId
@ -145,6 +149,8 @@ paths:
Submits a signed join event to the resident server for it Submits a signed join event to the resident server for it
to accept it into the room's graph. to accept it into the room's graph.
operationId: sendJoin operationId: sendJoin
security:
- signedRequest: []
parameters: parameters:
- in: path - in: path
name: roomId name: roomId

@ -24,6 +24,8 @@ consumes:
- application/json - application/json
produces: produces:
- application/json - application/json
securityDefinitions:
$ref: definitions/security.yaml
paths: paths:
"/make_leave/{roomId}/{userId}": "/make_leave/{roomId}/{userId}":
get: get:
@ -32,6 +34,8 @@ paths:
Asks the receiving server to return information that the sending Asks the receiving server to return information that the sending
server will need to prepare a leave event to get out of the room. server will need to prepare a leave event to get out of the room.
operationId: makeLeave operationId: makeLeave
security:
- signedRequest: []
parameters: parameters:
- in: path - in: path
name: roomId name: roomId
@ -151,6 +155,8 @@ paths:
Submits a signed leave event to the resident server for it Submits a signed leave event to the resident server for it
to accept it into the room's graph. to accept it into the room's graph.
operationId: sendLeave operationId: sendLeave
security:
- signedRequest: []
parameters: parameters:
- in: path - in: path
name: roomId name: roomId

@ -22,6 +22,8 @@ schemes:
basePath: /_matrix/federation/v1 basePath: /_matrix/federation/v1
produces: produces:
- application/json - application/json
securityDefinitions:
$ref: definitions/security.yaml
paths: paths:
"/publicRooms": "/publicRooms":
get: get:
@ -31,6 +33,8 @@ paths:
rooms that are listed on another homeserver's directory, just those rooms that are listed on another homeserver's directory, just those
listed on the receiving homeserver's directory. listed on the receiving homeserver's directory.
operationId: getPublicRooms operationId: getPublicRooms
security:
- signedRequest: []
parameters: parameters:
- in: query - in: query
name: limit name: limit

@ -23,6 +23,8 @@ schemes:
basePath: /_matrix/federation/v1 basePath: /_matrix/federation/v1
produces: produces:
- application/json - application/json
securityDefinitions:
$ref: definitions/security.yaml
paths: paths:
"/query/{queryType}": "/query/{queryType}":
get: get:
@ -32,6 +34,8 @@ paths:
arguments are dependent on which type of query is being made. Known query types arguments are dependent on which type of query is being made. Known query types
are specified as their own endpoints as an extension to this definition. are specified as their own endpoints as an extension to this definition.
operationId: queryInfo operationId: queryInfo
security:
- signedRequest: []
parameters: parameters:
- in: path - in: path
name: queryType name: queryType
@ -54,6 +58,8 @@ paths:
Servers may wish to cache the response to this query to avoid requesting the Servers may wish to cache the response to this query to avoid requesting the
information too often. information too often.
operationId: queryRoomDirectory operationId: queryRoomDirectory
security:
- signedRequest: []
parameters: parameters:
- in: query - in: query
name: room_alias name: room_alias
@ -110,6 +116,9 @@ paths:
Servers may wish to cache the response to this query to avoid requesting the Servers may wish to cache the response to this query to avoid requesting the
information too often. information too often.
operationId: queryProfile
security:
- signedRequest: []
parameters: parameters:
- in: query - in: query
name: user_id name: user_id

@ -24,6 +24,8 @@ consumes:
- application/json - application/json
produces: produces:
- application/json - application/json
securityDefinitions:
$ref: definitions/security.yaml
paths: paths:
"/exchange_third_party_invite/{roomId}": "/exchange_third_party_invite/{roomId}":
put: put:
@ -34,6 +36,8 @@ paths:
an invite as per the `Inviting to a room`_ section before returning a an invite as per the `Inviting to a room`_ section before returning a
response to this request. response to this request.
operationId: exchangeThirdPartyInvite operationId: exchangeThirdPartyInvite
security:
- signedRequest: []
parameters: parameters:
- in: path - in: path
name: roomId name: roomId

@ -24,6 +24,8 @@ consumes:
- application/json - application/json
produces: produces:
- application/json - application/json
securityDefinitions:
$ref: definitions/security.yaml
paths: paths:
"/send/{txnId}": "/send/{txnId}":
put: put:
@ -36,6 +38,8 @@ paths:
The sending server must wait and retry for a 200 OK response before sending a The sending server must wait and retry for a 200 OK response before sending a
transaction with a different ``txnId`` to the receiving server. transaction with a different ``txnId`` to the receiving server.
operationId: sendTransaction operationId: sendTransaction
security:
- signedRequest: []
parameters: parameters:
- in: path - in: path
name: txnId name: txnId

Loading…
Cancel
Save