Skip to content

fix(acl): expose native shared-root r/rw levels for C permission gates - #40

Merged
servicememeai merged 2 commits into
devfrom
fix/native-share-write
Oct 20, 2026
Merged

servicememeai merged 2 commits into
devfrom
fix/native-share-write

Conversation

@servicememeai

Copy link
Copy Markdown

Purpose

Fix the cross-layer native share-write contract. A user with an explicit V2 directory share and no library membership must receive the exact r or rw level without gaining access to the library root or siblings.

Change

  • /cloudfile/acl/check/ includes permissions aligned with each successful checks entry; allowed and contract stay backward-compatible for Go/C clients.
  • Correct the test: an action=write check can only pass with effective rw; r is valid for action=read, and read-only write attempts return 403 without leaking a partial permission array.

Verification

  • Code-level contract and fixtures reviewed; low-cost PR source checks requested.
  • No deployment and no full build. True E2E native writes require paired Server changes and later DEV verification.

Merge order

Merge this Hub PR before eaopen/cloudfile-server and eaopen/cloudfile-docker companion PRs.

opendev9 and others added 2 commits October 20, 2026 23:44
The native permission seam needs to know whether a qualified share root is r or
rw, and probing twice (action=read, then action=write) would double the round
trip on every write a share-only account makes. Return `permissions`, aligned
with `checks`, alongside the batch verdict.

`allowed` and `contract` are unchanged, so the Go fileserver and the C scoped
publication keep working and simply ignore the extra field. A denial still
answers 403 with no level list, so a caller cannot read a partial answer as an
authorization.

The contract gains the matching paragraph: the native upload/mkdir/rename/delete
gates consume the same share-root exception, and a caller that does not see the
field must read it as "cannot qualify" rather than "assume rw".
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.

2 participants