Skip to content

fix(sharing): bind enrolled devices to identities#1357

Merged
kunickiaj merged 1 commit into
mainfrom
07-25-fix_sharing_bind_enrolled_devices_to_identities
Jul 25, 2026
Merged

fix(sharing): bind enrolled devices to identities#1357
kunickiaj merged 1 commit into
mainfrom
07-25-fix_sharing_bind_enrolled_devices_to_identities

Conversation

@kunickiaj

@kunickiaj kunickiaj commented Jul 25, 2026

Copy link
Copy Markdown
Owner

Description

Persist an authoritative Identity binding for enrolled recipient devices across BetterSQLite and D1.

The coordinator now mints an opaque Identity for each Team-member invitation, exposes it during inspection, requires that exact Identity during acceptance, and atomically stores it on the enrolled device. Add-device invitations continue to use their coordinator-owned target Identity. Legacy, admin, and Project enrollment remains unbound.

This prevents recipients from choosing or silently rebinding the Identity later trusted by signed coordinator mutations. Malformed migrated assignments, caller-supplied Team assignments, conflicting re-enrollment, and mismatched join responses fail closed.

Type of Change

  • 🚀 Feature (new functionality)
  • 🐛 Bug fix (fixes an issue)
  • 📚 Documentation (docs-only change)
  • 🔧 Maintenance (refactor, chore, CI, etc.)
  • 🧪 Testing (test-only changes)

Testing

  • Relevant checks pass locally (pnpm run tsc, pnpm run lint, pnpm run test)
  • Added/updated tests for changes
  • Manually verified changes work as expected

Additional validation:

  • pnpm --filter @codemem/cloudflare-coordinator-worker test:worker
  • Independent security/correctness, test-coverage, and maintainability reviews

Checklist

  • Code follows project style (pnpm run lint passes for touched files)
  • Self-review completed
  • Documentation updated (if needed)
  • No new warnings introduced

kunickiaj commented Jul 25, 2026

Copy link
Copy Markdown
Owner Author

@kunickiaj
kunickiaj marked this pull request as ready for review July 25, 2026 08:52
@kunickiaj
kunickiaj merged commit e983b74 into main Jul 25, 2026
13 checks passed
@kunickiaj
kunickiaj deleted the 07-25-fix_sharing_bind_enrolled_devices_to_identities branch July 25, 2026 14:59
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