Skip to content

MSC4266: Policies in /.well-known/matrix/support #4266

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 82 additions & 0 deletions proposals/4266-policies.md
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implementation requirements:

  • Server publishing this
  • Client using this

Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# MSC4266: Policies in `/.well-known/matrix/support`

Matrix supports collecting policy consent from users during [account
registration]. There is, however, no API allowing clients to retrieve the
policies again at a later point. This requires the user to manually store them
upon registration to be able to refer to them again.

Furthermore, some policies, such as the privacy policy, might be relevant for
users of other homeservers. Again, these users' clients have no way to
programmatically retrieve the server's policies.

The present proposal addresses this situation by publishing the policies in the
server's support document under [`/.well-known/matrix/support`].

## Proposal

A new optional property `policies` is added to the response of
[`/.well-known/matrix/support`]. The format is the same one used during
[registration][account registration].

``` json5
{
"contacts": [ ... ],
"support_page": ...,
"policies": {
"privacy_policy": {
"en": {
"name": "Privacy Policy",
"url": "https://example.org/somewhere/privacy-1.2-en.html"
},
"fr": {
"name": "Politique de confidentialité",
"url": "https://example.org/somewhere/privacy-1.2-fr.html"
},
"version": "1.2"
},
"terms_of_service": {
"en": {
"name": "Terms of Service",
"url": "https://example.org/somewhere/terms-1.2-en.html"
},
"fr": {
"name": "Conditions d'utilisation",
"url": "https://example.org/somewhere/terms-1.2-fr.html"
},
"version": "1.2"
}
}
}
```

If the request is authenticated, the server SHOULD respond with the latest
version of the policies that the user consented to.
Comment on lines +52 to +53
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On second thought, I suspect this might be tricky to do for .well-known files because these usually contain static content only. A dedicated /policies endpoint might be better after all.


## Potential issues

None.

## Alternatives

It might be debatable whether policies represent "support" information. Instead
of repurposing the support document, the policies could also be made available
via a dedicated endpoint.

Instead of querying the server, the client could store the policies in the
user's account data. If [encrypted] this would prevent the server from tampering
with the policies the user has consented to. This would, however, not allow
external users to retrieve the policies.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From a homeserver administration and moderation perspective and just a community moderation perspective having access to the policies of remote servers is very useful. Policy documents for a remote server can give an initial impression of if the server has compatible policies with a given community or not.


## Security considerations

The server could fake the terms and respond with a version that is different
from the one the user consented to.

## Unstable prefix

While this proposal is unstable `policies` should be referred to as
`org.matrix.msc4266.policies`.

[account registration]: https://spec.matrix.org/v1.13/client-server-api/#terms-of-service-at-registration
[`/.well-known/matrix/support`]: https://spec.matrix.org/v1.13/client-server-api/#getwell-knownmatrixsupport
[encrypted]: https://spec.matrix.org/v1.13/client-server-api/#secret-storage