Skip to content

Commit

Permalink
MSC-4003: unified view of identity service
Browse files Browse the repository at this point in the history
  • Loading branch information
guimard committed Apr 26, 2023
1 parent 0907871 commit a9910e1
Showing 1 changed file with 68 additions and 0 deletions.
68 changes: 68 additions & 0 deletions proposals/4003-unified-identity-service-view.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# MSC4003: Unified view of identity service

Centralized chat platforms are able to automatically detect which entries of
the phone address book are known by the platform, then automatically propose
those names when user clicks on "new discussion".

The Matrix-Identity-Service has already a secured mechanism able to be used
for this _(lookup)_. However, the identity service is only able to answer
with data it knows _(ie submitted lookups)_.

## Proposal

The goal of this proposal is to add a mechanism to provide an unified
view of identity service without centralizating user's data.

### Changes

All of this changes affects [identity-service-api.md](https://github.com/matrix-org/matrix-spec/blob/main/content/identity-service-api.md)

#### POST `/_matrix/identity/v2/lookup`

A new key is added in response, `third_party_mappings`. It permits to the
identity service to answer that it doesn't know this 3PID but knows where
to find it:

```json
{
"mappings": {
"4kenr7N9drpCJ4AfalmlGQVsOn3o2RHjkADUpXJWZUc": "@alice:example.org"
},
"third_party_mappings": {
"matrix.domain.com:8448": [
"nlo35_T5fzSGZzJApqu8lgIudJvmOQtDaHtr-I4rU7I"
]
}
}
```

#### Establishing associations

##### POST `/_matrix/identity/v2/lookups`

A new endpoint, reserved to trusted servers, will allow to declare a list
of hashes owned by the (trusted) server. Hashes are calculated using the
pepper of recipient server.

Request body:

```json
{
"algorithm": "sha256",
"pepper": "matrix_rocks",
"mappings": {
"matrix.domain.com:8448": [
"nlo35_T5fzSGZzJApqu8lgIudJvmOQtDaHtr-I4rU7I"
]
}
```

## Potential issues

To avoid conversation hijacking, only trusted server should be allowed to push
a list of owned hashes.

## Security considerations

This proposal is based on current Matrix-Identity-Service security mechanisms.
Only the new endpoint should accept request only from trusted server.

0 comments on commit a9910e1

Please sign in to comment.