Skip to content

Require event subscriptions to be read-only and non-destructive - #13

Open
tsarlandie-oai wants to merge 1 commit into
mainfrom
tsarlandie/read-only-event-subscriptions
Open

tsarlandie-oai wants to merge 1 commit into
mainfrom
tsarlandie/read-only-event-subscriptions

Conversation

@tsarlandie-oai

Copy link
Copy Markdown

Event subscriptions should observe application activity without changing it. Require subscriptions to be read-only and non-destructive throughout setup, refresh, polling, streaming, delivery, reconnect/replay, and cleanup, across every argument combination and delivery mode.

Subscription operations must not modify application data, memberships, or permissions, or initiate application work. For example, subscribing to messages must not mark them as read or join a channel. Such actions require a separate, explicitly authorized operation. State used solely to observe and deliver the authorized stream—such as listeners, leases, queues, and cursors—remains permitted.

Update the lifecycle example to register and remove a listener over an already-authorized message feed, replacing the channel join/leave example, and add the corresponding threat-model entry.

This changes the proposed behavioral requirements without adding annotation fields or changing the wire format. Implementations that mutate application state while subscribing would need to separate those mutations into explicitly authorized operations. The wording is a proposal for WG review.

Validation: the final patch applies cleanly to current main (d5316be), passes whitespace checks, preserves all JSON/JSONC examples, and the revised lifecycle example parses as Python without execution. Documentation only; no runtime or interoperability tests.

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