matrix-org / matrix-org/matrix-spec
Signatures object is not defined explicitly
まだ誰も着手していません。
- 主要言語
- HTML
- スター
- 330
- フォーク
- 150
- 平均マージ
- 2時間 21分
- マージ済み PR(30日)
- 3
説明
I'm not quite sure how to organize this, but I think that the Signatures object could use a little more definition.
The Signatures object is referred to several times in the Federation API, but it isn't explicitly defined like other objects types are. There is a reference to the Signing JSON (section 3) in the appendix, but the actual schema isn't described until Section 3.2. It requires some scrolling to get down to the definition from the link given in the Federation API.
A sentence in Section 3.2 of the appendix mentions that the key for the field is "the name of the entity signing it." For device signatures, it is explicitly stated that the entity name is the User ID and the signing key identifier is the concatenation of the algorithm and device ID. (Cf. signatures request parameter in key claim endpoint.
On the other hand, for server signatures it doesn't seem to be explicitly stated that the key for a homeserver signature should be the server name. This can be inferred from the examples, but it could be made more explicit. I think it would be nice to have a type defined for Signatures something like this:
Signatures (generic)
| Parameter | Type | Description |
|---|---|---|
<entity name> |
{ string: string } | Map from signing key identifier to Base64-encoded string of signature. The field name should be the name of the entity signing the content. |
This could be further specified for each signature type:
Server Signatures
| Parameter | Type | Description |
|---|---|---|
<server name> |
{ string: string} | Map from a homeserver key identifier to Base64-encoded string of signature. The field name should be the server name of the homeserver signing the content. |
Device Signatures
| Parameter | Type | Description |
|---|---|---|
<user ID> |
{ string: string} | Map from device key identifiers to Base64-encoded string of signature. The field name should be the ID of the user who owns the device. |
... and similarly for the Invite Signatures and Identity Server Signatures types.
(Now that I write this, it seems that the difficulty with this is being able to specify types for field names...)
Sorry for the rambling; let me know if I didn't get the problem across.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
Federation API の Signatures オブジェクトに関するリファレンスから始め、次に Signing JSON の付録、特に Section 3.2 を読み、device と server の署名例を比較します。汎用的なエンティティ名のマッピングを明確にし、server、device、invite、identity-server の各バリアントを文書化します。参照されている API セクションがキー名と値のマップを定義し、読者が例から推測する必要がなければ完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- json
- 領域
- documentation
- issue の種類
- ドキュメント
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100