-
Notifications
You must be signed in to change notification settings - Fork 71
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
Proposal: support multiple signaturePublickeys #229
base: develop
Are you sure you want to change the base?
Proposal: support multiple signaturePublickeys #229
Conversation
But perhaps this new field should be renamed to |
If (For the previous two options) give them two at the same time for compatibility won't make much sense since profiles will be signed with multiple possible keys and verification will fail anyway. |
Allow authentication servers to specify an array of profile property public keys and an array of player certificate public keys, similar to Mojang's https://api.minecraftservices.com/publickeys route. Adds two new fields, `playerCertificateKeys` and `profilePropertyKeys`, to the authlib-injector metadata route at the root of the API. Both are arrays of strings containing public keys in the same format as the `signaturePublickey`. If `signaturePublickey` is specified, it will be counted as both a player certificate key and a profile property key, which is the status quo. With this change, authentication server A can forward a texture payload from authentication server B, and the client could accept a texture signed by either authentication server. This change also allows more flexibility for authentication server operators. Resolves yushijinhun#254.
As of 1.20, the game now loads profile property public keys and player certificate public keys dynamically from https://api.minecraftservices.com/publickeys. That route is currently replying with more keys than just Mojang's original `ylB4B6m5` key, so we should embed all of these into authlib-injector rather than just the one. This may not be a good solution long-term if the keys change, ideally the keys could be fetched dynamically like the vanilla game does.
3c11492
to
0f75d90
Compare
I reworked this to add One caveat is that authlib-injector would need to fetch
I think you're right, it doesn't matter much. In this PR's current state, the old |
Looks good, if a full document is given. |
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 thesignaturePublickey
. Any of the keys specified either insignaturePublickeys
or as thesignaturePublickey
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.