Skip to content

Conversation

@mr-naveenseven
Copy link

Changes

Added public share with revoking feature

Fixes

Tests

Tasks to complete before merging PR:

  • Ensure system tests are passing. If not Run them manually to check for any regressions 📋
  • Do any new system tests need added to test this change? do any existing system tests need updated? If so create a PR at 0chain/system_test
  • Merge your system tests PR to master AFTER merging this PR

Associated PRs (Link as appropriate):

  • 0chain:
  • gosdk:
  • system_test:
  • zboxcli:
  • zwalletcli:
  • Other: ...

- Add public share check endpoint: GET /v1/marketplace/shareinfo/public/check/{allocation}
- Add public share recipients endpoint: GET /v1/marketplace/shareinfo/public/recipients/{allocation}
- Add public share recipient removal endpoint: DELETE /v1/marketplace/shareinfo/public/recipient/{allocation}
- Add public share revoke endpoint: DELETE /v1/marketplace/shareinfo/public/{allocation}

Security & Features:
- Owner-scoped recipient queries (prevents cross-owner data access)
- Allocation ownership verification for all operations
- Support for both private and public share types
- Auth ticket validation and signature verification
- Comprehensive error handling and validation
- Rate limiting and connection management

Database Operations:
- CheckPublicShareExists: Verify public share existence
- GetPublicShareRecipients: Get all recipients (owner-scoped)
- RemovePublicShareRecipient: Remove specific recipient
- RevokePublicShare: Remove all recipients for a file

API Endpoints:
- GET /v1/marketplace/shareinfo/public/check/{allocation} - Check existence
- GET /v1/marketplace/shareinfo/public/recipients/{allocation} - List recipients
- DELETE /v1/marketplace/shareinfo/public/recipient/{allocation} - Remove recipient
- DELETE /v1/marketplace/shareinfo/public/{allocation} - Revoke share

Security Fix: Added owner_id filtering to prevent cross-owner data access
@RokibulHasan7 RokibulHasan7 force-pushed the feat/public-share-with-revoke branch 28 times, most recently from d3b1995 to 1d6f879 Compare January 2, 2026 17:35
@RokibulHasan7 RokibulHasan7 force-pushed the feat/public-share-with-revoke branch 5 times, most recently from 355f2dd to ef2bb38 Compare January 2, 2026 18:28
@RokibulHasan7 RokibulHasan7 force-pushed the feat/public-share-with-revoke branch from ef2bb38 to 8b4e77f Compare January 2, 2026 18:30
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.

3 participants