Skip to content

OpenSharing protocol: authenticate recipients and list granted shares - #101

Open
littlegrasscao wants to merge 5 commits into
mainfrom
server/split2/12-protocol-shares
Open

littlegrasscao wants to merge 5 commits into
mainfrom
server/split2/12-protocol-shares

Conversation

@littlegrasscao

@littlegrasscao littlegrasscao commented Sep 18, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • RecipientTokenDecorator authenticates sharing protocol requests by recipient bearer token: only activated, unexpired token hashes are accepted, and anything else is 401 with WWW-Authenticate: Bearer
  • OpenSharing protocol List Shares: GET /shares lists one page of the shares the recipient holds SELECT on, ordered by name, using the core Pagination from server: page the provider list APIs #117
    • Pagination.protocolPage keeps the protocol's meaning of maxResults=0: no items, with a nextPageToken that resumes from the same position when any remain
  • Get Share: GET /shares/{share} returns {"share": ...} for a granted share; a share the recipient holds no SELECT on is reported as not found
  • both endpoints also match the Delta Sharing protocol's List Shares and Get Share
  • the logic is framework-free in core (ProtocolShares, RecipientService.authenticate, and new SharePermissionStore and RecipientStore queries); OpenSharingProtocolService is a thin Armeria layer for the OpenSharing protocol's share, schema and table endpoints; the Delta Sharing table endpoints get their own DeltaSharingProtocolService (Delta Sharing protocol: query a shared Delta table version #105)
  • OpenSharingRecipientApi.mount(...) serves the protocol and activation endpoints with their own JSON converters and error handling, so a host can mount them next to its own services. It takes the host's public URL, which profile files point recipients to. The standalone server now mounts activation through it

Testing

  • mvn clean install: 132 tests passed
  • OpenSharingProtocolServiceTest: a recipient authenticates with its activated token and lists only granted shares; missing, invalid, and superseded tokens are 401; shares page with opaque tokens, including many shares across pages, and maxResults=0 returns no shares with a token that resumes from the start
  • ProtocolPaginationTest: a page size of 0 returns no items with a token to the same position, no token for an empty list, and other sizes page as provider lists do

@littlegrasscao
littlegrasscao force-pushed the server/split2/12-protocol-shares branch from b9e4153 to 90267a8 Compare September 22, 2026 16:42
@littlegrasscao
littlegrasscao marked this pull request as ready for review September 22, 2026 19:13
@littlegrasscao
littlegrasscao force-pushed the server/split2/12-protocol-shares branch from 255fa27 to 991ec06 Compare September 25, 2026 22:20
@littlegrasscao
littlegrasscao force-pushed the server/split2/12-protocol-shares branch from 991ec06 to 893c4de Compare September 25, 2026 22:28
@littlegrasscao
littlegrasscao force-pushed the server/split2/12-protocol-shares branch from 893c4de to 853ab2f Compare September 25, 2026 22:32
@littlegrasscao
littlegrasscao force-pushed the server/split2/12-protocol-shares branch 2 times, most recently from 773af6e to 0907985 Compare September 26, 2026 00:16
@littlegrasscao
littlegrasscao marked this pull request as draft October 7, 2026 01:57
@littlegrasscao littlegrasscao changed the title server: authenticate recipients and list granted shares protocol: authenticate recipients and list granted shares Oct 9, 2026
@littlegrasscao
littlegrasscao force-pushed the server/split2/12-protocol-shares branch from f833204 to abbab4d Compare October 14, 2026 19:25
@littlegrasscao
littlegrasscao force-pushed the server/split2/12-protocol-shares branch from abbab4d to a54b92b Compare October 15, 2026 16:46
@littlegrasscao
littlegrasscao force-pushed the server/split2/12-protocol-shares branch from a54b92b to 0030330 Compare October 15, 2026 18:13
@littlegrasscao
littlegrasscao force-pushed the server/split2/12-protocol-shares branch from 0030330 to b74f407 Compare October 15, 2026 18:29
@littlegrasscao
littlegrasscao force-pushed the server/split2/12-protocol-shares branch from b74f407 to 45bd183 Compare October 15, 2026 23:34
@littlegrasscao
littlegrasscao force-pushed the server/split2/12-protocol-shares branch 2 times, most recently from 5f2a2ae to c50a436 Compare October 15, 2026 23:54
@littlegrasscao
littlegrasscao changed the base branch from server/split2/11a-provider-pagination to server/split2/11c-use-recipient October 15, 2026 23:55
@littlegrasscao
littlegrasscao force-pushed the server/split2/12-protocol-shares branch from c50a436 to 83abc21 Compare October 16, 2026 00:17
@littlegrasscao
littlegrasscao force-pushed the server/split2/12-protocol-shares branch from 83abc21 to 85f37a0 Compare October 16, 2026 00:41
@littlegrasscao
littlegrasscao force-pushed the server/split2/12-protocol-shares branch from 85f37a0 to 6b727fa Compare October 19, 2026 17:12
@zhu-tom
zhu-tom added this pull request to stack #116 October 19, 2026 19:06
@littlegrasscao
littlegrasscao force-pushed the server/split2/12-protocol-shares branch from 6b727fa to a96b7c0 Compare October 19, 2026 21:43
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