gcpfoundations.robhigareda.demo.altostrat.comDEMO SESSION: demo-viewer@gcpfoundations.demo.altostrat.com (Mint Project Vendor)
Mint — Vending Google Projects with Secure Standards and Guardrails
Terminal Runner: Checking... 0 / 8 Steps Completed HTTPS ALB + Cloud IAP (Google Workspace)

Mint — Vending Google Projects with Secure Standards and Guardrails

Follow this step-by-step runbook to deploy the Mint Scale-to-Zero Serverless Control Plane (/controlplane) and the optional Data Plane telemetry module (/dataplane) into your Google Cloud Organization behind an HTTPS Application Load Balancer + Cloud IAP, with zero direct public resource exposure and a verified compliance-regime-to-folder registry that decides where every vended project is created.

Cloud Run Gen2 (min_instances = 0) Separation-of-Duties CMEK default_uri_disabled = true Regime-to-folder registry verified against Assured Workloads Guide version 1.3.4 (matches control plane v1.3.4)

Note: This is not an officially supported Google product.

OVERVIEW

What You Are Deploying and How the Pieces Fit Together

New User Orientation

If you are deploying Mint for the first time, it helps to understand what the service builds in your Google Cloud Organization, why it asks for two separate project IDs, and how it decides which folder a vended project lands in. The solution has three core layers:

1. Control Plane Host Project

The "Mint Vending Machine and Web Portal"

What it is: A GCP project (created in Step 1 inside a standard Mint-Folder) that acts as the central headquarters for Mint.

What lives inside it:

  • HTTPS Load Balancer + Cloud Armor + Cloud IAP: The front door. Cloud Armor enforces US-origin geo-fencing, 180 req/min per-IP rate limiting, and OWASP ModSecurity CRS v3.3 WAF rules, while Cloud IAP forces a Google Workspace sign-in before anything loads.
  • Cloud Run Service (Scale-to-Zero): Runs the React portal and the FastAPI orchestrator. The orchestrator verifies the IAP JWT cryptographically on every request (fail-closed) and applies an application-layer authorization check (log or enforce mode).
  • Firestore Database (account-vendor-state) & Remote State: Stores every vended project record, provisioning steps, and the decommissioned_projects archive, while a CMEK-encrypted GCS bucket (<host-project>-tfstate) holds Terraform state and DATA_READ/DATA_WRITE Cloud Audit Logs record all access.
2. Separated KMS Project (CMEK)

The "Independent Encryption Key Vault"

What it is: A second, dedicated GCP project (also created in Step 1) that holds your Customer-Managed Encryption Key (Cloud KMS) and nothing else.

Why can't keys live in the Control Plane project?

  • Federal security baselines (FedRAMP Moderate and High, DoD IL4 and IL5) require Separation of Duties between the application and its key material (enforced with predefined KMS roles and zero human roles/owner bindings on the vault project).
  • The key (vendor-ring/cp-dp-cmek-key, 90-day rotation) encrypts Cloud Run, Pub/Sub, Artifact Registry, and the remote Terraform state bucket (<host-project>-tfstate). Firestore CMEK is optional (enable_firestore_cmek) because it requires a Google allowlist.
3. Vend Destinations (Regime-to-Folder Registry)

Where Vended Projects Are Created

What it is: A registry declared in Step 2 (controlplane/terraform/mint.auto.tfvars) that maps each compliance regime to a folder:

  • commercial maps to a standard folder (by default the Mint-Folder from Step 1).
  • fedramp-moderate, fedramp-high, dod-il4, dod-il5 must each map to the consumer folder of an Assured Workloads workload whose regime matches. The control plane re-verifies this against the Assured Workloads API at runtime and refuses to vend (HTTP 422) when it does not. Regimes without a folder are shown as unavailable in the portal.
  • Every vended project receives: the verified parent folder, mandatory governance labels (vended-by=mint-control-plane, environment, compliance-regime, owner-group, assured-workload, plus up to 16 custom RFC 1035 labels) with continuous child-resource tag compliance monitoring (auto-tag-and-alert or alert-only), optional GCP Resource Manager tagValues/NUMERIC_ID bindings for native hierarchy inheritance, a billing link, approved APIs, a least-privilege owner binding (including roles/compute.admin or the roles/mint.systemAdmin Systems Administrator bundle that grants full resource administration while excluding resourcemanager.projects.setIamPolicy), optional custom multi-region VPC networking (with Assured Workloads regional boundary lock, Private Google Access, and VPC Flow Logs), optional two-stage project TTL lifecycle enforcement, and project Org Policies (storage.publicAccessPrevention, compute.vmExternalIpAccess deny-all, run.allowedIngress internal only, plus compute.skipDefaultNetworkCreation when custom VPC networking is enabled).
Data Plane telemetry module: deploy.sh Step 4 applies dataplane/terraform, which provisions three CMEK-encrypted Pub/Sub topics and durable subscriptions, an Organization Cloud Asset feed, and an Organization audit log sink. The scheduled 15-minute gcp-account-vendor-ttl-enforcer Cloud Run Job (ttl_worker.py) and optional Cloud Function workers (asset_tracker, cost_tracker, permission_enforcer) process these telemetry streams.
DOCUMENTATION

Complete Parameter Reference: What Exists vs. What You Choose

18 Deployment Parameters Explained

New users often ask: "Do I need to create the Control Plane Host Project or Service Account before I fill out the form below?" No. Only the Look Up parameters are existing IDs you read from your Google Cloud / Google Workspace account. The You Choose parameters are names and settings you pick now; Steps 1 through 6 create them for you. The Registry parameters point at folders that already exist (or that you create in Step 2).

Quick Rule of Thumb:
Look Up (Pre-Existing) = Already exists in your GCP Organization or Google Workspace before you start.
You Choose (Created by Guide) = You invent the ID or pick the setting now; Steps 1 to 6 create it for you.
Registry / Policy = Decides where vended projects go and who may vend them.
Run in Terminal = Every command block includes a Run in Terminal button so you can review, edit, and execute each step from this page when launched with ./deploy.sh --guide.
Parameter Name Status Plain-English Purpose Where to Find It / How to Choose It
1. GCP Organization ID Pre-Existing The root numeric ID of your entire Google Cloud company/agency hierarchy. Run gcloud organizations list (look at the ID column).
2. Control Plane Host Project ID Created in Step 1 The unique ID for the project that runs the Mint web UI, API, Firestore, and Load Balancer. Invent a globally unique lowercase ID (6-30 chars), e.g. example-mint-cp.
3. Separated KMS Project ID (CMEK) Created in Step 1 The unique ID for the separate encryption key vault project (Separation of Duties). Invent a second globally unique lowercase ID, e.g. example-mint-kms-vault.
4. Billing Account ID Pre-Existing Your active Cloud Billing Account that pays for the host projects and vended projects. Run gcloud billing accounts list (format: XXXXXX-XXXXXX-XXXXXX).
5. US Sovereign Region Architectural Choice The US region where the KMS key, Artifact Registry, and Cloud Run service live. Pick us-central1 (Iowa), us-east4 (N. Virginia), or us-west1 (Oregon).
6. Default Compliance Regime Registry / Policy The regime pre-selected in the portal's vend form. It must have a destination folder in the registry. Pick commercial, fedramp-moderate, fedramp-high, dod-il4, or dod-il5.
7. HTTPS Load Balancer Domain (FQDN) Configured in Step 7 The web URL your admins type into their browser to open the Mint portal. Choose a subdomain on a domain you control (e.g. mint.example.com).
8. Cloud DNS Host Project ID Pre-Existing The project that hosts the Cloud DNS managed zone for your portal domain. Run gcloud dns managed-zones list --project=<project> to confirm the zone.
9. Google Workspace Domain Pre-Existing Your organization's primary Google Workspace email domain used for employee sign-in. The domain after the @ in your work email (e.g. example.com).
10. Google Workspace Customer ID Pre-Existing Your immutable Google Workspace Directory ID (starts with C0...) used for the Domain Restricted Sharing lock. Run gcloud organizations list (DIRECTORY_CUSTOMER_ID column) or check admin.google.com.
11. IAP Accessor Group Email Bound in Step 6 The Google Group whose members may pass the Cloud IAP sign-in screen (roles/iap.httpsResourceAccessor). Create the group first (Step 4). Avoid domain:-wide access; use a group.
12. Orchestrator Service Account Mode Architectural Choice Whether the deployment script creates the orchestrator Service Account or uses one you already made. Select create (recommended for first-time setup) or existing.
13. Service Account Name / Email Created in Step 6 The identity the Control Plane uses to create vended projects and apply guardrails. Keep account-vendor-orchestrator if Mode is create, or paste a full SA email if existing.
14. Commercial Destination Folder Registry Standard folder for commercial projects. Leave blank to use the Mint-Folder created in Step 1, or enter a folder number.
15. Regulated Destination Folders Registry Assured Workloads consumer folders for fedramp-moderate, fedramp-high, dod-il4, dod-il5. Click Discover Assured Workloads Folders in the customizer, or run gcloud assured workloads list. Leave a regime blank to disable it.
16. Authorization Mode Policy log records who would be denied vend/decommission rights; enforce returns HTTP 403 to non-administrators. Start with log, review authz_would_deny log lines (Test 8.4), then switch to enforce.
17. Mint Administrators Policy Who may vend and decommission projects: a Google Group (checked via Cloud Identity) and/or a list of emails. Enter a bare group email (no group: prefix) and/or comma-separated emails.
18. Demo Mode Policy Enables the synthetic circuit-breaker and security-event simulation endpoints in the portal. Keep false for production and compliance deployments.

Deep-Dive Lookup Instructions and Examples (Click Any Group to Expand)

Tip: All expandable sections below use native HTML <details> elements so you can also press Ctrl+F / Cmd+F to search inside them at any time.

How to Look Up Your Pre-Existing GCP and Google Workspace IDs (Parameters 1, 4, 9, 10) Run Before Filling Out Form

Click Run in Terminal (or run these read-only gcloud commands yourself) to print your GCP Organization ID, Google Workspace Customer ID, and Billing Account ID:

# 1. Print your Organization Domain, Organization ID, and Workspace Customer ID (DIRECTORY_CUSTOMER_ID):
gcloud organizations list

# Example output:
# DISPLAY_NAME            ID             DIRECTORY_CUSTOMER_ID
# example.com             123456789012   C00000000
#  ^-- Workspace Domain    ^-- Org ID     ^-- Workspace Customer ID

# 2. Print your active Cloud Billing Account ID (must show OPEN = True):
gcloud billing accounts list

# Example output:
# ACCOUNT_ID            NAME                        OPEN   MASTER_ACCOUNT_ID
# 000000-000000-000000  Enterprise Cloud Billing    True
Terminal Output

                
  • Where to find them in the Google Cloud Console UI instead: Open the Project Picker at the top-left of console.cloud.google.com, click Manage Resources to see your Organization ID, or open Billing from the left navigation menu to copy your Billing Account ID.
  • Where to find your Google Workspace Customer ID in Admin Console: Sign in to admin.google.com → Account → Account settings → Profile → copy the Customer ID (always starts with C0).
How the Vend Destination Registry Works (Parameters 6, 14, 15: Compliance Regime to Folder) Replaces the old "Use Assured Workloads" toggle
  • Why a registry instead of a toggle? Selecting "FedRAMP High" in a vend form only means something if the project is created inside a folder that is actually governed by a FedRAMP High Assured Workloads control package. Mint therefore keeps a server-side map of regime -> folder (vend_destinations in controlplane/terraform/mint.auto.tfvars, delivered to Cloud Run as MINT_VEND_DESTINATIONS). Callers can never choose an arbitrary folder.
  • Runtime verification: On startup (and every 15 minutes) the control plane lists Assured Workloads in the US locations and checks that each regulated folder is the CONSUMER_FOLDER of a workload with a matching regime (FEDRAMP_MODERATE / DATA_BOUNDARY_FOR_FEDRAMP_MODERATE, and so on). The portal shows the verified folder, workload regime, and verification time; unverified regimes are disabled.
  • Commercial projects go to a standard folder. If you leave the commercial field blank, Step 2 resolves the Mint-Folder created in Step 1.
  • Do not have an Assured Workloads folder yet? Step 2 includes an optional command that creates one for a regime (requires roles/assuredworkloads.admin and a billing account). Leave the regime blank until the workload exists; the regime stays unavailable in the portal.
  • The Control Plane itself does not need to live inside an Assured Workloads folder; the compliance boundary is applied to the vended projects through the registry. The legacy --use-assured-workloads flag of deploy.sh is therefore set to false by this guide, which keeps the orchestrator at read-only roles/assuredworkloads.reader.
How to Choose Your Two New Project IDs (Parameters 2 and 3: Control Plane vs. KMS Vault) Created Automatically in Step 1
  • Do these projects exist yet? No. Unless you already created them manually, Step 1 creates both projects inside Mint-Folder and links them to your Billing Account.
  • Why must Google Cloud Project IDs be globally unique? Every GCP project ID shares a global namespace across all Google Cloud customers. Prefix both IDs with your agency or company abbreviation, for example:
    • Control Plane Host Project ID: <your-org-prefix>-mint-cp
    • Separated KMS Project ID: <your-org-prefix>-mint-kms-vault
  • Naming Rules: 6 to 30 characters, start with a lowercase letter, and contain only lowercase letters (a-z), numbers (0-9), and hyphens (-).
How to Choose Your Portal Domain and IAP Accessor Group (Parameters 7, 8, 11) Zero-Trust Cloud IAP Ingress
  • HTTPS Load Balancer Domain (FQDN): Direct public access to Cloud Run is disabled (default_uri_disabled = true), so all users reach the portal through a Global External Application Load Balancer with a Google-managed TLS certificate. Pick a subdomain you can add a DNS A record for in Step 7 (such as mint.example.com). Google-managed certificates require a real public DNS record to finish provisioning.
  • IAP Accessor Group Email: Cloud IAP blocks everyone by default. Only members of the Google Group you specify receive roles/iap.httpsResourceAccessor. If the group does not exist when deploy.sh runs, the script falls back to domain:<workspace domain>, which lets every account in your domain reach the sign-in page. Step 4 checks the group before you deploy; create it first.
  • IAP authentication vs. Mint authorization: IAP decides who can open the portal. The Mint Administrators setting (Parameter 17) decides who can vend or decommission projects once inside.
How Authorization Mode and Mint Administrators Work (Parameters 16, 17, 18) Application-Layer Authorization
  • Sources of truth: MINT_ADMIN_EMAILS (comma-separated list, checked first) and MINT_ADMIN_GROUP (a Google Group checked through the Cloud Identity transitive membership API, cached for 5 minutes).
  • log mode (default): every vend or decommission request is allowed, but the control plane writes authz_would_deny principal=... reason=... for callers who are not administrators. Use Test 8.4 to review these lines and tune the administrator population.
  • enforce mode: the same callers receive HTTP 403 and the control plane logs authz_denied. Switch to enforce only after the administrator list or group is populated; with no administrators configured, every state-changing call is denied.
  • Demo mode: keep false. When true, the synthetic circuit-breaker and security-event simulators are exposed in the API and UI.
How Orchestrator Service Account Mode Works (Parameters 12 and 13) Least-Privilege Automation Identity
  • What does the Orchestrator Service Account do? When an administrator clicks Vend Project, the Control Plane uses this Service Account to create the project in the verified destination folder, attach billing, enable approved APIs, bind the owner principal, and apply the project Org Policies.
  • Option A - create (recommended for first-time users): Leave Mode set to create and keep account-vendor-orchestrator. Step 6 creates account-vendor-orchestrator@<CONTROL_PLANE_PROJECT_ID>.iam.gserviceaccount.com.
  • Option B - existing (for strict IAM separation teams): Select existing and enter the full email of a pre-provisioned Service Account.
  • Roles granted: folder-scoped vend roles on every registered destination folder (resourcemanager.folderViewer, projectCreator, projectDeleter, projectIamAdmin, resourcemanager.tagUser, serviceusage.serviceUsageAdmin, compute.networkAdmin, compute.admin, storage.admin, bigquery.admin, cloudasset.viewer, logging.viewer, billing.projectManager), read-only roles/assuredworkloads.reader, roles/resourcemanager.organizationViewer, roles/resourcemanager.tagUser, roles/resourcemanager.tagViewer, and roles/logging.viewer at the Organization, roles/orgpolicy.policyAdmin and roles/iam.denyAdmin at the Organization (required by GCP IAM for project-level Org Policy and IAM v2 Deny Policy writes), roles/datastore.user, roles/pubsub.subscriber, roles/pubsub.viewer, and roles/serviceusage.serviceUsageConsumer on the host project, and roles/cloudkms.cryptoKeyEncrypterDecrypter on the vault key. All legacy Organization-wide admin grants have been contracted and removed. No roles/owner or roles/editor.
How Tagging Options, Resource Manager TagValue Inheritance, and Custom VPC Networking Are Configured at Deployment Tagging & Network Governance
  • Option 1 - Mandatory Project & Child-Resource Governance Labels (Enabled by Default): Every project vended by Mint is stamped at launch with required governance labels (vended-by=mint-control-plane, environment, compliance-regime, owner-group, assured-workload) plus up to 16 custom RFC 1035 key/value labels (such as cost-center, data-classification, or system-owner). During deployment, deploy.sh and controlplane/terraform automatically grant the Orchestrator Service Account roles/cloudasset.viewer at the Organization and roles/resourcemanager.projectCreator / roles/compute.networkAdmin on each registered destination folder so the Untagged Resource Compliance Monitor can continuously inventory child resources and either auto-propagate missing baseline labels (auto-tag-and-alert) or flag drift (alert-only).
  • Option 2 - Optional GCP Resource Manager TagValue Hierarchy Inheritance (tagValues/NUMERIC_ID): If your organization uses IAM Conditions or Organization Policies backed by native GCP Resource Manager Tags, you can pass comma-separated tagValues/NUMERIC_ID (or namespaced ORG_ID/KEY/VALUE) when vending a project so every child resource inside the project inherits those governance tags automatically through the GCP resource hierarchy. Additional IAM requirements for Option 2:
    • For administrators listing or creating TagKeys/TagValues via CLI: Grant roles/resourcemanager.tagViewer (to run gcloud resource-manager tags keys list --parent=organizations/<ORG_ID>) and roles/resourcemanager.tagAdmin (to create TagKeys and TagValues at the Organization).
    • For the Mint Orchestrator Service Account: Grant roles/resourcemanager.tagUser on the destination folders (provisioned automatically by deploy.sh and controlplane/terraform for resourcemanager.projects.createTagBinding) and grant roles/resourcemanager.tagUser on the target Organization or specific tagValues/NUMERIC_ID (for resourcemanager.tagValues.use): gcloud organizations add-iam-policy-binding <ORG_ID> --member="serviceAccount:<ORCHESTRATOR_SA_EMAIL>" --role="roles/resourcemanager.tagUser" --condition=None. See the official Google Cloud Resource Manager Tags Access Control documentation.
  • Option 3 - Custom VPC & Boundary-Enforced Multi-Region Networking: deploy.sh and controlplane/terraform grant roles/compute.networkAdmin on each registered destination folder so Mint can enforce constraints/compute.skipDefaultNetworkCreation before compute API activation, create a custom-mode VPC, carve deterministic non-overlapping /24 regional subnets from the operator's RFC 1918 CIDR block with Private Google Access and VPC Flow Logs enabled, and enforce an Assured Workloads Regional Boundary Lock on regulated workloads (FedRAMP Moderate, FedRAMP High, DoD IL4, DoD IL5) that disables GLOBAL dynamic routing and restricts subnet placement exclusively to US boundary-accredited regions.
  • Expanded Predefined Owner Roles (roles/compute.admin and roles/mint.systemAdmin): At vend time, operators can select from predefined least-privilege owner roles including roles/compute.admin (Compute Engine Admin) and roles/mint.systemAdmin (Systems Administrator - All Resources, No IAM Changes), which expands into 21 predefined resource and service administration roles (roles/viewer, roles/serviceusage.serviceUsageViewer, roles/serviceusage.serviceUsageAdmin conditionally scoped to approved APIs, roles/compute.admin, roles/storage.admin, roles/run.admin, roles/container.admin, roles/cloudsql.admin, roles/bigquery.admin, roles/secretmanager.secretAccessor, roles/secretmanager.secretVersionManager, roles/artifactregistry.admin, roles/aiplatform.admin, roles/logging.viewer, roles/monitoring.alertPolicyEditor, roles/monitoring.dashboardEditor, roles/monitoring.metricWriter, roles/pubsub.admin, roles/cloudkms.cryptoKeyEncrypterDecrypter, roles/iap.tunnelResourceAccessor, and roles/compute.osLogin) while strictly excluding resourcemanager.projects.setIamPolicy, cloudkms.admin, logging.admin, logging.configWriter, and monitoring.admin.
  • Option 4 - Medical Research Starter Environments (Small, Medium, Large) & Custom Terraform Blueprints: deploy.sh and controlplane/terraform grant roles/compute.admin, roles/storage.admin, and roles/bigquery.admin on each registered destination folder so Mint can provision turnkey clinical/medical research infrastructure (Small: 1x n2-standard-4; Medium: 2x n2-standard-16; Large: 1x n2-highmem-32 + 1x c2-standard-30, plus a CMEK-encrypted GCS bucket and BigQuery dataset) or custom uploaded .tf templates where every resource inherits the vended project prefix (<projectId>-VM1, <projectId>-bucket, <projectId>-BQ) and all required governance labels/tags.
PARAMETER BUILDER

Customize Your Environment Values (Updates All Commands Below)

Live Command Generator

Fill in each parameter below using the guidance on every card. Every gcloud, terraform, and ./deploy.sh command in Steps 1 to 9 updates with your exact values as you type (and is saved in your browser), ready to run via Run in Terminal.

A. Organization, Projects, and Region

Look Up in GCP

What it is: Your root Google Cloud Organization numeric identifier.
How to find: Run gcloud organizations list and copy the ID column.

Format: 8-15 digits (e.g. 123456789012)
Must be an 8-15 digit numeric Organization ID.
Created in Step 1

What it is: Project that hosts the Mint UI, API, Firestore DB, and Load Balancer.
How to choose: Must be globally unique across all of GCP. Click Generate Unique Project IDs above if a name is already taken.

Format: 6-30 lowercase letters, digits, or hyphens (globally unique)
Must be 6-30 lowercase letters, digits, or hyphens.
Created in Step 1

What it is: Dedicated project that holds your Cloud KMS encryption key so application administrators cannot delete keys (Separation of Duties).
How to choose: Must also be globally unique across all of GCP (Step 1 creates it).

Format: 6-30 lowercase letters, digits, or hyphens (globally unique)
Must be 6-30 lowercase letters, digits, or hyphens.
Look Up in GCP

What it is: Active GCP Billing Account linked to the host projects and all vended projects.
Required Role: Your active user must hold roles/billing.user on this Billing Account.

Format: XXXXXX-XXXXXX-XXXXXX (uppercase hex/alphanumeric)
Use the format 000000-000000-000000.
Pick US Region

What it is: Accredited US region where the Cloud KMS key, Artifact Registry repository, and Cloud Run service are pinned for US Data Residency.

Select the US region closest to your users
Registry / Policy

What it is: The regime pre-selected in the portal's vend form (default_compliance_regime). The portal only offers regimes that have a verified destination folder in Section C below.

Select the regime most of your projects will use

B. Ingress, DNS, and Identity

DNS Cutover in Step 7

What it is: The URL where users access the Mint portal behind Cloud IAP.
How to choose: Pick a subdomain on a domain you own (Step 7 creates its DNS A-record in your Cloud DNS project).

Format: fully qualified domain name (e.g. mint.example.com)
Project Hosting DNS Zone

What it is: The GCP project where your Cloud DNS managed zone lives (often a central networking or DNS project).
How it is used: Step 7 creates or updates the DNS A record pointing your Mint domain to the Load Balancer IP.

Format: project ID hosting your Cloud DNS zone
Look Up in GCP

What it is: Your organization's primary Google Workspace email domain required for Cloud IAP identity verification.
How to find: Copy DISPLAY_NAME from gcloud organizations list.

Format: primary email domain (e.g. example.com)
Look Up in GCP

What it is: Your immutable Google Workspace Directory ID used for the iam.allowedPolicyMemberDomains lock on the host project.
How to find: Run gcloud organizations list (DIRECTORY_CUSTOMER_ID column) or click Auto-Detect above.

Format: Directory ID starting with C0 (e.g. C00000000)
Customer IDs start with C followed by 6-12 lowercase letters or digits.
Bound in Step 6

What it is: The Google Group permitted to pass the Cloud IAP sign-in screen (roles/iap.httpsResourceAccessor).
How to choose: Enter a Google Group in your Workspace domain and create it before Step 6 (Step 4 verifies it). Your own account is accepted for a first test.

Format: Google Workspace group email address
Enter a valid Google Workspace group email.
Pick Mode

What it is: Choose whether Step 6 creates the orchestrator Service Account and binds its roles (create), or uses a Service Account you already created (existing).

Recommended: create (for first-time deployments)
Created in Step 6

What it is: The identity the Control Plane uses to vend projects and apply guardrails.
How to fill out: If Mode is create, enter a short name (like account-vendor-orchestrator). If Mode is existing, paste the full SA email.

Format: short SA name (for create) or full SA email (for existing)

C. Vend Destination Registry (Compliance Regime to Folder)

Enter the folder number for each regime you want to offer in the portal. Regulated regimes must be the consumer folder of an Assured Workloads workload with a matching regime; Step 2 verifies this and writes controlplane/terraform/mint.auto.tfvars. Leave a regime blank to disable it (it is shown as unavailable in the portal). Click Discover Assured Workloads Folders to fill these in from your Organization.

Registry

How to choose: Leave blank to use the Mint-Folder created in Step 1, or enter the number of another standard folder.

Format: folder number (digits) or blank
Enter a numeric folder ID or leave blank.
Assured Workloads

Expected workload regime: FEDRAMP_MODERATE or DATA_BOUNDARY_FOR_FEDRAMP_MODERATE.

Format: folder number (digits) or blank to disable
Enter a numeric folder ID or leave blank.
Assured Workloads

Expected workload regime: FEDRAMP_HIGH or DATA_BOUNDARY_FOR_FEDRAMP_HIGH.

Format: folder number (digits) or blank to disable
Enter a numeric folder ID or leave blank.
Assured Workloads

Expected workload regime: IL4 or DATA_BOUNDARY_FOR_IL4.

Format: folder number (digits) or blank to disable
Enter a numeric folder ID or leave blank.
Assured Workloads

Expected workload regime: IL5 or DATA_BOUNDARY_FOR_IL5. Leave blank if your Organization has no IL5 workload; the regime stays unavailable in the portal.

Format: folder number (digits) or blank to disable
Enter a numeric folder ID or leave blank.

D. Application Authorization and Demo Controls

Policy

What it is: log records would-deny decisions for vend/decommission calls without blocking; enforce denies callers who are not Mint Administrators (HTTP 403).

Recommended: enforce (fail-closed RBAC; populate 17a or 17b below, or Auto-Detect will populate your account)
Policy

What it is: Google Group whose transitive members may vend and decommission projects (MINT_ADMIN_GROUP, checked through the Cloud Identity API). Bare email, no group: prefix.

Format: group email or blank
Enter a lowercase group email without a prefix, or leave blank.
Policy

What it is: Comma-separated Workspace user emails authorized to vend and decommission (MINT_ADMIN_EMAILS). Evaluated before the group.

Format: email1@domain,email2@domain or blank
Policy

What it is: Enables the synthetic circuit-breaker and security-event simulation endpoints (MINT_DEMO_MODE). Must be false for production and compliance deployments.

Recommended: false
PRE-FLIGHT IAM

Minimum Permissions Required to Deploy the Solution Fully

Least-Privilege Pre-Flight Checklist

Before executing Step 1, ensure the Google Cloud user identity running the deployment (your active gcloud auth login user) holds the following minimum IAM roles across your Google Cloud Organization and Billing Account.

Already an Organization Administrator? If your user holds Organization Administrator (roles/resourcemanager.organizationAdmin) and Billing Account Administrator (roles/billing.admin), you can grant yourself any missing roles below with the Run in Terminal button at the bottom of this section. When your user creates the two host projects in Step 1, GCP automatically grants your user roles/owner on both projects so Steps 3, 5, 6, and 7 can provision KMS, Cloud Run, Firestore, Pub/Sub, Cloud Armor, the Load Balancer, and Cloud IAP. Remove or downgrade that roles/owner binding after the deployment is verified.
Role Title Predefined GCP Role ID Target Scope Used In Why This Role Is Required
Organization Administrator roles/resourcemanager.organizationAdmin Organization Step 6 Grants resourcemanager.organizations.setIamPolicy to bind the Orchestrator Service Account's Organization-level roles (and allows self-granting any missing roles below).
Folder Admin roles/resourcemanager.folderAdmin Organization Steps 1, 2, 6 Creates or reuses Mint-Folder, reads destination folders, and lets Terraform bind the folder-scoped vend roles on every registered destination folder.
Project Creator roles/resourcemanager.projectCreator Organization Step 1 Provisions the Control Plane Host Project and Separated KMS Project (automatically granting you roles/owner on both new projects).
Assured Workloads Reader roles/assuredworkloads.reader Organization Step 2 Lists Assured Workloads so the registry can be discovered and verified (read-only). roles/assuredworkloads.admin is only needed if you create a new workload in Step 2.
Organization Policy Administrator roles/orgpolicy.policyAdmin Organization Step 6 Sets constraints/run.allowedIngress and constraints/iam.allowedPolicyMemberDomains on the host project.
Logs Configuration Writer roles/logging.configWriter Organization Step 6 Creates the Organization audit sink (gcp-account-vendor-permission-lock-sink) used by the optional Data Plane module. (Logs Viewer is read-only and not sufficient.)
Cloud Asset Owner & Viewer roles/cloudasset.owner / roles/cloudasset.viewer Organization Step 6 Creates the Organization Cloud Asset Inventory feed (gcp-account-vendor-asset-tracker) and grants roles/cloudasset.viewer to the Orchestrator Service Account for the Untagged Resource Compliance Monitor.
Tag Administrator & Tag User roles/resourcemanager.tagAdmin / roles/resourcemanager.tagUser Organization / Folder Step 6 & Vending Allows administrators to list/create Organization TagKeys and TagValues (gcloud resource-manager tags keys list) and lets Step 6 bind roles/resourcemanager.tagUser on destination folders (and optionally at the Organization) so Mint can attach tagValues/NUMERIC_ID bindings at project launch.
Billing Account User (or Billing Admin) roles/billing.user / roles/billing.admin Billing Account Steps 1 and 6 Links the Control Plane and KMS projects to billing in Step 1; roles/billing.admin is required to grant roles/billing.user to the Orchestrator Service Account in Step 6.
Common Permission Pitfalls to Avoid:
  • Logs Viewer vs. Logs Configuration Writer: Many admins have roles/logging.viewer by default, which is read-only. You need roles/logging.configWriter at the Organization level so Step 6 can create the audit log sink.
  • Organization Administrator does not include resource creation: roles/resourcemanager.organizationAdmin allows setting IAM policies, but you must explicitly hold folderAdmin, projectCreator, assuredworkloads.reader, and logging.configWriter before running the deployment.
  • Quota project for Assured Workloads discovery: gcloud assured workloads list needs a quota project with assuredworkloads.googleapis.com enabled. Step 2 enables the API on the Control Plane Host Project and passes it with --project; do not accept gcloud prompts to enable the API on an unrelated default project.
  • External / central-Org Billing Accounts: If your Billing Account is parented under a different Organization, IAM roles granted on your Organization do not inherit onto it. Grant roles/billing.user directly on the Billing Account with the identity that owns it. Pre-Flight and Step 1 detect this and try any other locally authenticated gcloud account.

One-Click Pre-Flight IAM Verification and Self-Grant Command

If your user already has roles/resourcemanager.organizationAdmin, click Run in Terminal below to bind the minimum Organization and Billing roles to your active gcloud account before starting Step 1. This command grants roles to your own identity; run it only if you are the Organization Administrator responsible for this deployment.

Terminal Output

            
STEP 1

Create the Control Plane Folder and Separated Host Projects

Creates (or reuses) a standard Google Cloud folder named Mint-Folder directly under your Organization, then creates the Control Plane Host Project and the Separated KMS Project inside it and links both to your Billing Account. The compliance boundary for vended projects is applied through the destination registry in Step 2, so the Control Plane itself does not need an Assured Workloads folder.

Prerequisites and direct terminal execution: Ensure you have gcloud (>= 460.0.0), terraform (>= 1.5.0), and python3 installed, and authenticate with gcloud auth login. To execute commands directly from this page, launch the guide via ./deploy.sh --guide (or python3 run_guide.py) and click Run in Terminal on any step below. Every command is shown for review and can be edited before it runs.
Terminal Output

            
STEP 2

Register and Verify the Vend Destinations (Compliance Regime to Folder)

This step turns Section C of the customizer into the server-side registry the control plane enforces. It discovers the Assured Workloads consumer folders in your Organization (read-only), verifies that every regulated folder you entered belongs to a workload with the matching regime, resolves the commercial folder, and writes controlplane/terraform/mint.auto.tfvars. Terraform loads *.auto.tfvars automatically, so both ./deploy.sh (Step 6) and a direct terraform apply pick it up.

Fail-closed by design: if a regulated folder does not match its regime, the script stops before writing the registry. The control plane repeats the same verification against the Assured Workloads API at runtime and refuses to vend into an unverified destination (HTTP 422), so the portal can never present a regime that is not actually governed by Assured Workloads.
Terminal Output

            

Optional: Create a New Assured Workloads Folder for a Regime You Do Not Have Yet

Only needed when a regulated regime has no workload in your Organization. Creating a workload is an Organization-level decision (billing, location, control package); review the command, adjust REGIME and LOCATION, then paste the resulting consumer folder number into Section C and re-run Step 2. Requires roles/assuredworkloads.admin. Some regimes require additional flags (for example key management settings); consult the Assured Workloads documentation for your regime.

Terminal Output

            
STEP 3

Provision the Separation-of-Duties Cloud KMS Key (CMEK)

Create a regional Cloud KMS KeyRing and CryptoKey with a 90-day rotation schedule inside your dedicated KMS project, then authorize the Control Plane project's service agents (Firestore, Pub/Sub, Cloud Run, and Artifact Registry) to encrypt and decrypt with that key.

Terminal Output

            
STEP 4

Prepare the Google Workspace Groups for Cloud IAP and Mint Administration

Users reach the Control Plane through Cloud Identity-Aware Proxy (IAP) with their Google Workspace account. This step confirms your Workspace Customer ID, verifies that the IAP accessor group (Parameter 11) exists so deploy.sh binds a group instead of falling back to domain:-wide access, and checks the optional Mint Administrator group (Parameter 17a) used for vend and decommission authorization.

Why this matters: if the IAP accessor group does not exist when Step 6 runs, deploy.sh binds roles/iap.httpsResourceAccessor to domain:<workspace domain>, so every account in the domain can reach the sign-in page. This step exits with an error until the group exists (or until you enter your own account for a first test).
Terminal Output

            
STEP 5

Build and Push the Control Plane Container Image

Create a CMEK-encrypted Artifact Registry repository in your Control Plane project and build the Control Plane container with Cloud Build. The image bundles the React portal and the FastAPI orchestrator (multi-stage build on node:24-slim and python:3.12-slim, non-root user, hash-pinned Python dependencies). The optional Data Plane module in this baseline has no worker images to build. The script prints the image digest so you can pin control_plane_container_image by digest in mint.auto.tfvars after the first deployment.

Terminal Output

            
STEP 6

Execute the First-Use Deployment (./deploy.sh)

./deploy.sh enables the required APIs, creates (or verifies) the Orchestrator Service Account and its roles, applies controlplane/terraform (Load Balancer, Cloud Armor, IAP, Cloud Run, Firestore, folder-scoped SA bindings, and the MINT_* environment including the registry from Step 2), and then applies dataplane/terraform (Pub/Sub topics, asset feed, audit sink). Always run with --dry-run first to inspect every command before mutating cloud resources.

Flags explained: --compliance-regime is the default regime pre-selected in the portal. --use-assured-workloads="false" is a legacy flag kept for compatibility: the destination registry in mint.auto.tfvars is the source of truth, and false keeps the orchestrator at read-only roles/assuredworkloads.reader instead of roles/assuredworkloads.admin. Authorization mode, administrator settings, and demo mode are read from mint.auto.tfvars.

Option A: Dry-Run and Scriptable CLI Deployment

Terminal Output

            

Option B: Update an Existing Deployment with Terraform Only

After the first deployment, changes to the registry, authorization mode, or image digest only need a Terraform plan and apply. Expect only the resources you changed; the image is pinned by digest.

Terminal Output

            

Option C: Preview the Portal UI Locally (UI development only)

Starts the Vite development server for the React portal on http://localhost:5173. There is no local backend, so API calls fail; use this only to iterate on the UI.

# UI-only preview on http://localhost:5173 (no backend; for UI development)
./deploy.sh --launch-ui
Terminal Output

            
STEP 7

Configure the DNS A-Record for the HTTPS Application Load Balancer

After Terraform completes, this step retrieves the Global External Application Load Balancer IP address, creates (or updates) the DNS A record in your Cloud DNS Host Project (Parameter 8), and shows the Google-managed SSL certificate status. Once DNS propagates, the certificate transitions from PROVISIONING to ACTIVE.

Terminal Output

            
PORTAL AND OUTPUTS

Mint Control Plane Portal Access and Live Deployment Outputs

Configured Preview (Run Steps 6 and 7)

Once Step 6 (Terraform bootstrap) and Step 7 (DNS cutover) complete, the Mint Control Plane Portal is reachable at the HTTPS Load Balancer domain from Parameter 7. Direct public *.run.app URLs are disabled (default_uri_disabled = true), so all portal traffic enters through the Global HTTPS Application Load Balancer, Cloud Armor, and Cloud IAP.

Mint Control Plane Portal URL (HTTPS ALB + Cloud IAP)
Sign in with an account in the IAP accessor group (gcp-vendor-admins@example.com) when prompted by Cloud IAP.
Open Mint Control Plane Portal
Showing values from your Parameter Customizer. Click Refresh Live Terraform, Cloud Run, and SSL Outputs (with ./deploy.sh --guide running) after Step 6 to pull the live Load Balancer IP, SSL status, and the registry and authorization settings actually deployed on Cloud Run.
Output / Endpoint Value (Live / Configured) How to Use
Mint Control Plane Portal URL
control_plane_iap_load_balancer_url
https://mint.example.com Open in a browser to vend projects, inspect the fleet, and decommission projects.
Load Balancer Global Anycast IP
load_balancer_external_ip
Pending Step 6 (Click Refresh Live Outputs) Step 7 creates or updates the DNS A record for mint.example.com in Cloud DNS project dns-host-example.
Google-Managed SSL Certificate
managed_ssl_certificate_name
Awaiting Step 6 and DNS Cutover Transitions from PROVISIONING to ACTIVE once your DNS A record resolves to the Load Balancer IP.
Authorized IAP Accessor
authorized_workspace_iap_group
group:gcp-vendor-admins@example.com Principal granted roles/iap.httpsResourceAccessor on the Control Plane backend service. A domain: value means the group did not exist at deploy time.
Control Plane Cloud Run Service
cloud_run_service_name
gcp-account-vendor-controlplane (mint-cp-example) Internal-only Serverless Gen 2 container (default_uri_disabled=true, INGRESS_TRAFFIC_INTERNAL_LOAD_BALANCER).
Deployed Container Image
spec.template.spec.containers[0].image
Pending Step 6 (Click Refresh Live Outputs) Pin this digest as control_plane_container_image in mint.auto.tfvars.
Vend Destination Registry
MINT_VEND_DESTINATIONS
Pending Step 6 (Click Refresh Live Outputs) Regime-to-folder map actually running on Cloud Run; verified against Assured Workloads at runtime.
Authorization and Demo Settings
MINT_AUTHZ_MODE, MINT_ADMIN_GROUP, MINT_DEMO_MODE
Pending Step 6 (Click Refresh Live Outputs) Confirm enforce and MINT_DEMO_MODE=false before production use.
Orchestrator Service Account
orchestrator_service_account_email
account-vendor-orchestrator@mint-cp-example.iam.gserviceaccount.com Least-privilege automation identity with folder-scoped vend roles on each registered destination folder.
Firestore State Database
firestore_state_database
account-vendor-state (CMEK optional: enable_firestore_cmek) Stores vended project records and the decommissioned_projects archive.
STEP 8

End-to-End Testing and Security Verification Playbook

Run the following verification tests to confirm that zero direct public access, Google Workspace IAP authentication, the verified destination registry, the project Org Policies applied at vend time, the authorization audit trail, and soft-delete decommissioning behave as designed. Each test only checks controls that are actually deployed; the optional Data Plane status is reported separately in Test 8.6.

Test 8.1 - Verify Zero Direct Public Access and Cloud IAP Enforcement

Confirm that the Cloud Run service has no public *.run.app URL, that only the IAP service agent may invoke it, and that unauthenticated requests to the Load Balancer are intercepted by Cloud IAP (HTTP 302 redirect to Google sign-in or 401).

Terminal Output

            

Test 8.2 - Vend a Project in the Portal and Verify Its Destination Folder

Vending is performed through the portal (Cloud IAP requires a human Google Workspace sign-in; the API has no service-account access path). Open the portal, choose a compliance regime, review the resolved destination panel, set the Owner principal to your own account (so Tests 8.3 and 8.5 can act on the project), and submit Vend New GCP Project. Then run the command below: it finds the most recently created Mint-managed project (label vended-by=mint-control-plane) and verifies its parent folder is the registered destination for its regime, its labels, and its billing link. Set PROJECT_ID in the editor to check a specific project instead.

Terminal Output

            

Test 8.3 - Verify the Project Org Policies Applied at Vend Time (Negative Test)

Shows the effective storage.publicAccessPrevention, compute.vmExternalIpAccess, and run.allowedIngress policies on the vended project, then attempts to grant allUsers access on a temporary bucket. The grant must be refused by Public Access Prevention. The temporary bucket is removed at the end.

Terminal Output

            

Test 8.4 - Verify the Deployed Configuration and the Authorization Audit Trail

Reads the live Cloud Run revision (image digest, ingress, MINT_VEND_DESTINATIONS, MINT_AUTHZ_MODE, MINT_ADMIN_*, MINT_DEMO_MODE), confirms the only invoker is the IAP service agent, and lists recent authz_would_deny / authz_denied and destination verification log lines. Use the would-deny lines to populate the administrator group before switching to enforce.

Terminal Output

            

Test 8.5 - Decommission Through the Portal and Verify the Soft-Delete Archive

In the portal, select the test project and click Delete. Mint detaches billing, requests deletion (30-day recovery window), and archives the record to decommissioned_projects. The command below lists the latest archive entries from Firestore and confirms the project is in DELETE_REQUESTED. Requires roles/datastore.viewer (or owner) on the Control Plane project.

Terminal Output

            

Test 8.6 - Optional Data Plane Telemetry Status

Lists the Pub/Sub topics, the Organization asset feed, the Organization audit sink, and any subscriptions or Eventarc triggers. In this baseline no worker subscribes to the topics, so the budget circuit breaker and permission enforcer are reported as NOT_CONFIGURED by the control plane.

Terminal Output

            
STEP 9

Full Environment Teardown and Reset (./teardown.sh)

Need to tear down a test deployment and reset your Organization before re-running? ./teardown.sh idempotently destroys the Data Plane topics, Organization audit sink and asset feed, the Control Plane HTTPS Load Balancer components, Cloud Armor policy, Firestore state database, Artifact Registry repository, the Orchestrator Service Account bindings, and (optionally) the host projects and the empty Mint-Folder. It never deletes vended projects or your Assured Workloads folders.

Terminal Output

            

Pre-Flight Checklist and Zero-Trust Security Summary

Zero public endpoints: no Control Plane or Data Plane resource is directly publicly accessible, and vended projects receive public-access-prevention Org Policies at creation.
Security Layer Enforcement Mechanism Status
Ingress Point Global External HTTPS ALB + Serverless NEG + Cloud Armor (US-origin only) Enforced
Identity Gate Cloud IAP (Google Workspace) + fail-closed IAP JWT verification in the API Enforced
Application Authorization Mint Administrators (emails / Google Group) for vend and decommission log mode until switched to enforce
Cloud Run Direct URI default_uri_disabled = true and INGRESS_TRAFFIC_INTERNAL_LOAD_BALANCER Disabled
Encryption (CMEK) Cloud KMS key in a separated project (90-day rotation) for Cloud Run, Pub/Sub, Artifact Registry; Firestore optional Enforced
Vend Destinations Regime-to-folder registry verified against the Assured Workloads API (fail-closed) Verified at runtime
Vended Project Guardrails Org Policies: no public storage, no external VM IPs, internal-only Cloud Run ingress Applied at vend
IAM Deny v2, API allowlist policy, budget circuit breaker Optional Data Plane module (workers and Eventarc triggers not deployed in this baseline) Not configured
TERMINAL RUNNER

Review and Execute Step in Terminal

Operational guardrail - command review required: Review (and optionally edit) the exact shell commands below before executing them in your local terminal environment.
Ready for review.
Live Terminal Output