Operations & Data · Draft

Security, Access, and Governance

Created 9 Jun 2026·Updated 2 Jul 2026

Latest change: Session decisions: Identity Platform, W13 acceptance scope, health-first pilot, clean room, pentest timeline

Draft document — deep-dive spec incomplete; content will be updated before and during build. Do not treat as signed-off implementation detail. Pack overview

Objectives

  • Protect client and platform credentials
  • Enforce least-privilege access for humans and automation
  • Maintain auditability across tenants
  • Isolate multi-tenant data

Credential management

Secret type Storage Rotation
Google Ads / DV360 OAuth Secret Manager 90 days
Meta system user token Secret Manager Per Meta policy
TikTok access token Secret Manager On expiry
CRM webhook signing key Secret Manager 180 days
GA4 Measurement Protocol secret Secret Manager On compromise

Never commit secrets to git. .gitignore blocks common patterns.

Access model

Human identity (portal and dashboards)

Surface Who Identity provider Notes
Client portal SMB client users Google Identity Platform (email + password or magic link) Gmail not required; RBAC and tenant_id enforced in the BFF — Identity Platform authenticates only
Human Touch Kobico operators Same stack or corporate SSO (SAML/OIDC) Approvals, plan diffs, tenant timeline — no raw logs or engineering statistics
System Ops Engineers / SRE IAP (required) + VPN recommended Separate Cloud Run BFF; Google identity or workforce SSO
Meta Page connect Client during onboarding Facebook Login (Meta OAuth) Separate from portal login — Page/IG linkage only

Decision direction (Jul 2026): adopt Identity Platform for client and operator login. Auth0 / Okta remain a fallback if corporate SAML is mandated before launch. Cloudflare Zero Trust Access was evaluated as an IAP alternative for System Ops only — not for the client portal (per-user pricing does not scale to 1,000+ SMB clients). Cloudflare remains in scope for Phase 2+ tag relay (ADR 0005), not for portal auth.

Platform OAuth (Google Ads, Meta Marketing API, TikTok) is automation and onboarding consent — not end-user portal login.

Clients

  • Access Kobico dashboard only (Identity Platform — any email; magic link supported)
  • No direct ad platform admin
  • Optional GA4 viewer on their property

Kobico operators (Human Touch Dashboard)

  • RBAC: Viewer, Operator, Planner, Admin, Auditor
  • Identity Platform or corporate SSO; MFA required for Admin (implementation phase)
  • Approvals, plan diffs, tenant timeline — no raw logs or engineering statistics

Kobico system users (System Ops Dashboard)

  • RBAC: system_viewer, system_developer, sre, system_admin — see System Ops Dashboard
  • IAP required on all routes; VPN recommended for production
  • Logs, QC/Cost Guard statistics, infra health — disjoint IAM from operator roles by default

Automation

  • Dedicated service accounts per environment
  • Scoped IAM: only required API permissions
  • No shared tokens across tenants

Platform access patterns

Platform Human access Automation access
Google Ads Break-glass MCC admin API service user
Meta BM admin (ops only) System user
TikTok BC admin (ops only) Marketing API app
DV360 Partner admin API service account
GA4 Editor for automation account Measurement Protocol

Scope matrices, rate-limit tiers, app review requirements, and billing activation: Platform access & API readiness.

Multi-tenant isolation

Four layers — all keyed on tenant_id:

Layer Control
Identity JWT carries tenant_id + role after Identity Platform login; operators may span tenants under RBAC; clients see one tenant only
Application Every API and DB query filtered by tenant_id; cross-tenant access forbidden in code
Data tenant_registry per tenant; BigQuery tables partitioned by tenant_id with row-level security
Secrets Platform tokens (Google/Meta/TikTok) stored per tenant in Secret Manager — no shared tokens across tenants

Also:

  • Separate encryption keys per tenant for sensitive config (optional premium)
  • Append-only audit log for approvals, executions, credential use

Implementation status and pilot gate

Status Detail
Design Documented here and in provisioning spec
Code From W1 build (Jul 2026) — registry, BFF, connector scoping
Production Not verified until the pilot gate below

Go-live gate: multi-tenant isolation (including BigQuery RLS and cross-tenant query denial) must pass verification before live pilot ads. No separate security product purchase — GCP-native stack (Identity Platform + Secret Manager + CMEK + audit).

Independent security audit (pentest)

Milestone Target Owner
Budget approval + vendor process Leadership meeting (Jul 2026) Leadership + ops
Vendor shortlist (2–3 TR-based firms) Aug 2026 Leadership + ops
Core loop stable (auditable surface ready) ~W9 / ~1 Sep 2026 Engineering
Pentest execution Sep–Oct 2026 Vendor + engineering
Finding remediation + retest Oct 2026 Engineering

Scope (planned): web app + BFF API, Identity Platform auth flows, tenant isolation, Secret Manager usage, onboarding paths — black-box + grey-box. SOC 2 is a separate Phase 2+ track, not bundled with pentest. Firm not yet selected.

Audit

  • Append-only audit log for approvals, executions, credential use
  • Cloud Logging retention aligned with compliance (min 1 year operational, 7 years financial TBD)
  • Export for external audit on request

Network security

  • Private connectivity to CRM where possible
  • Egress allowlist for platform APIs
  • WAF on Human Touch dashboard endpoints (implementation phase)
  • System Ops Dashboard — not public; IAP-only (+ VPN for prod); separate Cloud Run service from Human Touch BFF

Incident response

Severity Example Response
P1 Token leak Rotate all tenant tokens; pause automation
P2 Wrong tenant campaign mutation Rollback manifest; notify client
P3 Tracking outage Pause optimization increases

Reliability, backup & disaster recovery

Planning-level targets — confirm with the implementation team and the parent platform's SRE standards before GA. Phase 1 pilots can run looser; these are the GA targets.

Service-level objectives (internal SLO; client SLA set commercially by parent/VC)

Surface Availability SLO Notes
Human Touch dashboard (approvals) 99.5% Operators must be able to approve/abort; degrade read-only before full outage
Orchestrator / connectors (automation) 99.0% Async + retried; brief outages self-heal via Pub/Sub redelivery
System Ops dashboard best-effort Internal tool; not client-facing

Agent runs are async and idempotent (campaign-execution) — a control-plane outage delays work, it does not corrupt campaigns. No external client uptime SLA is promised by this module unless the parent/VC contracts one.

RTO / RPO targets by data class

Data class Store RPO (max data loss) RTO (max downtime) Backup mechanism
Tenant registry / config Cloud SQL or Firestore ≤ 1 h ≤ 4 h PITR + daily export to GCS (cross-region)
Approvals / audit log append-only store + Logging 0 (no loss) ≤ 4 h Append-only + log sink; immutable
Run-cost / Cost-Guard ledger BigQuery ≤ 24 h ≤ 8 h BigQuery snapshot / table backup
Agent/QC telemetry BigQuery ≤ 24 h best-effort Partitioned tables; recreatable
Secrets Secret Manager 0 ≤ 1 h Versioned; IaC re-provision
Platform state (campaigns) source of truth = the ad platform n/a re-fetch Reconcile from platform APIs (not Kobico-owned)

DR posture

  • Region: primary in the agreed EU/TR-aligned region (GCP topology — data residency); cross-region backups for registry + audit.
  • Recovery: infra is IaC-defined → redeploy stateless Cloud Run services to a recovery region; restore registry from PITR/export; secrets re-provisioned from Secret Manager.
  • DR drill: restore-from-backup rehearsal before GA and at least annually; document actual measured RTO/RPO vs targets.
  • Idempotency safety net: because mutations dedupe by run_id, replaying queued work after recovery will not double-create campaigns or double-spend.

Platform account suspension & business continuity

The single largest concentration risk: an agency-level suspension (Google MCC, Meta BM, TikTok BC) can take all tenants on that platform dark at once. This is the operational runbook for gameplan B8.

Lever Detail
Prevention Maintain good standing: business verification kept current; policy-compliant creatives via compliance QC; avoid mass-identical mutations that trip abuse heuristics; stay under rate/creation quotas
Early warning Monitor account-status fields + disapproval webhooks/polling; alert on account_status changes, rising disapproval rate, or rate-limit/RESOURCE_EXHAUSTED spikes → System Ops
Blast-radius sharding Don't concentrate all tenants under one master where avoidable: Meta child-BM-per-client (2-Tier, PRE-10) already isolates Meta tenants; consider >1 Google MCC beyond a threshold so one suspension ≠ total outage
Appeal path Per-platform appeal owners + escalation contacts (Meta rep, Google/TikTok account managers) documented; appeal SLAs tracked; break-glass human admins retained on every platform
Client comms Pre-drafted suspension comms template; status surfaced in Human Touch dashboard; pause optimization + invoicing impact noted
Continuity If one platform is down, continue on others (plans are multi-platform); never let a single platform suspension block onboarding or reporting for unaffected channels

Compliance

  • Module data boundary (ADR 0004): this module does not store PII or client financial data; CRM and billing live in sibling systems. CAPI / offline conversion pipelines deferred — revisit hash-only rules when built.
  • Legal confirm required: KVKK/GDPR applicability, entity jurisdiction (TR vs EU), and prod region lock — ask legal team before go-live despite the narrow datastore boundary above.
  • Consent Mode and privacy policy linkage (when relay/CAPI land)
  • Health and education ad policies enforced in agent guardrails
  • Client approval of data sharing with sub-processors/vendors and marketing use — see Vision & scope — Client agreements
  • Client bears responsibility for lawfulness of data they permit to flow to ad networks and analytics; Kobico operates only on approved, versioned configurations

Vendor access

  • No third-party agency access to tenant accounts without contract
  • Sub-processor / vendor access limited to client-approved scope recorded at onboarding and plan approval