gcpGKE connector id:
gke
Quick start
Run Cynative from an environment where ADC works:Credential discovery
Cynative calls Google Application Default Credentials with thehttps://www.googleapis.com/auth/cloud-platform scope via google.FindDefaultCredentials. The ADC search order determines which identity is used.
Credential sources
GOOGLE_APPLICATION_CREDENTIALS— path to a credential JSON; the first source in the ADC search order.- On Windows,
APPDATAlocates the well-known ADC file.
GOOGLE_APPLICATION_CREDENTIALS only as a startup presence signal (to decide whether to emit a loud vs. quiet skip). The gcloud project/config variables (CLOUDSDK_*, GOOGLE_CLOUD_PROJECT) are not consulted by Cynative’s project resolution.
Registration and validation
Cynative finds ADC and then eagerly validates it at startup by minting a test cloud-platform token. Thegcp and gke connectors register only if that succeeds. If ADC cannot be found, or the credential cannot mint a token (for example a revoked refresh token), both connectors are skipped.
References:
- How Application Default Credentials works — the ADC search order (
GOOGLE_APPLICATION_CREDENTIALS→ thegcloud auth application-default loginfile → the metadata server).
Target selection
Default target
The identity is whatever the ADC chain resolves — typically the user credentials written bygcloud auth application-default login, or an attached service account on a GCP host. There is no single fixed project target: the specific project/resource is chosen per request by the model in the request URL path (for example .../v1/projects/{project}/...).
Changing the target
Change the identity by re-pointing ADC: rungcloud auth application-default login, set GOOGLE_APPLICATION_CREDENTIALS to a credential JSON, or run on a host with a different attached service account.
The project Cynative uses to build its testable-permission catalog is resolved from the ADC credential in order:
- The credential’s own project (
Credentials.ProjectID— populated from a service-account key’sproject_id; empty forgcloud auth application-default loginuser credentials). - The ADC file’s
quota_project_id— set viagcloud auth application-default set-quota-project PROJECT. - The GCE metadata project.
GOOGLE_CLOUD_PROJECT and gcloud active-config variables (CLOUDSDK_CORE_PROJECT, CLOUDSDK_CONFIG, CLOUDSDK_ACTIVE_CONFIG_NAME) are not consulted by Cynative’s ADC project resolution.
Request usage
Useauth_provider: "gcp" and include a gcp_auth object:
gcp_auth.service is required. gcp_auth.location is used for regional or locational endpoints and is omitted for global endpoints.
Minimal example:
Hardening
Because GCP has no general credential-downscoping primitive, the in-process action gate is the client-side control: a request resolves to a service and operation, those resolve to required IAM permissions, and every permission must be granted by the configured role before the ADC token is attached.Host pinning
Cynative resolves Google API hosts to a service and location through the cached Discovery directory catalog. The resolved service and location must match the model-suppliedgcp_auth claim, so a request cannot claim one Google service while sending credentials to another.
Action authorization
Cynative classifies the API operation, resolves the IAM permissions it requires, and authorizes every required permission against the configured role. The gate fails closed: if Cynative cannot resolve the service, operation, or required permissions, the request is denied. A small fixed set of methods need no IAM permission and are allowed without a role check:oauth2.tokeninfo, discovery.apis.getRest, discovery.apis.list, and any *.testIamPermissions probe.
Response redaction
Cynative redacts secret-shaped content and credential-named fields from responses before the model sees them. Redaction is a defense-in-depth layer — treat returned GCP data as sensitive.Reading the startup posture
access=default(read-only)whenconnectors.gcp.roleisroles/viewer;access=customfor any other role.enforced=client— GCP has no general credential-downscoping primitive; the in-process per-operation IAM permission check is the sole client-side control.role=<role>— the configured role verbatim.(+gke)— the GKE connector is folded in.
Cynative configuration
The predefined or custom role the action gate authorizes against. Defaultroles/viewer.
roles/<id>) or a custom role (projects/<p>/roles/<r> or organizations/<o>/roles/<r>). The role is an operator-chosen ceiling, not inherently read-only: a custom role granting write permissions widens the gate accordingly. A role that cannot be fetched, is disabled, or is soft-deleted causes the gcp and gke connectors to be skipped at startup with a clear reason.
Cache settings
GCP hardening metadata (Discovery catalog and iam-dataset permission registry) is cached under<cache.dir>/gcp. The role definition is fetched live per run and is not cached.
GKE connector
The GKE connector provides Kubernetes API access to Google Kubernetes Engine clusters. It registers alongside thegcp connector, sharing the same ADC token source.
Connector id: gke
How it works
Cynative reuses the same Google ADC token source as the GCP connector for Kubernetes bearer tokens. For each request it:- Resolves the cluster endpoint and CA data from the GKE Container API (requires ADC credentials with access to the Container API).
- Attaches the ADC bearer token only after host and action authorization pass.
- Applies the shared Kubernetes hardening model (host pinning,
viewRBAC gate, dial-time IP authorization, response redaction).
GKE requires an IP-literal endpoint. A DNS-based GKE control-plane endpoint resolves to shared Google Front End (GFE) infrastructure and is not IP-pinnable; the dial-time guard rejects it. Use a cluster whose endpoint is an IP literal.
Request usage
Useauth_provider: "gke" and include a gke_auth object:
project is a project ID (6–30 lowercase letters, digits, or hyphens, starting with a letter) or project number. location is a region (us-central1) or zone (us-central1-a). cluster_name is up to 40 lowercase letters, digits, or hyphens, starting with a letter and not ending with a hyphen.
Configuring the ClusterRole
The read-only ClusterRole the GKE connector authorizes against is configurable (defaultview):
view widens Cynative’s permitted verbs — including writes. See the shared Kubernetes hardening model for full details.
Defense at a glance (GCP + GKE)
Limitations
- Credential downscoping is not used. GCP Credential Access Boundaries are Cloud-Storage-only; there is no general downscoping primitive. The in-process action gate is the sole client-side control.
- Custom roles are resolved per run via
iam.roles.get; the ADC principal must holdiam.roles.geton the role’s project or organization. An unresolvable, disabled, or soft-deleted role fails closed (all requests denied). - Organization-level permissions may not be testable at the caller project. Common Resource Manager resource-discovery methods (
projects/folders/organizationslist and search) are pinned and resolve correctly; other parent-scoped operations may be denied regardless of the configured role. - Action authorization fails closed when service, operation, or permission resolution fails.
- DNS-based GKE control-plane endpoints fail closed. Use a cluster whose endpoint is an IP literal.
- There is no client-side credential downscoping for GKE. The in-process
viewgate, host pinning, and dial-time IP authorization are the only client-side controls. - The GCP connector is for Google Cloud APIs. Use
gkefor Kubernetes API calls to GKE clusters.

