feat: support sandbox network policies with YuanRong 0.9.7 - #22
Conversation
ad97955 to
2ccc83d
Compare
afec513 to
47cb268
Compare
tianyuzhou95
left a comment
There was a problem hiding this comment.
The SDK policy translation looks sound overall. I found one standalone startup blocker plus several backend-default and public-contract inconsistencies that should be addressed before merging.
c8dd238 to
4029916
Compare
|
Before the final review, could you please rebase this branch onto the latest Please also update the PR title and description to match the final scope of the implementation, including the coordinated openYuanRong and sandboxd dependency updates, SDK network-policy API, deployment prerequisites and defaults, tunnel/lifecycle compatibility changes, tests, and documentation. This will make the resulting change set easier to review and maintain. |
4029916 to
69fec0a
Compare
|
Addressed the final-review request:
The reorganized tree is byte-for-byte identical to the pre-reorganization tree plus the host-module ownership fix requested in this review. |
|
The rebase, logical commit grouping, and updated PR scope look good. I have two remaining presentation/metadata requests before the final review:
No additional functional blocker was found in the updated change set. |
Pin openYuanRong 0.9.7 and the sandboxd network-ACL revision. Refresh the matching Python packages, runtime artifacts, and checksums. Signed-off-by: robbluo <luo1442@gmail.com>
f2e22c4 to
67496dd
Compare
Add unrestricted, stateful block-network, and DNS-deny policies to both YuanRong backends. Preserve deployment-configured rootfs configuration overrides. Cover the public contract with unit tests. Signed-off-by: robbluo <luo1442@gmail.com>
Use native local-only close after stable-ID termination. Forward custom reverse-tunnel listener ports through proxy_port and enforce the frontend adjacent WebSocket port contract. Signed-off-by: robbluo <luo1442@gmail.com>
Enable ACLs in Helm, Terraform, and standalone deployments. Prepare host and namespace prerequisites, preserve the legacy etcd service identity, and publish standalone tunnel routes through FunctionMaster. Signed-off-by: robbluo <luo1442@gmail.com>
6cc5b6b to
7952cc9
Compare
Describe the public stateful block-policy contract and backend-specific host requirements. Cover standalone routing, the upgrade procedure, limitations, and maintained examples. Signed-off-by: robbluo <luo1442@gmail.com>
7952cc9 to
4eed7be
Compare
Summary
This PR adds creation-time sandbox network policies to the public Python SDK and coordinates the openYuanRong 0.9.7 and sandboxd runtime changes required to enforce them.
NetworkPolicy.block()installs a stateful IPv4 default-deny policy for new flows while preserving YuanRong control and published sandbox-port routes used by direct filesystem I/O, reverse tunnels, and explicit port forwarding. DNS policies deny normalized exact or leading-wildcard names without installing a general packet allowlist.Scope
Dependencies
openyuanrong-sandbox==0.9.7, optionalopenyuanrong-sdk==0.9.7, and openYuanRong tag commit9229bbb4a0d129d10dd6aed6099f64f8fda8cf9d.maincommit17b78468a5454ecb86b15ca0bc4f3461cb95f06a.SDK and compatibility
NetworkPolicyAPI and translate it through both YuanRong backends.Deployment
br_netfilter; the node container validates the prerequisite and configures namespace-local bridge netfilter.Validation
NetworkPolicy.block(), command and filesystem operations passed, the reverse tunnel returnedAKERNEL_BLOCK_TUNNEL_OK, and unrelated outbound HTTPS timed out with exit code 124.Commit organization
The branch is rebased on the latest
mainand contains five self-contained commits:Limitations
block_networkanddns_blacklistcannot be combined.This PR supersedes #20.