FEP 65ca - Common Client Configuration

This FEP proposes Common Client Configuration: a /.well-known/activitypub-client-config endpoint that links to a JSON document describing a server’s upload, composer and account limits, plus links to account pages like password reset.

Today clients hardcode limits per platform or only find out after a request is rejected. This gives them one software-neutral way to discover what a server accepts.

1 Like

The FEP describes the limits of “a standard, newly registered account”. I think this does not work for a lot of servers:

  • Servers with closed registration, like single-user instances, invite-only servers or personal sites, have no newly registered account to describe.
  • On servers where posting or uploading depends on the role of an account, the baseline account can be very limited. On WordPress, for example, a newly registered account is a subscriber by default, and subscribers can’t post or upload at all. So the document would say max_attachments: 0, which is correct, but useless for the authors and editors who actually use a client.

The FEP already says that some accounts may have different limits and that it does not express those. I think that is the case clients care about most. Two ideas:

  • define the baseline as “an account that is allowed to post”, or
  • allow the configuration document to vary when the request is authenticated (with Vary: Authorization), so a client gets the limits of the account it is logged in with.

The second option is probably closer to what clients need, but it changes the “same document for everyone” rule.

1 Like

Good points, and yeah I think an authorized variant would better describe the limits based on the current account, I will update the FEP to address this, thanks for your feedback.

1 Like

I have updated the FEP!

1 Like

Thanks a lot, that looks good to me! The new “default account” definition also covers single-user sites.

I have a minimal implementation for WordPress in PR #3961 (Add FEP-65ca client configuration by pfefferle · Pull Request #3961 · Automattic/wordpress-activitypub · GitHub). For now it only serves the default document. I will probably add the account-scoped document together with media uploads, when there are real per-account limits to report.

One thing I noticed while checking it against our code: the rule to return 200 for an invalid or expired token means the endpoint has to skip the normal token check. Most auth layers reject an invalid token before the route runs. I think the rule is right, but it might be worth a short note for implementers.

1 Like

+1 for NOT using NodeInfo

But why introduce a new discovery protocol? Most AP servers already have an application actor, which is a good place for advertising server limits and other info. There is even a standardized discovery method, described in FEP-d556: Server-Level Actor Discovery Using WebFinger, which is similar to what you propose.

Another good place for client config is /.well-known/oauth-authorization-server, which servers that support OAuth may already implement (Mastodon: https://docs.joinmastodon.org/methods/oauth/#authorization-server-metadata).

I also think reusing the application actor would be better here. Servers already use it to advertise supported FEPs (including us on welley.social). Adding a link to the client configuration there would keep discovery in one place and reuse an existing mechanism.

1 Like

Some problems with using .well-known/oauth-authorization-server:

  • It might be served by a different application. Some people want to use existing OAuth servers rather than rolling their own.
  • It might not exist at all; there’s no requirement for an instance to use OAuth.
  • People might want to use one OAuth server for multiple instances and/or other pieces of software.
  • The values in this file are defined by IANA and there’s a risk of conflicts if people start adding ActivityPub stuff to it.

Generally I think OAuth shouldn’t be treated as “part of” ActivityPub - it’s a lower layer protocol which ActivityPub builds on top of.

1 Like