feat: enforce Bedrock identity envelopes#51
Merged
Conversation
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.
Summary
bedrock-identityconfig withdisabled,warn, andrequiremodesBedrockIdentityEnforceraroundminekube:bedrock_identityenvelope verification, replay protection, support-safe warnings, and require-mode rejection decisionsTrust boundary note
Connect Java currently knows endpoint name and session ID locally, but not endpoint ID or org ID across both WatchService and libp2p login contexts. This PR therefore verifies the Moxy signature, session, protocol, endpoint name, and expected Bedrock policy. Full endpoint/org equality enforcement remains a follow-up once those IDs are carried into local login context or provided through key metadata.
Verification
Sequentially run after implementation:
./gradlew :core:test --tests com.minekube.connect.config.ConfigLoaderTest --no-daemon./gradlew :core:test --tests com.minekube.connect.api.player.bedrock.BedrockIdentityVerifierTest --no-daemon./gradlew :core:test --tests com.minekube.connect.bedrock.BedrockIdentityEnforcerTest --no-daemon./gradlew :spigot:test --tests com.minekube.connect.addon.data.SpigotDataHandlerTest --no-daemon./gradlew build --no-daemongit diff --checkRefs minekube/moxy#403
Refs minekube/moxy#396