Skip to content

Enforce server-side authorization for Local/HostPath mounts #110

Open

Description

@WenYuLuo

Follow-up from the review of #108.

Current behavior

AKernel #108 pins ADX b208c40964934ba24e04e80136d9f077bddb44f5 (0.1.0rc2). Its public environment-create contract accepts absolute Local mount sources through both host_path and hostPath and preserves caller-supplied options, including rw, without checking administrator privileges or tenant ownership of the source path. The previous pin rejected public host mounts.

The review's offline probe accepted /, another tenant's workspace path, and a path not yet created for a non-admin caller. This verified request conversion only; no filesystem access or live mount was performed. ADX contract and public create route show the missing authorization boundary. ADXlet forwards Local sources/options to sandboxd, which includes them in the OCI mount specification; affected paths are those visible to the node runtime.

Scope decision

Keep Local/HostPath mounts out of the public AKernel SDK for now. At #108 head 082f7dd6074a85866d0afcf9a1d146cf8b51e7b0, its public Mount already supports only read-only Image/S3 sources; it exposes neither host_path, writable options nor create_if_missing.

Track the server-side authorization correction separately in this open issue. SDK restrictions do not protect raw HTTP requests, and opening this issue does not resolve or mitigate that gap. #108 must not close this follow-up automatically.

Follow-up and acceptance

  • Enforce authorization at the ADX public create boundary: reject untrusted Local mounts by default, or require explicit management authorization plus source-path/tenant restrictions before allowing them.
  • Preserve legitimate server-managed/internal Agent mounts through an explicit trust boundary; do not infer trust solely from request path syntax or environment tenant ownership.
  • Add negative tests for non-admin callers, both host_path/hostPath, ro/rw, create_if_missing, /, cross-tenant workspace sources, and both public create endpoints. Verify rejection before filesystem side effects.
  • Cover authorized internal mounts and confirm the AKernel SDK continues to expose only read-only Image/S3 sources.
  • Publish any required ADX correction as a new immutable version, align AKernel's platform/Execd archive checksums, SDK dependency and gitlink, then run joint boundary and E2E regression. Do not replace published rc2 artifacts.

Keep this issue open until the server-side correction and its regression evidence are complete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions