Fix Education Edition support#336
Open
SendableMetatype wants to merge 1 commit into
Open
Conversation
- StartGamePacket: three Education-specific string fields after ownerId in LevelSettings, plus EducationStartGameSerializer_v898 to read/write them, plus EDUCATION_CODEC variant on Bedrock_v898 - EncryptionUtils: EDUCATION_PUBLIC_KEY trust anchor (Microsoft's MESS signing key), createHandshakeJwt overload embedding the signedToken claim, three-layer token validation API mirroring validatePayload (validateEducationPayload / extractServerTokenFromEduTokenChain / validateEducationToken) - EducationTokenValidationResult value class with VALID/EXPIRED/INVALID status and tenantId/oid/expiry accessors - Round-trip test for the Education StartGame serializer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The library already maintains packets, data types, and fields for Education Edition, but Education clients can't actually use any of it because they desync on
StartGamePacketbefore any subsequent packets can be exchanged. Education Edition's wire format has three extra string fields at the end of LevelSettings that the current serializer doesn't write, causing the client's deserializer to read into subsequent packet data and disconnect. This PR fixes the serialization and adds the auth utilities needed to verify Education login tokens.Changes
Codec: Three new fields on
StartGamePacket, anEducationStartGameSerializer_v898extending the existing one, andBedrock_v898.EDUCATION_CODECas a parallel constant.Auth: Education clients don't use Xbox Live. Their login chains are self-signed and
validateChainalways returnssigned=false. This adds validation for Microsoft's education services (MESS) signed tokens and acreateHandshakeJwtoverload for thesignedTokenclaim education clients require, following the existing patterns inEncryptionUtils.When Education updates to a newer protocol version, adding support requires only a new serializer and
EDUCATION_CODECconstant on that version's class.I have detailed documentation on the Education Edition protocol differences and authentication system if needed.