You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 370908f
Browse filesBrowse the repository at this point in the historyBrowse files
The tutorial told users to exit the sandbox and reconnect later, but
exiting the interactive shell stops the sandbox's main process and it is
not reconnectable under the default restart policy. Switch to the
two-terminal flow already used by the github-sandbox tutorial so the
sandbox stays running, matching what examples/sandbox-policy-quickstart/
demo.sh actually does.
Related: NVIDIA#2998, NVIDIA#2798
Signed-off-by: Russell Bryant <[email protected]>
Copy file name to clipboardExpand all lines: docs/get-started/tutorials/first-network-policy.mdx
+8-19Lines changed: 8 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -65,15 +65,16 @@ The request fails. By default, all outbound network traffic is denied. The sandb
65
65
curl: (56) Received HTTP code 403 from proxy after CONNECT
66
66
```
67
67
68
-
Exit the sandbox. Sandboxes are kept running by default, so you can reconnect later. Use `--no-keep` at creation time if you want the sandbox deleted after exit:
68
+
Leave this sandbox shell open and switch to a second terminal on your host for the next steps. The remaining `openshell` commands (checking logs and applying the policy) run on your host, not inside the sandbox.
69
69
70
-
```shell
71
-
exit
72
-
```
70
+
<Note>
71
+
Keep the interactive sandbox shell open for the rest of the tutorial. Exiting it stops the sandbox's main process, and with the default restart policy the sandbox is not reconnectable afterward. Add `--no-keep` at creation time if you want the sandbox deleted automatically when you exit.
72
+
73
+
</Note>
73
74
74
75
## Check the Deny Log
75
76
76
-
Every denied connection produces a structured log entry. Query the sandbox logs from your host to confirm the denial and inspect the reason.
77
+
Every denied connection produces a structured log entry. In your second (host) terminal, query the sandbox logs to confirm the denial and inspect the reason.
77
78
78
79
```shell
79
80
openshell logs demo --since 5m
@@ -135,13 +136,7 @@ This tutorial uses `curl` and `read-only` access to keep things simple. When bui
135
136
136
137
## Verify If GET Requests Are Allowed
137
138
138
-
The policy is now active. Reconnect to the sandbox and retry the same request to confirm that read access works.
139
-
140
-
```shell
141
-
openshell sandbox connect demo
142
-
```
143
-
144
-
Retry the same request:
139
+
The policy is now active. Return to your sandbox shell in the first terminal (it is still running) and retry the same request to confirm that read access works:
@@ -169,15 +164,9 @@ curl -s -X POST https://api.github.com/repos/octocat/hello-world/issues \
169
164
170
165
The CONNECT request succeeded because `api.github.com` is allowed, but the L7 proxy inspected the HTTP method and returned `403`. `POST` is not in the `read-only` preset. An agent with this policy can read code from GitHub but cannot create issues, push commits, or modify anything.
171
166
172
-
Exit the sandbox:
173
-
174
-
```shell
175
-
exit
176
-
```
177
-
178
167
## Check the L7 Deny Log
179
168
180
-
L7 denials are logged separately from connection-level denials. The log entry includes the exact HTTP method and path that the proxy rejected.
169
+
L7 denials are logged separately from connection-level denials. The log entry includes the exact HTTP method and path that the proxy rejected. Run this from your second (host) terminal, leaving the sandbox shell open:
0 commit comments