Data flows
- bqto calls the APIs of Google. It sends no telemetry, and no server that Pilef runs is in the
path. Outside a Google client library, bqto makes these HTTP calls only:
oauth2.googleapis.com/tokeninfo, to read the email of your own login.- GitHub, from
bqto versionandbqto updateonly. - Polar, from bqto Pro, to check the license key. See License key.
- Only
bqto versionandbqto updateask for the newest release. The free bqto sends one unauthenticatedGETtoapi.github.com/repos/pilef-co/bqto/releases/latest, with theUser-Agentbqtoand nothing about you, your version, or your projects. GitHub sees your IP address. bqto Pro looks in the releases ofpilef-co/bqto-pro-releaseson GitHub. Nothing runs in the background. If you never want bqto to contact GitHub, do not run these two commands. bqto updatechecks what it downloads. It installs only an archive whose SHA-256 matches thechecksums.txtof the release. It writes the new binary next to the old one, and then renames the new binary over the old one. So a failed update leaves the old binary in place.checksums.txtcomes from the same release. So this check guards against a broken download, but not against a compromised release.- The tunnel is the tunnel of gcloud:
gcloud compute ssh --tunnel-through-iap. This is an SSH session through Identity-Aware Proxy to port 22 of the bastion, with port forwards to the service. From your laptop to the bastion, the traffic is inside that SSH session. From the bastion to the service, it is plain VPC traffic, encrypted only if the service itself uses TLS. - Everything that bqto creates stays in your project: the bastion VM and its boot disk. bqto creates no service account and no IAM binding.
- bqto creates no firewall rule, but it needs one: an ingress rule for tcp:22 from
35.235.240.0/20. bqto copies the target tags of that rule onto the bastion. So every other rule that uses those tags applies to the bastion too. Watch those tags.
Data flows in bqto Pro
- Cloud Run, Managed Kafka, and Redis or Valkey clusters go through a SOCKS proxy on the bastion
(
ssh -D). That proxy reaches anything that the bastion can reach, not only the service. For Cloud Run, it uses Private Google Access. With--web, a proxy on127.0.0.1adds your identity token to each request. - The
--webproxy asks for the session secret. bqto makes one secret for each session. A request with neither the cookie that the link sets nor theX-Bqto-Tokenheader gets 403. So another account on the machine cannot use the proxy as you. Cloud Run lists the two limits that remain.
What bqto stores on your machine
gcloud also keeps files for the tunnel. Cleanup lists them.
Credentials
bqto never needs a service account key. bqto runs as a service account through impersonation or
Workload Identity Federation, with no key. See
Run as a service account.
The bastion
e2-microby default, Shielded VM (secure boot, vTPM, integrity monitoring), from the publicdebian-cloudimage, or the image that--imagenames in bqto Pro. The boot disk uses the default encryption of Google.- No external IP and no service account. OS Login is on. If its subnet has Cloud NAT, the bastion can still reach the internet. bqto does not check for Cloud NAT.
- It deletes itself when
--durationends, even if bqto was killed. Compute Engine enforces the deadline, not bqto. The developer picks the duration: 30 minutes by default, and up to 120 days. An admin cannot set a limit on it. - It carries the label
bqto=sessionand a random name,bqto-plus eight hex characters. Nothing on it names the person who created it. The audit logs do.
What a developer can do
bqto adds no power that a developer did not have. The roles that it needs let them create a VM and open a tunnel by hand.- Other addresses in the VPC: a bastion reaches what any VM there reaches. bqto does not limit
it. To limit it, give bastions their own subnet with egress firewall rules, and grant
compute.subnetworks.useon that subnet only. This setup needs the--subnetflag of bqto Pro, or a profile that holds it. - Root on the bastion, a colleague’s included: with
roles/compute.osAdminLogin(bqto warns when the session has it), or throughcompute.instances.setMetadataon anybqto-*VM. The fix is the minimal custom role, which holds noreset,stop, orstart, together with the organization policycompute.requireOsLogin. - Other ports of the bastion: closed by granting
roles/iap.tunnelResourceAccessorwith the conditiondestination.port == 22. - Other VMs: closed by the IAM condition that limits the role to
bqto-*.
The audit trail
Who created a
bqto-* VM:
protoPayload.resourceName. To see who removed it,
change insert to delete.
Who logged in to one:
Shared machines and CI
bqto assumes one person for each machine. Every local port that bqto opens listens on127.0.0.1.
That keeps the network out, but not the other accounts and jobs on the same machine.
- The hints of bqto keep tokens out of the command line, where
psshows them to every user. - A port forward and the SOCKS proxy have no login. Anyone on the machine can use them while the session is up.
- In bqto Pro, the
--webproxy asks for the session secret.
- GitHub-hosted runners are safe. Each job gets its own VM, which is deleted after the job.
- A self-hosted runner is safe when it runs one job for each VM, and the VM is deleted after the job (an ephemeral runner).
- A self-hosted runner that runs several jobs or repositories on one machine at the same time is a risk. Another job there can use your session, and with it your identity on the service.