[FEATURE] Check directory access through original native realm bindings #12

Closed
opened 2026-09-29 13:05:34 +02:00 by erikinkinen · 0 comments
Owner

Problem and motivation

The realm has authenticated per-client credentials and original directory endpoints, and Vfsd forwards explicit permission evidence, but no compatibility request connects those pieces to a native access decision. A requested ReadWrite configuration ceiling may inherit a read-only native parent, so configuration flags alone cannot prove write admission.

Proposed behavior and scope

Compatibility 1.2 carries only an original directory role/selector and requested access bits. Actual sealed CLAIM clients select immutable effective credentials and original directory receipts. Vfsd checks the live metadata-directory operation and inherited namespace/write ceiling before fetching provider evidence. ReadWrite configuration cannot restore native rights. Complete canonical ACL pages preserve object/revision/count/range, order, required bases/masks and mode correspondence before any deny-only result. Partial ACLs, UID zero and combined partial group grants cannot bypass policy. Zero bits still require actual original-provider existence.

Per-query state retains one snapshot and a bounded streaming fold without a fixed ACL-entry limit. Original outbound and inbound owners remain attached through cancellation, result release and one-shot COMPLETE. Acknowledged Draining(NOT_FOUND) preserves route-loss retirement; unknown failures and unexplained absence keep custody. Stream and directory paths share the original caller helper and host fixture.

Final source review flattened the native client refusal condition without changing its requests or expected outcomes. Two additional signed cleanup/adoption commits select the final source; the implemented scope and twenty-four authored controls are unchanged. No tests, builds or CI observation were run.

Twenty-four new host controls and the extended native binding workload are authored and unrun. The native client requires seven directory-existence queries, five configured write refusals and absent-selector refusal before its inherited stream controls. Existing deadlines and resource policy are unchanged. Rustfmt was applied; all changed code remains below 1,000 lines (maximum 900) with inline rustdoc and missing_docs retained. Contracts and manual TeX are updated. Tests, builds, lint checks, rustdoc, VM/manual/profiler runs and CI observation remain deferred by user instruction; no pass, warning-free build or measured speedup is claimed. Generated API exports retain their explicit older source identity until generation resumes.

Native permission enforcement remains open for complete pathname/open/stat/mutation mediation and remaining provider support. Both EriX guest-build generations and rebuilding Rust/LLVM inside EriX remain required and unproved. Phase completion is 16.23% weighted, 4.81% whole-item, with 20/460 parents and 436/896 sub-items complete.

Add a compatibility directory-access operation on an original configured directory binding. The actual kernel CLAIM selects the sealed client. The payload contains only that client's directory role/selector and requested read/write/search bits; it cannot choose credentials, a native endpoint, another client or a path. Zero bits request an existence check on that original retained object. This operation checks a bound directory; complete POSIX pathname access, open, stat and mutation mediation remain required follow-up work.

Vfsd admits the original live job-lifetime READ_METADATA directory and its retained native scope before fetching evidence. Write requests must also fit the original scope_writable ceiling; no UID, mode or ACL can restore it. Use a disjoint native access-evidence request/response, retaining existing snapshot/page encodings. Only then obtain original-provider metadata. Posixd correlates actual owned replies, requires known ownership/mode and explicit ACL support for permission checks, and applies the sealed client's effective IDs and immutable supplementary groups. UID zero receives no special path. Existence still requires actual native/provider evidence and does not invent a mode or ACL decision.

Collect present ACLs completely across their original object/revision/count. Use a bounded streaming fold over canonical entries so valid ACL size is not limited by a new fixed array or result buffer. Preserve tag/qualifier order, base entries, mandatory masks, mode correspondence and selected-class precedence, including combined group requests. Do not produce a verdict from a prefix or a failed page. Keep credentials selected from the same immutable client plan throughout collection.

Retain both inbound serving and outbound caller custody through collection, cancellation, provider refusal and release. Retain the result before native COMPLETE, attempt completion once and never restart metadata acquisition after refusal. Native ceiling denial precedes permission evaluation. No write, open, credential mutation or new capability acquisition occurs during this query.

Authority, security and reliability

Directory roles and IDs are descriptive lookup keys only after actual caller admission. The original authority row, live receiver, provider route and native scope determine admissibility. Explicit Read configuration adds a further write denial; requested ReadWrite cannot enlarge the provider's inherited ceiling. Unknown, malformed, mismatched or stale evidence never falls back to mode-only success. Metadata revisions are not reusable authorization tokens for later effects. Later filesystem operations must independently admit native authority and enforce their own freshness contract.

Compatibility framing advances coherently to version 1.2; old minor versions remain explicitly refused instead of silently gaining new operation semantics. Existing byte I/O keeps its already-open description behavior. Counted compiler-derived client geometry accounts for the new noncopyable operation state; no hidden heap or small ACL limit is introduced.

Acceptance criteria

Checklist
  • Define exact directory-access compatibility framing and native ceiling-aware evidence codecs with canonical masks, selectors and failure bodies.
  • Implement actual Vfsd ceiling admission and Posixd original-client credential/evidence collection, complete ACL folding and deny-only access results.
  • Preserve original native custody, cancellation, one-shot completion and counted storage across every result and refusal path.
  • Author positive, UID-zero, inherited-read-only, malformed/stale/large-ACL, cancellation and cleanup controls, including the bounded native binding workload. Execution is waived by user.
  • Update contracts/manual, coherent original signed dependency/catalog selections, related issues/PRs and the phase checklist.

Alternatives and tradeoffs

Using requested configuration access as proof would ignore inherited native restrictions. Evaluating mode alone when ACL transport fails could enlarge permissions. A small fixed ACL array would unnecessarily refuse valid input; complete streaming validation retains bounded per-client state without claiming that a partial ACL is sufficient. This access query does not substitute for the remaining operation-specific filesystem implementation.

Tracking and rollout

Continue native permission enforcement using original metadata forwarding. Coordinate compatibility ABI, native IPC, Vfsd, Posixd, manual, integration and phase completion. Full filesystem policy, complete provider ACL support and both EriX guest-build generations plus the external Rust/LLVM rebuild remain open.

Related records and contracts
Repository Links
posixd issue 12, issue 13
## Problem and motivation The realm has authenticated per-client credentials and original directory endpoints, and Vfsd forwards explicit permission evidence, but no compatibility request connects those pieces to a native access decision. A requested ReadWrite configuration ceiling may inherit a read-only native parent, so configuration flags alone cannot prove write admission. ## Proposed behavior and scope Compatibility 1.2 carries only an original directory role/selector and requested access bits. Actual sealed CLAIM clients select immutable effective credentials and original directory receipts. Vfsd checks the live metadata-directory operation and inherited namespace/write ceiling before fetching provider evidence. ReadWrite configuration cannot restore native rights. Complete canonical ACL pages preserve object/revision/count/range, order, required bases/masks and mode correspondence before any deny-only result. Partial ACLs, UID zero and combined partial group grants cannot bypass policy. Zero bits still require actual original-provider existence. Per-query state retains one snapshot and a bounded streaming fold without a fixed ACL-entry limit. Original outbound and inbound owners remain attached through cancellation, result release and one-shot COMPLETE. Acknowledged Draining(NOT_FOUND) preserves route-loss retirement; unknown failures and unexplained absence keep custody. Stream and directory paths share the original caller helper and host fixture. Final source review flattened the native client refusal condition without changing its requests or expected outcomes. Two additional signed cleanup/adoption commits select the final source; the implemented scope and twenty-four authored controls are unchanged. No tests, builds or CI observation were run. Twenty-four new host controls and the extended native binding workload are authored and unrun. The native client requires seven directory-existence queries, five configured write refusals and absent-selector refusal before its inherited stream controls. Existing deadlines and resource policy are unchanged. Rustfmt was applied; all changed code remains below 1,000 lines (maximum 900) with inline rustdoc and missing_docs retained. Contracts and manual TeX are updated. Tests, builds, lint checks, rustdoc, VM/manual/profiler runs and CI observation remain deferred by user instruction; no pass, warning-free build or measured speedup is claimed. Generated API exports retain their explicit older source identity until generation resumes. [Native permission enforcement](https://git.erikinkinen.fi/erix/posixd/issues/10) remains open for complete pathname/open/stat/mutation mediation and remaining provider support. Both EriX guest-build generations and rebuilding Rust/LLVM inside EriX remain required and unproved. [Phase completion](https://git.erikinkinen.fi/erix/integration/issues/65) is **16.23% weighted**, **4.81% whole-item**, with **20/460 parents** and **436/896 sub-items** complete. Add a compatibility directory-access operation on an original configured directory binding. The actual kernel CLAIM selects the sealed client. The payload contains only that client's directory role/selector and requested read/write/search bits; it cannot choose credentials, a native endpoint, another client or a path. Zero bits request an existence check on that original retained object. This operation checks a bound directory; complete POSIX pathname access, open, stat and mutation mediation remain required follow-up work. Vfsd admits the original live job-lifetime READ_METADATA directory and its retained native scope before fetching evidence. Write requests must also fit the original scope_writable ceiling; no UID, mode or ACL can restore it. Use a disjoint native access-evidence request/response, retaining existing snapshot/page encodings. Only then obtain original-provider metadata. Posixd correlates actual owned replies, requires known ownership/mode and explicit ACL support for permission checks, and applies the sealed client's effective IDs and immutable supplementary groups. UID zero receives no special path. Existence still requires actual native/provider evidence and does not invent a mode or ACL decision. Collect present ACLs completely across their original object/revision/count. Use a bounded streaming fold over canonical entries so valid ACL size is not limited by a new fixed array or result buffer. Preserve tag/qualifier order, base entries, mandatory masks, mode correspondence and selected-class precedence, including combined group requests. Do not produce a verdict from a prefix or a failed page. Keep credentials selected from the same immutable client plan throughout collection. Retain both inbound serving and outbound caller custody through collection, cancellation, provider refusal and release. Retain the result before native COMPLETE, attempt completion once and never restart metadata acquisition after refusal. Native ceiling denial precedes permission evaluation. No write, open, credential mutation or new capability acquisition occurs during this query. ## Authority, security and reliability Directory roles and IDs are descriptive lookup keys only after actual caller admission. The original authority row, live receiver, provider route and native scope determine admissibility. Explicit Read configuration adds a further write denial; requested ReadWrite cannot enlarge the provider's inherited ceiling. Unknown, malformed, mismatched or stale evidence never falls back to mode-only success. Metadata revisions are not reusable authorization tokens for later effects. Later filesystem operations must independently admit native authority and enforce their own freshness contract. Compatibility framing advances coherently to version 1.2; old minor versions remain explicitly refused instead of silently gaining new operation semantics. Existing byte I/O keeps its already-open description behavior. Counted compiler-derived client geometry accounts for the new noncopyable operation state; no hidden heap or small ACL limit is introduced. ## Acceptance criteria <details> <summary>Checklist</summary> - [x] Define exact directory-access compatibility framing and native ceiling-aware evidence codecs with canonical masks, selectors and failure bodies. - [x] Implement actual Vfsd ceiling admission and Posixd original-client credential/evidence collection, complete ACL folding and deny-only access results. - [x] Preserve original native custody, cancellation, one-shot completion and counted storage across every result and refusal path. - [x] Author positive, UID-zero, inherited-read-only, malformed/stale/large-ACL, cancellation and cleanup controls, including the bounded native binding workload. Execution is waived by user. - [x] Update contracts/manual, coherent original signed dependency/catalog selections, related issues/PRs and the phase checklist. </details> ## Alternatives and tradeoffs Using requested configuration access as proof would ignore inherited native restrictions. Evaluating mode alone when ACL transport fails could enlarge permissions. A small fixed ACL array would unnecessarily refuse valid input; complete streaming validation retains bounded per-client state without claiming that a partial ACL is sufficient. This access query does not substitute for the remaining operation-specific filesystem implementation. ## Tracking and rollout Continue [native permission enforcement](https://git.erikinkinen.fi/erix/posixd/issues/10) using [original metadata forwarding](https://git.erikinkinen.fi/erix/vfsd/issues/5). Coordinate [compatibility ABI](https://git.erikinkinen.fi/erix/lib-posixabi/pulls/3), [native IPC](https://git.erikinkinen.fi/erix/lib-ipc/pulls/2), [Vfsd](https://git.erikinkinen.fi/erix/vfsd/pulls/3), [Posixd](https://git.erikinkinen.fi/erix/posixd/pulls/5), [manual](https://git.erikinkinen.fi/erix/docs/pulls/4), [integration](https://git.erikinkinen.fi/erix/integration/pulls/12) and [phase completion](https://git.erikinkinen.fi/erix/integration/issues/65). Full filesystem policy, complete provider ACL support and both EriX guest-build generations plus the external Rust/LLVM rebuild remain open. <details> <summary>Related records and contracts</summary> | Repository | Links | | --- | --- | | posixd | [issue 12](https://git.erikinkinen.fi/erix/posixd/issues/12), [issue 13](https://git.erikinkinen.fi/erix/posixd/issues/13) | </details>
erikinkinen added this to the Alpha 1 milestone 2026-10-30 09:35:05 +01:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
erix/posixd#12
No description provided.