yushijinhun / authlib-injector

Build your own Minecraft authentication system.
https://authlib-injector.yushi.moe
GNU Affero General Public License v3.0
728 stars 66 forks source link

Proposal: support multiple signaturePublickeys #229

Open evan-goode opened 8 months ago

evan-goode commented 8 months ago

This PR allows authentication servers to specify an array of profile property public keys instead of just one.

I propose adding a new field, signaturePublickeys, to the authlib-injector metadata route at the root of the API. signaturePublickeys is an array of strings containing public keys in the same format as the signaturePublickey. Any of the keys specified either in signaturePublickeys or as the signaturePublickey can be used to verify the signature of a textures payload. Authentication servers aren't required to use the new field; signaturePublicKeys is simply ignored if it's missing from the metadata response.

With this change, authentication server A could forward a texture payload from authentication server B, and the client could accept a texture signed by either authentication server. Currently, this forwarding only works with Mojang as authentication server B, since Mojang's public key is hardcoded (mojang-publickey.der).

Wiki updates would be needed following this PR.