Country isolation
Workloads, networks, identities, data, encryption boundaries, and telemetry need country ownership without losing central governance.
Cloud Security · Google Cloud · DevSecOps
A production-style cloud-security reference implementation for a fictional community-health organization operating across Kenya, Ghana, and South Africa. The project covers landing-zone design, country isolation, identity, application security, keyless Terraform delivery, software supply-chain controls, posture governance, and validation evidence.
Independent portfolio project. AfyaBridge Cloud Security uses a fictional organization and synthetic data. It does not represent the infrastructure, systems, credentials, or data of a real healthcare organization.
01 · Scenario
The scenario assumes community-health teams working across several countries, handling sensitive identity and health data, supporting low-connectivity field workflows, and relying on cloud systems that must remain governable as the platform grows.
Workloads, networks, identities, data, encryption boundaries, and telemetry need country ownership without losing central governance.
Human and workload access should be narrow, reviewable, and separate from the authority required to grant more privilege.
Classification, residency, encryption, secrets, retention, backup, recovery, and deletion boundaries are part of the design.
GitHub-to-GCP deployment uses short-lived identity, separate plan and apply roles, reviewed saved plans, and no downloaded GCP key.
Synchronization is treated as a trust boundary with actor and device binding, replay protection, idempotency, and conflict handling.
Designed, implemented, statically validated, live validated, and negative-tested controls are kept distinct.
02 · Google Cloud foundation
The landing zone defines where workloads belong, how policy inherits, which services are shared, how countries remain separate, and where Terraform state and deployment identities live. The broader foundation is implemented in Terraform and statically validated; only the bootstrap and GitHub deployment-control planes are live-validated so far.
Protected Terraform state, CMEK, deployment identities, and project-factory prerequisites stay outside workload projects.
Security, logging, networking, CI/CD, artifact, and DNS capabilities are modeled as shared services rather than country workload concerns.
Kenya, Ghana, and South Africa production environments are separated through hierarchy, workload projects, networks, data, and keys.
Non-production remains separated from production so development identities and pipelines do not inherit production capability.
Experimental resources are constrained by permissions, metadata, cost controls, and cleanup expectations.
Organization policies, naming, labels, budgets, audit routing, and asset visibility provide repeatable governance as countries are added.
03 · Architecture
Central governance does not require shared runtime trust. The design keeps country workloads, data, network paths, keys, and telemetry scoped while allowing shared organizational controls and a common delivery model.
04 · Application security
Infrastructure boundaries are reinforced in the application. The baseline focuses on identity, country scope, persistence constraints, auditability, concurrency, and offline synchronization behavior.
Requests pass through explicit authorization seams and country scoping instead of relying on UI visibility as an access control.
Database constraints, audit events, optimistic concurrency, and server-authoritative decisions reinforce application rules.
Actor and device binding, timestamp checks, replay protection, idempotency, and explicit conflict states protect synchronization flows.
05 · Terraform delivery · v0.7I–L
GitHub OIDC and Google Workload Identity Federation replace a stored service-account key. Planning and applying are separate identities, the approved job consumes the exact saved plan, and provider permissions were measured from controlled denied operations.
Google WIF evaluates repository, workflow, ref, event, and environment context before the dedicated Google Cloud identity can be used.
The plan identity reads protected state and refreshes providers. The apply identity receives write capability only on the protected path.
The production environment gate is crossed before the privileged apply identity is authenticated.
The apply job independently verifies the plan checksum plus repository, commit, ref, run, project, state-bucket, and KMS provenance.
The controlled provider mutation required iam.serviceAccounts.get and iam.serviceAccounts.update. The apply identity was not given authority to rewrite its own IAM grants.
Tests proved the plan workflow cannot assume the apply identity, non-main cannot enter production, and the main apply workflow is rejected by WIF when the production environment claim is absent.
06 · DevSecOps · v0.8
Pull requests are evaluated by secret, dependency, license, code, Terraform, package, container, API-contract, policy, and exception controls before the repository security verdict can pass.
07 · Software supply chain · v0.9
The trusted-main build path adds SBOMs, separated build and signing identities, keyless Sigstore/Cosign signing, GitHub attestations, provenance verification, revocation decisions, and negative tests.
Pull requests exercise unprivileged build and validation paths; trusted-main context is required for signing and provenance authority.
The exact build is signed and verification is constrained to the expected repository, workflow identity, source ref, and source commit.
Artifact, source, and workflow identities are checked against a revocation policy that fails closed when reviewed trust is withdrawn.
08 · Observability and posture
Desired-state posture, drift decisions, finding ownership, remediation SLAs, exceptions, evidence-backed closure, logging, monitoring, and detection contracts are modeled in the repository. Live cloud posture and runtime detection exercises remain pending.
Machine-readable rules and fail-closed governance checks encode the control baseline without pretending repository state is live cloud state.
Severity, SLA, exceptions, remediation attempts, independent verification, and closure evidence are represented as governed state.
Centralized logging, monitoring, log-based metrics, alert policies, and responder paths are implemented but still need live exercise.
09 · Decisions
The implementation is organized around explicit trust and ownership decisions rather than a checklist of Google Cloud products.
Country networks, workloads, data services, keys, and telemetry are scoped rather than sharing runtime trust by default.
GitHub OIDC and WIF provide job-time identity instead of stored service-account credentials.
Terraform planning and applying use separate service accounts with different state and provider permissions.
Permission installation remains a separately owned administrative boundary rather than a self-escalation capability.
Replay, duplicate submissions, actor/device binding, timestamps, and conflict handling are treated as security concerns.
A green CI run, static Terraform validation, and a zero-change apply are each recorded for what they actually prove and no more.
10 · Validation
The public evidence distinguishes design, repository implementation, static validation, live cloud validation, and negative trust testing.
Current boundary
The live evidence currently covers the Terraform bootstrap and the GitHub-to-GCP deployment-control plane. Country foundations, Shared VPC enforcement, workload services, live observability, detections, public edge controls, posture collection, real drift, runtime attack simulation, rollback, and recovery still require their own evidence.
Next
Repository
The case study is the readable overview. The repository contains the detailed threat model, landing zone, ADRs, Terraform, application baseline, workflows, runbooks, tests, posture controls, and validation records.