Skip to content

feat: external invite + ExternalCommitPolicy component + external_committer_permissions - #334

Merged
tylerhawkes merged 1 commit into
mainfrom
feature/external-invite
May 26, 2026
Merged

tylerhawkes merged 1 commit into
mainfrom
feature/external-invite

Conversation

@tylerhawkes

@tylerhawkes tylerhawkes commented May 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

QR-invite wire format + new EXTERNAL_COMMIT_POLICY well-known component + per-component external-committer policy block, all in xmtp.mls.message_contents. Sits on top of #333 (the generic AppData intent proto).

Three additions:

  1. ExternalInvitePayload + EncryptedGroupInfoBlob (external_invite.proto) — wire format for QR-code / link-based joining via MLS External Commits. Blob carries plaintext epoch (uint64) and group_state_hash (bytes) so the external invite-storage service can do monotonic ordering and fork detection without seeing plaintext GroupInfo.

  2. ExternalCommitPolicyV1 + ExternalCommitPolicyEntry (external_commit_policy.proto) — new well-known component carrying:

    • allow_external_commit: bool — defense-in-depth master switch
    • expires_at_ns: uint64 — wall-clock auto-disable for time-bounded invite campaigns
    • expire_in_ns: uint64 — max staleness of the GroupInfo referenced by an external commit
  3. external_committer_permissions: ComponentPermissions field added to ComponentMetadata — sibling of the existing permissions block. Governs per-component what external committers may do. Absent = all-Deny.

Together these form the two-layer authorization model for the QR-invite flow: a runtime-toggleable master switch + per-component declarative external-committer capabilities. See libxmtp PR #3666 for the consuming code.

Test plan

  • Pinned in libxmtp at SHA 424fdd061d41bdd7e81185735329de414dfd8e4c.
  • libxmtp regen succeeds.
  • Helper round-trip tests pass in libxmtp PR #3666.

🤖 Generated with Claude Code

Note

Add external invite, ExternalCommitPolicy, and external_committer_permissions protobuf definitions

  • Adds external_invite.proto defining ExternalInvitePayloadV1 (service pointer, external group ID, symmetric key) and EncryptedGroupInfoBlobV1 (nonce, ciphertext, epoch, state hash, expiry) with versioned envelope wrappers for both.
  • Adds external_commit_policy.proto defining ExternalCommitPolicyV1 with fields for allow/deny, expiry, and symmetric key, plus a versioned ExternalCommitPolicyEntry envelope.
  • Adds external_committer_permissions (field 3) to ComponentMetadata in component_permissions.proto, scoped to MLS External Commits, while clarifying that the existing permissions field applies only to regular member-issued commits.
  • All new messages use versioned oneof wrappers for forward-compatible parsing; existing serialized messages are unaffected.

Macroscope summarized 2bef315.

@tylerhawkes
tylerhawkes requested a review from a team as a code owner May 21, 2026 02:18
@macroscopeapp

macroscopeapp Bot commented May 21, 2026 •

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs human review

This PR introduces new protocol buffer definitions for a significant new feature (external invite / QR-code group joining) involving security-sensitive concepts like encryption keys and authorization policies. While purely schema definitions owned by the author, new security-related protocol designs benefit from human review.

You can customize Macroscope's approvability policy. Learn more.

@tylerhawkes
tylerhawkes force-pushed the feature/external-invite branch 6 times, most recently from c79fdde to da732ea Compare May 21, 2026 23:09
@tylerhawkes tylerhawkes mentioned this pull request May 22, 2026
1 of 3 tasks
@tylerhawkes
tylerhawkes force-pushed the feature/generic-appdata-intent branch from 7b8260c to de79332 Compare May 26, 2026 19:59
Base automatically changed from feature/generic-appdata-intent to main May 26, 2026 20:02
…mitter_permissions

- Add ExternalInvitePayload + EncryptedGroupInfoBlob messages
  (external_invite.proto). Blob carries plaintext epoch +
  group_state_hash for service-side ordering / fork detection.
- Add EXTERNAL_COMMIT_POLICY component proto
  (external_commit_policy.proto): ExternalCommitPolicyV1 carries
  allow_external_commit + expires_at_ns + expire_in_ns. Toggleable via
  AppDataUpdate(EXTERNAL_COMMIT_POLICY).
- Add external_committer_permissions: ComponentPermissions field to
  ComponentMetadata. Sibling of the existing permissions field;
  governs MLS External Commits per-component. Absent = all-Deny.

Together these provide the two-layer authorization for the QR-invite
flow: EXTERNAL_COMMIT_POLICY is the runtime-toggleable master switch
with time-window controls, and each component declares per-action
capabilities for external committers in its own
ComponentMetadata.external_committer_permissions block.
@tylerhawkes
tylerhawkes force-pushed the feature/external-invite branch from da732ea to 2bef315 Compare May 26, 2026 20:06
@tylerhawkes
tylerhawkes merged commit 7db4606 into main May 26, 2026
7 checks passed
@tylerhawkes
tylerhawkes deleted the feature/external-invite branch May 26, 2026 21:46
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 3.92.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

tylerhawkes added a commit that referenced this pull request Jun 9, 2026
…fresh_pointers, AAD + effective expiry, admitted_via tag

Follow-up to #334, mirroring the revised XIP-82 (xmtp/XIPs#140). See
the PR body for the full breakdown.

Also extends the local-only AppDataUpdateData.V1 intent with repeated
additional_updates so writes whose invariants couple components
atomically (XIP-82 enable atomicity: policy + GROUP_MEMBERSHIP grant)
can land in one commit.
tylerhawkes added a commit that referenced this pull request Jun 9, 2026
…fresh_pointers, AAD + effective expiry, admitted_via tag

Follow-up to #334, mirroring the revised XIP-82 (xmtp/XIPs#140). See
the PR body for the full breakdown.

Also extends the local-only AppDataUpdateData.V1 intent with repeated
additional_updates so writes whose invariants couple components
atomically (XIP-82 enable atomicity: policy + GROUP_MEMBERSHIP grant)
can land in one commit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants