Skip to content
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

[WIP] MSC2301: server info endpoint #2301

Draft
wants to merge 3 commits into
base: old_master
Choose a base branch
from
Draft

Conversation

ara4n
Copy link
Member

@ara4n ara4n commented Sep 23, 2019

We turn /versions into a more generic unauthed server /info endpoint, suitable for sharing branding information to clients before they login or register.

Open question on whether to use a server info room to store the bulk of the data or not.

Rendered

@ara4n ara4n added the proposal A matrix spec change proposal label Sep 23, 2019
@aaronraimist
Copy link
Contributor

So this is an alternate way to do #1929?

@grinapo
Copy link
Contributor

grinapo commented Sep 23, 2019

Also #2063?

We have many different APIs for querying server capabilities and configuration:

* `/_matrix/client/versions` tells you what CS API versions your server supports (unauthed)
* `/_matrix/media/r0/config` tells you the capabilities of your media repository (unauthed)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
* `/_matrix/media/r0/config` tells you the capabilities of your media repository (unauthed)
* `/_matrix/media/r0/config` tells you the capabilities of your media repository (authed)

* `/_matrix/client/r0/capabilities` tells you whether your server supports various optional capabilities (but is authed)
* `/_matrix/federation/v1/capabilities` (MSC2127) is a proposal to tell you when you can upgrade rooms or not (authed as server)
* MSC2233 as a rejected un-authed capabilities endpoint
* System Alerts (as a way of sharing server updates with users)
Copy link
Member

Choose a reason for hiding this comment

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

We call them server notices: https://matrix.org/docs/spec/client_server/r0.5.0#module-server-notices

Suggested change
* System Alerts (as a way of sharing server updates with users)
* Server Notices (as a way of sharing server updates with users)


```json
{
"m.brand.server_name": "Matthew's Server",
Copy link
Member

Choose a reason for hiding this comment

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

why are we not using objects for m.brand?

"m.brand.server_name": "Matthew's Server",
"m.brand.server_info": "Where all the cool kids hang out",
"m.motd": "This server will be upgraded on Oct 1st",
"m.server_admin": "@admin:example.com",
Copy link
Member

Choose a reason for hiding this comment

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

what if my admin is an email address? what if there's many?

}
```

## Alternatives
Copy link
Member

Choose a reason for hiding this comment

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

Needs comparison to #1929 and #2063 (per comments)

@@ -0,0 +1,75 @@
# Proposal for an /info endpoint on the CS API

## Problem
Copy link
Member

Choose a reason for hiding this comment

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

@bwindels
Copy link
Contributor

How would clients receive updates to the info data? Periodic polling of the endpoint?

@ara4n
Copy link
Member Author

ara4n commented Oct 23, 2019

ugh, i tried to enumerate all the existing prior art in the 7 bullet points at the beginning of this, but apparently missed #1929 and #2063. sorry. what a mess.

@grinapo
Copy link
Contributor

grinapo commented Nov 13, 2019

ugh, i tried to enumerate all the existing prior art in the 7 bullet points at the beginning of this, but apparently missed #1929 and #2063. sorry. what a mess.

So, let's see what's in #2063 (API):

  • - whether server supports (open) registrations
  • - number of registered accounts
  • - number of active accounts (with events) in last week/month/6moths
  • - server uptime

As in #1929 (well-known):

  • server admins (matrixid, email, role) (proposal m.server_admin can't list multiple roles and contact methods)
  • support webpage (url)

I would also add for this static well-known page:

  • server name (m.brand.server_name)
  • server description (m.brand.server_info)
  • server home country
  • server preferred countries

Possibly all of those are optional.

The fediverse Aggregator site for example expects to display the following stats for nodes:

  • users at node (that is in the proposal)
  • active users in timeframe (last month and 6 months are in the stats)
  • local posts / comments (this is probably irrelevant for an e.consistent network, and may leak unwanted data about local-only rooms - or maybe the opposite: would show which homeservers have a very active local community)

1929 is actually implemented by some sites already. ;-)

@jaywink
Copy link
Member

jaywink commented Nov 14, 2019

It would be great to have all the necessary info in one endpoint, ie server metadata type info and usage info, to avoid consumers needing to poll several endpoints. Server metadata is no more static than usage information, so any site building a list of for example available Matrix sites would still have to consume both.

<community hat>
I tried to model the necessary information in a new project called ServiceInfo, which was planned to be suitable for usage cross-platform. It's unfinished since there wasn't too much interest in it, a lot of the federated web (unfortunately) going with NodeInfo. But just pointing as an idea of what I'd personally like for Matrix to also export for consumers like the-federation.info.
</community hat>

@turt2live
Copy link
Member

(please let's move to a thread before this becomes a longer conversation)

@turt2live turt2live changed the title MSC2301: server info endpoint [WIP] MSC2301: server info endpoint Dec 7, 2019
@turt2live turt2live added the kind:feature MSC for not-core and not-maintenance stuff label Apr 20, 2020

## Alternatives

We could put this data into a peekable room instead (particularly so we then get sync updates for free).

Choose a reason for hiding this comment

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

We don't really need that here. A normal static endpoint should be just fine. It is probably only ever called once, when the user is trying to decide on which homeserver to register on.

Copy link
Contributor

Choose a reason for hiding this comment

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

Peekable rooms also would make this harder to access from the outside in my opinion.

@MTRNord
Copy link
Contributor

MTRNord commented Sep 30, 2020

Hi, I like this. I would love to have some additional fields however as I am working with some people on a mastodon alike server/community finder and some more metadata would be nice to have.

For us missing fields are:

  • Link or text for server rules
  • Registration Status. (While this can be taken from the server api itself it seems still reasonable to have it here. As it would make 2 states possible: Fully disabled, registration on invites, open registration.)
  • The m.server_admin Should probably be an array as there might be more than one admin for a server.
  • A list of categories. (While the above things above would be applying for more general stuff this mainly applies for usage with a serverlist as that allows the serverlist to easily determine the servers topics. This might also be useful for public roomlists however where clients use the serverlist as provider for servers in the roomlists. But this idea is something for another discussion)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:feature MSC for not-core and not-maintenance stuff needs-implementation This MSC does not have a qualifying implementation for the SCT to review. The MSC cannot enter FCP. proposal A matrix spec change proposal
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants