Skip to main content
This page is for the team that decides whether developers are allowed to use bqto. It says what bqto does with your identity, your network, and your data, and what it does not do. The roles are in Permissions.

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 version and bqto update only.
    • Polar, from bqto Pro, to check the license key. See License key.
  • Only bqto version and bqto update ask for the newest release. The free bqto sends one unauthenticated GET to api.github.com/repos/pilef-co/bqto/releases/latest, with the User-Agent bqto and nothing about you, your version, or your projects. GitHub sees your IP address. bqto Pro looks in the releases of pilef-co/bqto-pro-releases on GitHub. Nothing runs in the background. If you never want bqto to contact GitHub, do not run these two commands.
  • bqto update checks what it downloads. It installs only an archive whose SHA-256 matches the checksums.txt of 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.txt comes 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 on 127.0.0.1 adds your identity token to each request.
  • The --web proxy asks for the session secret. bqto makes one secret for each session. A request with neither the cookie that the link sets nor the X-Bqto-Token header 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-micro by default, Shielded VM (secure boot, vTPM, integrity monitoring), from the public debian-cloud image, or the image that --image names 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 --duration ends, 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=session and 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.use on that subnet only. This setup needs the --subnet flag 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 through compute.instances.setMetadata on any bqto-* VM. The fix is the minimal custom role, which holds no reset, stop, or start, together with the organization policy compute.requireOsLogin.
  • Other ports of the bastion: closed by granting roles/iap.tunnelResourceAccessor with the condition destination.port == 22.
  • Other VMs: closed by the IAM condition that limits the role to bqto-*.
Narrowing the grant shows each condition.

The audit trail

Who created a bqto-* VM:
To ask about one bastion, add its name to protoPayload.resourceName. To see who removed it, change insert to delete. Who logged in to one:
The bastions that the deadline deleted, because bqto was not running:

Shared machines and CI

bqto assumes one person for each machine. Every local port that bqto opens listens on 127.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 ps shows 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 --web proxy asks for the session secret.
In CI, run bqto where no one else shares the machine:
  • 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.
The services still check who connects. bqto gets a developer to the port. The database, cache, or API decides whether they get in.

Report a vulnerability

Report a vulnerability privately, never in a public issue. Use the private vulnerability reporting of GitHub. On the Security tab of pilef-co/bqto, choose Report a vulnerability. Fixes go into the latest release only.