Skip to content

fix: Scope Cloud API reply inboxes to their network - #17

Open
frederickbaier wants to merge 1 commit into
mainfrom
fix/network-scoped-nats-inboxes
Open

frederickbaier wants to merge 1 commit into
mainfrom
fix/network-scoped-nats-inboxes

Conversation

@frederickbaier

@frederickbaier frederickbaier commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Cloud API requests currently use global NATS reply inboxes, allowing clients in other networks to observe their replies. Set <network-id>._INBOX in the shared Java connection options and Go SDK connection builder. Existing request/response payloads and responder code stay unchanged, and recreated connections retain the prefix. The Go SDK applies the required prefix after caller options so an override cannot accidentally restore global inboxes.

Deploy the compatible controller before rolling out these clients. Publish the affected Java platform/plugin artifacts and Go SDK; updating a serverhost alone does not update loaded Cloud API plugins. Existing game/proxy processes must restart with the new artifacts before their network's legacy inbox permissions are removed.

Validation: all 58 :api:test Java tests passed with JDK21 and NATS_TEST_URL set to an isolated NATS 2.11.8 broker; Go go test -race ./... passed against the same broker. Tests check actual request reply subjects, reconnects, Go connection recreation, both Go request styles, and caller-option handling. Independent code review completed before commit.

No database migrations or protobuf changes. Custom Go inbox-prefix options are intentionally overridden by the network prefix and are documented. Broker integration tests skip unless NATS_TEST_URL is configured.

Deployment dependency: https://github.com/simplecloudapp/platform-controller/pull/108. Companion serverhost/wrapper migration: https://github.com/simplecloudapp/platform-serverhost/pull/36.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant