Using an instance actor for mitigating the authorized fetch key retrieval bug seems strange to me so I dug into the historical record to try to understand how this all evolved. Clarifications, corrections or additional information are welcome (with references, please).
From looking at the history of this topic (AP issue tracker, Mastodon issue tracker, IRC chats), it looks like the root cause of these issues is the “#main-key” URI fragment, which caused the key and profile to effectively be effectively the same dereferenced document (although different resources).
The “#main-key” fragment was included in an example from the ActivityPub community, which was inspired by the LD Signature README. Mastodon devs then merged support based on that example in 2017. There was no discussion about authorized fetch issues at the time because it wasn’t added to Mastodon until 2019. Initially, with authorized fetch enabled, the public key and a few other profile properties would be returned (to avoid the sig verification ping-pong bug).
Actors can still be fetched without signature, but return only technical attributes
The “technical details” included the public key information. A Pleroma developer suggested using an “instance actor” for this purpose (“mitigation”), but that wasn’t immediately implemented by the Mastodon team.
In Pleroma, we plan on using an instance-specific actor to represent the fetches for this mitigation.
Later, the Mastodon team restricted all access to regular account profiles. They noted:
This isn’t really an improvement in security, as the only information that was previously returned was required protocol-level info, and the only personal bit was the existence of the account. The existence of the account can still be checked by issuing a webfinger query, as those are accepted without signatures.
If I understand the comments correctly, the primary motivation was protecting other instances from storing the limited actor profiles after an unsigned fetch in authorized fetch mode.
However, this change makes it so that unallowed instances won’t create account records on their end when they find a reference to an unknown account.
By that time, the Mastodon team had added an “instance actor” for other purposes, so they decided to use the mitigation the Pleroma developer has previously suggested.
This feels like a Fediverse bug to me that could have been avoided by allowing the actor’s public key resource to be dereferenced separately, and without verifying a signature, from the actor profile document. For example, it looks like making the key URI something like https://server.example/actor/bob/main-key
instead of https://server.example/actor/bob#main-key
could have prevented several (maybe all?) of these issues.