Move to Pantech / Connect Google Cloud
Connect Google Cloud
Give Pantech read-only access to your Google Cloud projects with Workload Identity Federation, without creating a service account key, then check, fix or remove the connection.
Pantech reads your Google Cloud projects through a service account that only your Pantech connection can use. You never create or share a service account key: Pantech signs a token for this connection, and Google's Security Token Service swaps it for read-only access that lasts 15 minutes. Nothing secret is stored on either side.
You need to be an Owner of the project that will hold the identity pool, and able to grant roles on each project you want scanned. On Pantech you need to be an Owner or Admin of your organization.
How it works
- You create a connection with
providergcp. It gets an id likeccn_06gk3x9tq7m2v8r4y1c5d0zp8w, the status awaiting role, and asetupwith a script for your projects. - You run the setup script (or its Terraform version) in your Google Cloud organization. It creates:
- a workload identity pool,
pantech-migrate, and in it one OIDC provider for this connection, which trusts Pantech's issuer (setup.issuer_url), accepts only the audiencepantech-migrate, and has the conditionassertion.sub == '<connection id>'; - a service account,
pantech-migrate-…, whose only Workload Identity User is this connection's subject; - a custom role,
pantechMigrateReader, on each project you scan, granted to that service account.
- a workload identity pool,
- The script prints a line of JSON. You send it to Pantech, and the connection moves to verifying while Pantech uses the service account once.
- The connection is connected, ready to scan. If the check fails it is failed, with a reason and what to do.
Create the connection
$ curl -X POST https://api.pantechdynamics.com/public/v1/cloud-connections \ -H "Authorization: Bearer $PANTECH_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d '{"provider": "gcp", "name": "Production GCP"}'Or ask your AI app to do it (see with your AI). The response's setup holds:
setup field | What it is |
|---|---|
access | federated |
issuer_url, audience, subject | Pantech's issuer, pantech-migrate, and this connection's id: the three values the provider trusts |
template | The gcloud setup script, written for this connection (template_format is shell) |
files | The same setup as Terraform: pantech-migrate-gcp.tf |
permissions | Every permission the custom role holds |
Save setup.template as pantech-migrate-gcp.sh, for example with jq -r .setup.template.
Run the setup
Run the script in Cloud Shell, or anywhere gcloud is signed in as an Owner of the project that will hold the pool. PROJECT_ID is that project; SCAN_PROJECTS lists every project Pantech may read (1 to 20, and it defaults to PROJECT_ID):
$ PROJECT_ID=my-project SCAN_PROJECTS="my-project other-project" \ bash pantech-migrate-gcp.shIt turns on the APIs it needs in PROJECT_ID (IAM, IAM Credentials, Security Token Service, Compute Engine, Cloud SQL Admin and Cloud Resource Manager), creates the pool, the provider, the service account and the role, and ends by printing what to send to Pantech:
{"gcp":{"project_number":"123456789012","pool_id":"pantech-migrate","provider_id":"pantech-…","service_account_email":"pantech-migrate-…@my-project.iam.gserviceaccount.com","project_ids":["my-project","other-project"]}}With Terraform instead, write files[0].content to pantech-migrate-gcp.tf and apply it; its pantech output is the same JSON:
$ terraform init$ terraform apply -var project_id=my-project -var 'scan_projects=["my-project","other-project"]'$ terraform output -raw pantechSend it to Pantech
Send what the setup printed, then poll the connection until status is connected or failed:
$ curl -X PATCH https://api.pantechdynamics.com/public/v1/cloud-connections/ccn_06gk3x9tq7m2v8r4y1c5d0zp8w \ -H "Authorization: Bearer $PANTECH_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d '{"gcp": {"project_number": "123456789012", "pool_id": "pantech-migrate", "provider_id": "pantech-…", "service_account_email": "pantech-migrate-…@my-project.iam.gserviceaccount.com", "project_ids": ["my-project", "other-project"]}}'These are identifiers, not secrets. To scan more projects later, run the script again with the new list in SCAN_PROJECTS and send the new JSON.
Every permission the role holds
A custom role, so Pantech reads only what it needs. The built-in roles/compute.viewer would also allow reading serial port output and screenshots, so it is not used.
| Permission | What for |
|---|---|
compute.instances.list, compute.machineTypes.list | Servers, and their vCPUs and memory |
compute.disks.list | Disks |
compute.networks.list, compute.subnetworks.list | Networks and subnets |
compute.firewalls.list | Firewall rules |
compute.addresses.list, compute.globalAddresses.list | Public addresses |
compute.forwardingRules.list, compute.globalForwardingRules.list | Load balancers |
compute.regions.list, compute.zones.list | Where things run |
cloudsql.instances.list | Cloud SQL databases |
storage.buckets.list | Bucket names |
resourcemanager.projects.get | The project itself |
resourcemanager.projects.getIamPolicy | The people with access to the project |
Every request Pantech makes also names exactly the fields it wants, so a server's metadata, where startup scripts live, is never sent to Pantech.
What a scan reads
Servers, disks, networks and subnets, firewall rules, public addresses, load balancers, Cloud SQL databases and bucket names, in every project you listed. People are the user: members of each project's IAM policy: groups and service accounts are not people. An owner or project IAM admin is suggested as an Admin on Pantech, anyone else as a Member (see invite your team).
Google Cloud has no read-only spend API without a BigQuery billing export, so a scan does not read your bill. It carries the warning cost_not_available, and the plan's price comparison shows no Google Cloud figure.
If the check fails
| Code | What it means | What to do |
|---|---|---|
assume_role_denied | Pantech couldn't use the service account | Check the setup script finished, and that the project number, pool, provider and service account you sent are the ones it printed. Then retry |
permission_missing | The service account is missing a permission on a project | Run the latest setup script again for every project you chose, then retry |
provider_unavailable | Google Cloud did not answer in time | Retry in a few minutes |
internal | Something went wrong on Pantech's side | Retry; if it keeps happening, contact support |
Retry with PATCH /cloud-connections/{connection_id} and {"retry": true}. Details that do not fit Google Cloud's shape are refused straight away with 422 VALIDATION_FAILED and INVALID_FEDERATION. Troubleshooting has every code.
The agent, for copies
Pantech scans this cloud itself, so a scan needs nothing installed. The copy steps that read from inside your network use the Pantech Migrate agent, which this connection can have too: copying a server from the server itself, importing a database and moving a Kubernetes cluster. Enroll it with POST /cloud-connections/{connection_id}/agent-enrollments or pantech migrate agent enroll <connection id>. Here it never scans and needs no Google Cloud credential: only what each copy step needs, in its configuration.
Disconnect
- In Pantech, disconnect the connection:
DELETE /cloud-connections/{connection_id}, or ask your AI app. Its scans are deleted with it; plans stay until you delete them. - In Google Cloud, delete the pool's provider for this connection, the service account and the
pantechMigrateReaderrole on each project, or runterraform destroyif you used the Terraform version. Deleting the provider or the service account alone already cuts access.