Class TransportIdentityBinding

java.lang.Object
org.cloudburstmc.netty.util.nethernet.TransportIdentityBinding

public final class TransportIdentityBinding extends Object
Ties the Bedrock login chain to the identity that opened the transport.

On RakNet the encryption handshake does this on its own: the session key comes out of an ECDH against the chain's identity key, so only its holder can read what follows. NetherNet runs over DTLS and skips that handshake, which leaves the chain unbound, and a chain is replayable until something binds it. The signaling assertion binds it here, because the peer proved it holds the key the assertion names before the transport was accepted, and that is the same key the chain is signed with.

Checking the two agree is what makes a login chain meaningful rather than merely well formed.

See Also:
  • Method Details

    • install

      public static void install(io.netty.channel.Channel channel, IdentityKeyVerifier verifier)
      Install before publishing the child. The channel and admission owner may both close it.
    • forPlayer

      public static IdentityKeyVerifier forPlayer(PlayerInfo player)
    • acceptForwardedIdentity

      public static String acceptForwardedIdentity(io.netty.channel.Channel channel)
      Release only after the application has accepted its existing trusted forwarding identity.
    • mismatch

      public static String mismatch(io.netty.channel.Channel channel, PublicKey identityPublicKey)
      Parameters:
      channel - The channel the login arrived on
      identityPublicKey - The key the login chain is signed with
      Returns:
      Why the login must be rejected, or null when the two agree