Skip to content

feat(storage): attribute multipart, gRPC, and Go SDK uploads to a user - #575

Merged
rickyrombo merged 1 commit into
mjp-content-auth-integration-testfrom
mjp-upload-user-id-all-paths
Sep 16, 2026
Merged

rickyrombo merged 1 commit into
mjp-content-auth-integration-testfrom
mjp-upload-user-id-all-paths

Conversation

@rickyrombo

Copy link
Copy Markdown
Contributor

Stacked on #574 (base is its branch); the review diff is this change alone.

Why

Only the tus path read the userId that mediorum attests cids to (#476). Audio sent through POST /uploads, the UploadFiles RPC, or either Go SDK helper produced uploads no user could claim, so a track naming their cids is rejected on any network that enforces content authorization. The JS SDK was fine; the Go SDK and every multipart client were not.

What

  • POST /uploads and UploadFiles read an optional userId (form field / new user_id proto field) through resolveOptionalUploadUserID and set it on the upload row, so transcode completion attests exactly as it does for tus. A malformed id is rejected with 400, as on tus.
  • Optional, not required. These paths serve programmable distribution: a DDEX release names parties, not users, and creates its tracks through Release transactions that content auth never gates. Requiring a user id here would break deliveries for nothing. What an unattributed audio upload gives up is only the claim. The rationale is on the helper.
  • UploadFilesRequest.user_id added; UploadFilesTus forwards it as tus metadata; UploadOptions.UserID writes the multipart field; examples/upload sets it for the user it creates the track as.

Verification

  • Unit: two tests on the optional resolver (absent allowed under enforcement; malformed rejected; images ignored).
  • Integration, on a devnet built from this branch (28s, all green): test(integration): cover content authorization end to end on the devnet #574's six cases plus GoSDKMultipartUploadIsClaimable and GoSDKTusUploadIsClaimable, each uploading through the SDK path with a user id and then creating a track naming the resulting cids on a different node.

🤖 Generated with Claude Code

@rickyrombo
rickyrombo added this pull request to stack #576 September 9, 2026 07:07
Only the tus path carried the userId that mediorum attests cids to. Audio
sent through POST /uploads, the UploadFiles RPC, or either Go SDK helper
produced uploads nobody could claim, so a track naming their cids is rejected
on any network that enforces content authorization.

The multipart and gRPC handlers now read an optional user id and attest
exactly as tus does when it is present. It stays optional there because those
paths serve programmable distribution, whose DDEX releases name no user and
create tracks through Release transactions content auth never gates; a
malformed id is still rejected. UploadFilesRequest gains user_id, both Go SDK
upload helpers forward it, and the upload example sets it.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@rickyrombo
rickyrombo force-pushed the mjp-upload-user-id-all-paths branch from 43b84f9 to e62c233 Compare September 15, 2026 21:33
@rickyrombo
rickyrombo merged commit c3aa798 into main Sep 16, 2026
5 checks passed
@rickyrombo
rickyrombo deleted the mjp-upload-user-id-all-paths branch September 16, 2026 00:16
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