Skip to content

feat(session): Validate MLS commit proposals and group identities#26

Merged
thomas-vilte merged 1 commit into
mainfrom
dev
Jul 6, 2026
Merged

feat(session): Validate MLS commit proposals and group identities#26
thomas-vilte merged 1 commit into
mainfrom
dev

Conversation

@thomas-vilte

@thomas-vilte thomas-vilte commented Jul 6, 2026

Copy link
Copy Markdown
Owner

Overview

This PR introduces crucial validation steps for MLS commit proposals and group identities within the session management. It ensures compliance with the DAVE protocol specifications regarding commit structure and group member uniqueness.

Key Changes

  • I implemented validateCommitProposalRefs to enforce that MLS commits only contain references to previously cached proposals, rejecting any inline proposals as per DAVE protocol.md:314.
  • I added a check within rebuildEpochStateLocked to prevent the creation of an epoch state with duplicate user IDs, aligning with DAVE protocol.md:315.
  • I introduced new error types, ErrInlineProposalInCommit and ErrDuplicateGroupIdentity, to clearly signal these validation failures.
  • I added comprehensive unit tests in commit_validation_test.go to cover both the acceptance of valid reference-based commits and the rejection of inline proposals and duplicate identities.

Technical Impact

These validations significantly enhance the robustness and security of MLS session management. By strictly enforcing protocol rules for commit structures, I prevent malformed or non-compliant commits from altering the group state. The duplicate identity check ensures the integrity of group membership, preventing potential ambiguities or issues arising from multiple members sharing the same user ID. This makes the MLS session more resilient and compliant with DAVE specifications.

🧪 Test Plan & Evidence

Suggested Manual Verification

  • Unit Tests: Run go test ./... and ensure all tests pass
  • No Regressions: Verify that related features still work as expected

@thomas-vilte thomas-vilte changed the title feat(session): validate MLS commit proposals and group identities feat(session): Validate MLS commit proposals and group identities Jul 6, 2026
@thomas-vilte thomas-vilte added the feature New feature label Jul 6, 2026
@thomas-vilte
thomas-vilte merged commit 6b7f6b7 into main Jul 6, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant