Expand description
Unified EventService publisher/subscriber (epic #600).
Public publishers preserve the existing plaintext MoQ event path. Confidential publishers use controller-managed group epochs: the controller atomically prepares and commits each membership-version/epoch transition, then distributes the fresh epoch secret separately to each accepted member with HyKEM (X25519 + ML-KEM-768) and COSE_Encrypt0. The stock relay only forwards opaque event bytes and never receives an epoch grant.
Event objects derive distinct sender/track AEAD keys and deterministic nonce domains from the epoch secret. Their AAD binds publisher, track, membership version, epoch, and sequence; subscribers reject nonce misuse, replay, unknown epochs, and retired objects. Publisher identity is anchored by the controller grant and attested with mandatory Ed25519 + ML-DSA-65 composite signatures. Ed25519 keys and subscriber-generated blinded Ristretto presentations are never used as KEX keys.
§Wire format
EventPrivacy::Public publishes payloads unmodified. Confidential modes encode
an EncryptedEvent as a versioned, length-prefixed MoQ payload:
[1B version][16B session_id][12B nonce][16B key_commitment]
[4B tag_len][tag][4B ciphertext_len][ciphertext][4B lk_tag_len][lk_tag]
[8B timestamp BE][8B membership_version][8B epoch][8B sequence]
[32B publisher_pubkey][4B signature_len][hybrid signature]The topic remains the MoQ frame topic. It is authenticated by the hybrid signature; deployments requiring routing opacity bind the controller’s opaque routing policy into each member grant.
Re-exports§
pub use crate::crypto::group_key::EncryptedEvent;pub use crate::crypto::group_key::RekeyPolicy;pub use crate::crypto::group_key::RotationResult;pub use crate::crypto::group_key::WrappedKeyEntry;pub use crate::crypto::group_key::DEFAULT_ROTATION_INTERVAL;pub use crate::crypto::group_key::GRACE_PERIOD;pub use crate::crypto::group_key::MAX_KEY_LIFETIME;
Structs§
- Allow
AllEvent Authz - Explicit permissive authz for callers that deliberately construct a public firehose or a test fixture. It is never an implicit fallback.
- Deny
AllEvent Authz - Fail-closed authz: denies every publish/subscribe. The default for the
encrypted (
ZeroKnowledge/LimitedKnowledge) profile — MAC deny-by-default by construction. Production wires a real UCAN/capability-backed impl (S3/S4 vocab on main) viaEventPublisher::with_authz. - Event
Publisher - The canonical broadcast event publisher (EV1, epic #600).
- Event
Publisher Anchor - Externally anchored controller-authorized hybrid publisher identity.
- Event
Subscriber - Canonical EventService subscriber. Public tracks pass through. Confidential tracks are installed only from per-member HyKEM/COSE controller grants.
- MacEvent
Authz - Adapter from the canonical MAC contract to the event authorization surface.
- Publisher
Identity - The publisher’s verified identity (EV4 authn-on-publish). Binds a publish to a DID when the verified identity is available.
- Rekey
Event - A pending controller epoch notification.
Constants§
- DEFAULT_
SUBSCRIBER_ GRACE_ PERIOD - Maximum grace period in which a subscriber accepts authenticated objects from the prior epoch, bounded by the controller-supplied last-issued sequence. Security-triggered transitions install zero grace.
- INTERNAL_
EVENT_ SOURCES - Reviewed native health/lifecycle producers. Worker workflows are separate.
- MAX_
REPLAY_ WINDOW - Maximum accepted event identities retained for one subscriber prefix. Older identities age out of this replay window rather than growing memory for the entire lifetime of a long-running epoch.
Traits§
- Event
Authz - The caller attempting an event-plane op (
publish/subscribe). Carries the verified subject identity (a DID when available). Until #446 lands, IPC callers may resolve asanonymous— seePublisherIdentity.
Functions§
- event_
authz_ installed - Whether the process-wide event reference monitor has been installed.
- install_
event_ authz - Install the process-wide production event authorization adapter.
- install_
network_ event_ identity - Bind Event publishers/subscribers before construction in a single-identity native process. A later service cannot silently replace that process identity.
- installed_
event_ authz - Clone the process reference monitor for authenticated network Event sessions.