Skip to content

fix(dwn): require authorized role issuers#1479

Merged
LiranCohen merged 1 commit into
mainfrom
fix/protocol-role-issuance
Jul 25, 2026
Merged

fix(dwn): require authorized role issuers#1479
LiranCohen merged 1 commit into
mainfrom
fix/protocol-role-issuance

Conversation

@LiranCohen

Copy link
Copy Markdown
Contributor

Summary

  • reject protocol definitions that let anyone create or squash a $role assignment
  • keep trusted owner, delegate/grant, contextual, and existing-role issuance paths intact
  • migrate unsafe test fixtures to tenant-issued roles or explicit grants and document the new protocol-configuration rule

Closes #1477.

Test plan

  • bun test tests/interfaces/protocols-configure.spec.ts
  • targeted delegated-role issuance and non-current audience-key handler tests
  • targeted affected query/count/subscribe, protocol-history, delivery, and agent encryption tests
  • bun run lint
  • bun run --filter @enbox/dwn-sdk-js build
  • bun run --filter @enbox/agent build

Migration

Unsafe definitions already installed in a DWN are not rewritten. Retire the old protocol URI, install a corrected definition under a new URI, migrate only authorized role assignments, and stop relying on roles issued under the unsafe definition.

@sonarqubecloud

Copy link
Copy Markdown

@LiranCohen
LiranCohen merged commit 8b0dc99 into main Jul 25, 2026
30 checks passed
@LiranCohen
LiranCohen deleted the fix/protocol-role-issuance branch July 25, 2026 03:48
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.

fix(dwn): prevent self-issued protocol roles from granting authority

1 participant