NetworkKeyAuthority

public final class NetworkKeyAuthority

Establishes the proxy's network identity. The proxy is the authority: it owns the key and hands it to backends, rather than every component independently deriving one and hoping the results agree.

Resolution order:

  1. the persisted network-key file — the steady state
  2. a one-time seed from Floodgate's key.pem, if present
  3. a freshly minted key

The seed exists so an upgrade is invisible. Every network that works today derives its key from key.pem; seeding from the same file yields the same value, so a proxy that upgrades before its backends stays linked to them throughout the rollout. After the first boot the key is on disk and key.pem is never read again.

Unlike the previous implementation, a missing Floodgate file is not fatal. It never should have been: Floodgate is a Bedrock authentication plugin, and requiring it prevented Java-only networks from using RSPM's proxy features at all.

Deliberately logger-free so it stays platform-neutral and testable. The caller inspects Resolution and logs in its own platform's voice.

Types

Link copied to clipboard
public final class Resolution
Outcome of resolution: the key, where it came from, and whether it survived to disk.
Link copied to clipboard
public enum Source
Where a resolved key came from.

Properties

Link copied to clipboard
public final static String KEY_FILENAME
File under the proxy's data directory holding the raw key.

Functions

Link copied to clipboard
public static NetworkKeyAuthority.Resolution resolve(Path dataDir, Path floodgateKeyPem)
Resolves this proxy's network key, persisting it when newly established.