Skip to content

Fix Paper shared connection access before plugin enable - #14

Merged
remdui merged 8 commits into
mainfrom
fix/paper-shared-connection-access
Jul 27, 2026
Merged

Fix Paper shared connection access before plugin enable#14
remdui merged 8 commits into
mainfrom
fix/paper-shared-connection-access

Conversation

@remdui

@remdui remdui commented Jul 27, 2026

Copy link
Copy Markdown
Member

What changed

  • Keep every installed Paper plugin name in a dedicated policy-validation registry, including plugins that have not enabled yet or are temporarily disabled.
  • Issue active caller identities only to enabled plugins; disabled plugins are known for configuration validation but receive no active capability identity.
  • Retain installed-plugin knowledge across PluginDisableEvent while invalidating the disabled plugin's active identity and unregistering its database handles.
  • Add regression coverage for startup ordering, disabled-plugin identity isolation, disable/re-enable lifecycle semantics, and full shutdown invalidation.

Root cause

Paper previously treated only already-enabled plugins as known. DataRegistry requests player_data_rw before ServerFeatures enables, so the valid shared_with: [ServerFeatures] declaration was rejected as referencing an unknown plugin. Velocity already discovers installed plugins before plugin work begins, which is why ProxyFeatures did not encounter the same failure.

Security model

Configuration knowledge and caller authority are deliberately separate:

  • installed plugin names may appear in access policies regardless of enable order;
  • only enabled plugins can bind an API identity;
  • disabling a plugin invalidates its active identity and closes its registrations;
  • DataProvider shutdown clears both registries.

Production configuration

player_data_rw:
  access:
    owner_plugin: DataRegistry
    shared_with:
      - ServerFeatures

This resolves both observed startup modes: DataRegistry no longer rejects the policy with InvalidConnectionAccessPolicyException, and ServerFeatures is no longer denied with ConnectionAccessDeniedException.

@remdui
remdui merged commit c61b423 into main Jul 27, 2026
7 checks passed
@remdui
remdui deleted the fix/paper-shared-connection-access branch July 27, 2026 15:15
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