matrix-org / matrix-org/matrix-spec

Grammar for Secret Storage key ID

Open Beginner friendly
#2,355 1 comment 0 reactions 0 assignees View on GitHub
clarification
Dominant language
HTML
Stars
330
Forks
150
Avg merge
2h 21m
Merged PRs (30d)
3

Description

**Link to problem area**: https://spec.matrix.org/v1.18/client-server-api/#storage

**Issue**
It's not explicitly stated whether the key ID used to identify Secret Storage keys may be an empty string.

At least in the JS-SDK, an empty key ID is treated as an undefined key ([source](https://github.com/matrix-org/matrix-js-sdk/blob/v41.3.0/src/secret-storage.ts#L465)), which is reasonable. Nonetheless, the spec may as well take a stance on it, as technically speaking, there is nothing that prevents an empty string from being a usable key ID.

The Secret Storage key ID is used in the following places:
- The `m.secret_storage.key.[key ID]` account data type
- The value of the `key` parameter in the `m.secret_storage.default_key` account data object
- The keys of the `encrypted` map in encrypted account data objects

Contributor guide

Open the contributing guide

Research direction

Start with the Secret Storage section of the Matrix Client-Server API specification linked in the issue, then locate the definitions for m.secret_storage.key.[key ID], m.secret_storage.default_key, and encrypted account data. Clarify in the specification whether an empty key ID is allowed or disallowed, and ensure the wording is consistent across all three uses.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.