sydent icon indicating copy to clipboard operation
sydent copied to clipboard

`POST /_matrix/identity/v2/store-invite` returns v1 key validity APIs

Open richvdh opened this issue 3 years ago • 3 comments

Sydent's handler for POST /_matrix/identity/v2/store-invite returns:

{
    "token": "token",
    "public_key": "sydentPubKeyBase64",
    "public_keys": [
        {
            "public_key": "sydentPubKeyBase64",
            "key_validity_url":  "https://<server>/_matrix/identity/api/v1/pubkey/isvalid"
        },
        {
            "public_key": "ephemeralPublicKeyBase64",
            "key_validity_url": "https://<server>/_matrix/identity/api/v1/pubkey/ephemeral/isvalid",
        }
    ],
    "display_name": "<redacted email>"
}

As this shows, the key_validity_urls are under the now-defunct /api/v1 path. Arguably, this doesn't matter, because:

  • When populating the m.room.third_party_invite event, Synapse also builds its own key_validity_url and stores it at the top level of the event, where it is given precedence over the key_validity_urls within public_keys.
  • This is a Sydent URL generated by Sydent, so it doesn't need to be part of the spec. However, if we want to make that argument, it should be outside the /_matrix/ namespace anyway (cf #533).

richvdh avatar Nov 25 '22 18:11 richvdh

Related: https://github.com/matrix-org/synapse/issues/6036, https://github.com/matrix-org/matrix-spec/issues/1361.

richvdh avatar Nov 25 '22 18:11 richvdh

Related: https://github.com/matrix-org/matrix-spec/issues/495, https://github.com/matrix-org/sydent/issues/338

richvdh avatar Apr 05 '23 15:04 richvdh

For your information, this issue has been copied over to the Element fork of sydent: https://github.com/element-hq/sydent/issues/534

matrixbot avatar Jul 18 '25 14:07 matrixbot