-
Notifications
You must be signed in to change notification settings - Fork 356
Closed
Description
Agent Diagnostic
I followed the example from this link:
https://github.com/NVIDIA/OpenShell/tree/main/examples/sandbox-policy-quickstart
but it has not been working successfully. The logs show the following.
Description
I configured a policy like this:
network_policies:
code_hub:
name: code_read_write
endpoints:
- host: 218.11.11.225
port: 80
protocol: rest
enforcement: enforce
access: read-only
binaries:
- { path: /usr/bin/curl }
Then I ran:
sandbox@demo:~$ curl -v 218.11.11.225:80
* Uses proxy env variable no_proxy == '127.0.0.1,localhost,::1'
* Uses proxy env variable http_proxy == 'http://10.200.0.1:3128'
* Trying 10.200.0.1:3128...
* Connected to 10.200.0.1 (10.200.0.1) port 3128
> GET http://218.11.11.225/ HTTP/1.1
> Host: 218.11.11.225
> User-Agent: curl/8.5.0
> Accept: */*
> Proxy-Connection: Keep-Alive
>
< HTTP/1.1 403 Forbidden
* no chunk, no close, no size. Assume close to signal end
<
* Closing connection
The logs are as follows:
[1774352985.070] [sandbox] [INFO ] [openshell_sandbox::proxy] FORWARD action=deny binary=/usr/bin/curl dst_host=218.11.11.225 dst_port=80 method=GET path=/ policy=code_hub reason=endpoint has L7 rules; use CONNECT
I guess I’m using it incorrectly. How should I use the L7 policy?
Reproduction Steps
- openshell sandbox create --name demo
- vim policy
- openshell policy set demo --policy policy.yaml --wait
- openshell sandbox connect demo
- curl -v 218.11.11.225:80
* Uses proxy env variable no_proxy == '127.0.0.1,localhost,::1'
* Uses proxy env variable http_proxy == 'http://10.200.0.1:3128'
* Trying 10.200.0.1:3128...
* Connected to 10.200.0.1 (10.200.0.1) port 3128
> GET http://218.11.11.225/ HTTP/1.1
> Host: 218.11.11.225
> User-Agent: curl/8.5.0
> Accept: */*
> Proxy-Connection: Keep-Alive
>
< HTTP/1.1 403 Forbidden
* no chunk, no close, no size. Assume close to signal end
<
* Closing connection
Environment
- linux
Logs
Agent-First Checklist
- I pointed my agent at the repo and had it investigate this issue
- I loaded relevant skills (e.g.,
debug-openshell-cluster,debug-inference,openshell-cli) - My agent could not resolve this — the diagnostic above explains why
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels