Skip to content
This repository was archived by the owner on Jan 2, 2026. It is now read-only.

Commit 51d7a7d

Browse files
committed
remove GET server pubkey, increase security through responding with idcert cache information
1 parent 5db5ce3 commit 51d7a7d

File tree

1 file changed

+3
-30
lines changed

1 file changed

+3
-30
lines changed

api/src/core/routes/federated_identity.tsp

Lines changed: 3 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -187,23 +187,7 @@ namespace FederatedIdentity {
187187
* @param timestamp An optional UNIX timestamp to retrieve the ID-Cert the server had at that
188188
* point in time, instead of the current one.
189189
*/
190-
op serverIdCert(@query timestamp?: uint64): string;
191-
192-
@route("/key/server")
193-
@get
194-
@added(Version.`v1.0-alpha.1`)
195-
@summary("Get Server Public Key")
196-
/**
197-
* Request the server's public key.
198-
* @returns The current public key of the server, or, if specified, the public key the server had
199-
* at the specified time. The public key is being returned as a PEM encoded X.509
200-
* `SubjectPublicKeyInfo`.
201-
* @param timestamp An optional UNIX timestamp to retrieve the public key the server had at that
202-
* point in time, instead of the current one.
203-
*/
204-
op serverKey(@query timestamp?: {
205-
timestamp: uint64
206-
}): string;
190+
op serverIdCert(@query timestamp?: uint64): polyproto.core.models.CacheableIDCert;
207191

208192
@route("/idcert/actor")
209193
@get
@@ -215,18 +199,11 @@ namespace FederatedIdentity {
215199
* @param notBefore: Return only ID-Certs from at or after a specific point in time. UNIX 64 bit timestamp.
216200
* @param notAfter: Return only ID-Certs from at or before a specific point in time. UNIX 64 bit timestamp.
217201
* @param session_id Optionally, return only the ID-Certs matching a specific `session_id`.
218-
* @returns JSON-Array of Object(s), each object containing "id_cert" (PEM encoded ID-Cert) and "invalidated" (boolean). An ID-Cert is considered invalidated, if the server or actor choose to revoke the validity of the ID-Cert before the lifetime of the certificate was scheduled to end.
202+
* @returns JSON-Array of Object(s).
219203
*/
220204
op actorCerts(@path fid: string, @query notBefore?: uint64, @query notAfter?: uint64, @query session_id?: string): {
221205
@statusCode statusCode: 200;
222-
@body response: {
223-
@doc("PEM encoded ID-Cert")
224-
@example("------BEGIN CERTIFICATE------...")
225-
id_cert: string,
226-
@example(false)
227-
@doc("Whether this specific id_cert has been marked as invalidated by the server. An ID-Cert is considered invalidated, if the server or actor choose to revoke the validity of the ID-Cert before the lifetime of the certificate was scheduled to end.")
228-
invalidated: boolean
229-
}[]
206+
@body response: polyproto.core.models.CacheableIDCert[]
230207
};
231208

232209
@route("/session/idcert/extern")
@@ -247,7 +224,3 @@ namespace FederatedIdentity {
247224
};
248225
}
249226
}
250-
251-
/**
252-
* TODO: ID-Cert caching cache number
253-
*/

0 commit comments

Comments
 (0)