Skip to content
This repository was archived by the owner on Aug 15, 2025. It is now read-only.

Commit dc66ae7

Browse files
[bot]update openapi3 schema
1 parent bbacb2f commit dc66ae7

File tree

1 file changed

+96
-50
lines changed

1 file changed

+96
-50
lines changed

api/build/core-openapi3.yaml

Lines changed: 96 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ info:
77
version: v1.0-alpha.1
88
tags:
99
- name: Federated Identity - Registration required
10-
- name: Sensitive Action
10+
- name: Sensitive Actions
1111
- name: Federated Identity - Registration not required
1212
- name: Migration - Registration required
1313
- name: Migration - Registration not required
@@ -17,10 +17,10 @@ paths:
1717
/.p2/core/v1/challenge:
1818
get:
1919
operationId: Unregistered_challengeString
20-
summary: Get challenge string
20+
summary: Receive a challenge string
2121
description: |-
2222
Request a challenge string. See the corresponding
23-
[protocol definition chapter](/docs/Protocol%20Specifications/core/#)
23+
[protocol definition chapter](https://docs.polyphony.chat/Protocol%20Specifications/core/#42-challenge-strings)
2424
for more information.
2525
parameters: []
2626
responses:
@@ -127,6 +127,49 @@ paths:
127127
- Migration - Registration not required
128128
security:
129129
- BearerAuth: []
130+
/.p2/core/v1/idcert:
131+
post:
132+
operationId: Registered_newIdCert
133+
summary: Get a new ID-Cert
134+
description: |-
135+
Request a new ID-Cert, usually done when wanting to authenticate a new session, or after
136+
an ID-Cert has been revoked, to re-authenticate a session.
137+
parameters:
138+
- name: X-P2-Sensitive-Solution
139+
in: header
140+
required: true
141+
description: Sensitive actions require a second factor of authentication to be executed. Read [section 4.1.2 of the protocol definition](https://docs.polyphony.chat/Protocol%20Specifications/core/#412-sensitive-actions) for more information.
142+
schema:
143+
type: string
144+
responses:
145+
'201':
146+
description: The request has succeeded and a new resource has been created as a result.
147+
content:
148+
application/json:
149+
schema:
150+
type: object
151+
properties:
152+
id_cert:
153+
type: string
154+
example: ------BEGIN CERTIFICATE------...
155+
description: The generated [ID-Cert](/Protocol%20Specifications/core/#71-home-server-signed-certificates-for-public-client-identity-keys-id-cert) in PEM format.
156+
token:
157+
type: string
158+
description: An authorization secret, called a "session token", valid for this `id_cert`/session.
159+
required:
160+
- id_cert
161+
- token
162+
tags:
163+
- Federated Identity - Registration required
164+
- Sensitive Actions
165+
requestBody:
166+
required: true
167+
content:
168+
application/json:
169+
schema:
170+
type: string
171+
security:
172+
- BearerAuth: []
130173
/.p2/core/v1/idcert/actor/{fid}:
131174
get:
132175
operationId: Unregistered_actorCerts
@@ -212,9 +255,10 @@ paths:
212255
summary: Rotate Server Identity Key
213256
description: Rotate the server's identity key. Requires server administrator permissions.
214257
parameters:
215-
- name: X-P2-CHALLENGE-STRING-SOLUTION
258+
- name: X-P2-Sensitive-Solution
216259
in: header
217260
required: true
261+
description: Sensitive actions require a second factor of authentication to be executed. Read [section 4.1.2 of the protocol definition](https://docs.polyphony.chat/Protocol%20Specifications/core/#412-sensitive-actions) for more information.
218262
schema:
219263
type: string
220264
responses:
@@ -226,7 +270,7 @@ paths:
226270
type: string
227271
tags:
228272
- Federated Identity - Registration not required
229-
- Sensitive Action
273+
- Sensitive Actions
230274
security:
231275
- BearerAuth: []
232276
get:
@@ -715,6 +759,12 @@ paths:
715759
the server will select a new primary service provider from the list of available providers.
716760
This new provider will be returned in the response body.
717761
parameters:
762+
- name: X-P2-Sensitive-Solution
763+
in: header
764+
required: false
765+
description: Sensitive actions require a second factor of authentication to be executed. Read [section 4.1.2 of the protocol definition](https://docs.polyphony.chat/Protocol%20Specifications/core/#412-sensitive-actions) for more information.
766+
schema:
767+
type: string
718768
- name: url
719769
in: query
720770
required: true
@@ -754,10 +804,13 @@ paths:
754804
- new_primary
755805
'400':
756806
description: The server could not understand the request due to invalid syntax.
807+
'403':
808+
description: Access is forbidden.
757809
'404':
758810
description: The server cannot find the requested resource.
759811
tags:
760812
- Services - Registration required
813+
- Sensitive Actions
761814
security:
762815
- BearerAuth: []
763816
/.p2/core/v1/services/discover/{fid}:
@@ -883,7 +936,13 @@ paths:
883936
provider should be used by default by other actors, when multiple service providers are available
884937
for a given service namespace. The service specified by the arguments in the body must be a
885938
valid, already existing service.
886-
parameters: []
939+
parameters:
940+
- name: X-P2-Sensitive-Solution
941+
in: header
942+
required: true
943+
description: Sensitive actions require a second factor of authentication to be executed. Read [section 4.1.2 of the protocol definition](https://docs.polyphony.chat/Protocol%20Specifications/core/#412-sensitive-actions) for more information.
944+
schema:
945+
type: string
887946
responses:
888947
'200':
889948
description: |-
@@ -896,8 +955,19 @@ paths:
896955
type: array
897956
items:
898957
$ref: '#/components/schemas/polyproto.core.models.Service'
958+
'400':
959+
description: |-
960+
An array of at minimum one, and at maximum 2 [service](./Types/service.md) objects.
961+
The response will contain the updated previous primary service provider, if there was one, along
962+
with the new primary service provider.
963+
'403':
964+
description: |-
965+
An array of at minimum one, and at maximum 2 [service](./Types/service.md) objects.
966+
The response will contain the updated previous primary service provider, if there was one, along
967+
with the new primary service provider.
899968
tags:
900969
- Services - Registration required
970+
- Sensitive Actions
901971
requestBody:
902972
required: true
903973
content:
@@ -920,10 +990,18 @@ paths:
920990
- BearerAuth: []
921991
/.p2/core/v1/session:
922992
delete:
923-
operationId: Unregistered_deleteSession
993+
operationId: Registered_deleteSession
924994
summary: Delete/Revoke Session
925-
description: Invalidate a session token by naming the session ID associated with it.
995+
description: |-
996+
Invalidate a session and its' associated ID-Cert by providing the session ID associated
997+
with it.
926998
parameters:
999+
- name: X-P2-Sensitive-Solution
1000+
in: header
1001+
required: true
1002+
description: Sensitive actions require a second factor of authentication to be executed. Read [section 4.1.2 of the protocol definition](https://docs.polyphony.chat/Protocol%20Specifications/core/#412-sensitive-actions) for more information.
1003+
schema:
1004+
type: string
9271005
- name: session_id
9281006
in: query
9291007
required: true
@@ -942,56 +1020,24 @@ paths:
9421020
- 0
9431021
'404':
9441022
description: The server cannot find the requested resource.
945-
tags:
946-
- Federated Identity - Registration not required
947-
security:
948-
- BearerAuth: []
949-
/.p2/core/v1/session/idcert:
950-
post:
951-
operationId: Registered_rotateIdCert
952-
summary: Rotate session ID-Cert
953-
description: |-
954-
Rotate your keys for a given session. The `session_id` in the supplied `csr` must correspond to the
955-
session token used in the `authorization`-Header.
956-
parameters: []
957-
responses:
958-
'201':
959-
description: Contains your new ID-Cert, along with a new session token.
960-
content:
961-
application/json:
962-
schema:
963-
type: object
964-
properties:
965-
id_cert:
966-
type: string
967-
example: ------BEGIN CERTIFICATE------...
968-
description: The generated [ID-Cert](/Protocol%20Specifications/core/#71-home-server-signed-certificates-for-public-client-identity-keys-id-cert) in PEM format.
969-
token:
970-
type: string
971-
description: An authorization secret, called a "token", valid for this `id_cert`.
972-
required:
973-
- id_cert
974-
- token
9751023
tags:
9761024
- Federated Identity - Registration required
977-
requestBody:
978-
required: true
979-
content:
980-
application/json:
981-
schema:
982-
type: string
983-
description: A new [certificate signing request (CSR)](/Protocol%20Specifications/core/#71-home-server-signed-certificates-for-public-client-identity-keys-id-cert) with the same session ID
9841025
security:
9851026
- BearerAuth: []
9861027
/.p2/core/v1/session/idcert/extern:
9871028
put:
9881029
operationId: Unregistered_updateSessionCert
9891030
summary: Update session ID-Cert
990-
description: Lets a foreign server know that the ID-Cert of this session has changed.
1031+
description: |-
1032+
Lets a foreign server know that the ID-Cert of a session has changed. This route is also
1033+
used to inform foreign servers about the revocation of an ID-Cert. The ID-Cert passed as
1034+
body in this route must belong to the actor making the request.
9911035
parameters: []
9921036
responses:
9931037
'201':
994-
description: The request has succeeded and a new resource has been created as a result.
1038+
description: 201 on success, 400 if the body is somehow invalid.
1039+
'400':
1040+
description: 201 on success, 400 if the body is somehow invalid.
9951041
tags:
9961042
- Federated Identity - Registration not required
9971043
requestBody:
@@ -1076,10 +1122,10 @@ paths:
10761122
Delete encrypted private key material from the server. The `serial_number(s)`, must match
10771123
the serial numbers of ID-Certs that the client has uploaded key material for.
10781124
parameters:
1079-
- name: X-P2-CHALLENGE-STRING-SOLUTION
1125+
- name: X-P2-Sensitive-Solution
10801126
in: header
10811127
required: true
1082-
description: Sensitive actions require a [challenge string solution](/docs/Protocol%20Specifications/core.md) to be executed.
1128+
description: Sensitive actions require a second factor of authentication to be executed. Read [section 4.1.2 of the protocol definition](https://docs.polyphony.chat/Protocol%20Specifications/core/#412-sensitive-actions) for more information.
10831129
schema:
10841130
type: string
10851131
- name: serials
@@ -1098,7 +1144,7 @@ paths:
10981144
description: The server cannot find the requested resource.
10991145
tags:
11001146
- Federated Identity - Registration required
1101-
- Sensitive Action
1147+
- Sensitive Actions
11021148
security:
11031149
- BearerAuth: []
11041150
/.p2/core/v1/session/keymaterial/size:

0 commit comments

Comments
 (0)