Skip to content

Use dedicated omi-agent-vm firewall tag for AgentVM instances#5353

Merged
beastoin merged 2 commits intomainfrom
fix/agentvm-firewall-tag-5351
Mar 4, 2026
Merged

Use dedicated omi-agent-vm firewall tag for AgentVM instances#5353
beastoin merged 2 commits intomainfrom
fix/agentvm-firewall-tag-5351

Conversation

@beastoin
Copy link
Collaborator

@beastoin beastoin commented Mar 4, 2026

Summary

  • Replace generic http-server network tag with dedicated omi-agent-vm tag in AgentVM GCE provisioning
  • Make GCE_SOURCE_IMAGE default dynamic: projects/{gce_project_id}/global/images/family/omi-agent — automatically uses the correct project's image
  • Addresses step 1 of AgentVM: use dedicated firewall tag instead of shared http-server #5351. Steps 2-3 (prod firewall rules) are infra changes tracked in the issue.

Changes

  • agent.rs:478: "http-server""omi-agent-vm"
  • config.rs: gce_source_image default now derives from gce_project_id

Test evidence (local dev, based-hardware-dev)

  • VM created: omi-agent-test-desktop with IP 34.46.9.163
  • Tag verified: omi-agent-vm (via gcloud compute instances describe)
  • Status lifecycle: provisioning → ready (Firestore correctly updated)
  • VM cleaned up after test
$ gcloud compute instances describe omi-agent-test-desktop --format="json(tags,status)"
{
  "status": "RUNNING",
  "tags": { "items": ["omi-agent-vm"] }
}

$ curl /v2/agent/status → {"status": "ready", "ip": "34.46.9.163", ...}

Test plan

  • cargo test — 13/13 pass
  • Full AgentVM provision e2e on dev: VM created, correct tag, correct image, Firestore lifecycle works
  • Test VM deleted after verification

🤖 Generated with Claude Code

@greptile-apps
Copy link

greptile-apps bot commented Mar 4, 2026

Greptile Summary

Replaces generic http-server network tag with dedicated omi-agent-vm tag in GCE VM provisioning. This security improvement narrows the firewall rule scope from broadly exposing port 8080 across many VMs to only agent VMs.

Key changes:

  • Single line change in agent.rs: network tag updated from "http-server" to "omi-agent-vm"

Important verification needed:

  • The PR mentions firewall rule allow-omi-agent-vm-8080 was created "in dev by @mon" but doesn't confirm it exists in production. Verify the firewall rule exists in all environments before merging.

Confidence Score: 4/5

  • Safe to merge if firewall rule exists in all environments; otherwise will break agent VM provisioning
  • Simple, well-tested security improvement (tests pass 13/13), but depends on external infrastructure. Score of 4 because the firewall rule dependency is mentioned in PR description but not verified for production.
  • Verify GCP firewall configuration before merging - code change is safe but requires infrastructure readiness

Important Files Changed

Filename Overview
desktop/Backend-Rust/src/routes/agent.rs Changed network tag from http-server to omi-agent-vm for security scoping

Last reviewed commit: b500bee

}],
"tags": {
"items": ["http-server"]
"items": ["omi-agent-vm"]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verify the allow-omi-agent-vm-8080 firewall rule exists in ALL environments (dev, staging, production) before merging - VMs won't be accessible on port 8080 if the rule is missing

@beastoin beastoin merged commit d50c7d3 into main Mar 4, 2026
1 check passed
@beastoin beastoin deleted the fix/agentvm-firewall-tag-5351 branch March 4, 2026 08:12
@beastoin
Copy link
Collaborator Author

beastoin commented Mar 4, 2026

lgtm

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant