Acme Marketing Architecture

10. Identity, secrets and read-only source access

10. Identity, secrets and read-only source access

Date: 2026-10-26

Status

Accepted


Problem

Three external platforms, three authentication models, and a principle that sources are read-only (BP-04). Credentials must not sit in pipelines or notebooks, must be rotatable, and their use must be attributable and alertable. The brief asks explicitly how authentication and source limits are handled.


Decision

Source Identity Authorisation Secret storage Limits handling
Salesforce Dedicated integration user. Two auth paths for the same user: (a) the Fabric Salesforce connector supports only an organisational-account OAuth consent, granted once interactively by an administrator and held in the Fabric connection, which is owned by a team principal, not a person; (b) the coded paths (reconciliation counts, phase-2 CDC consumer) use a Connected App with the JWT bearer flow (certificate, no interactive login) Read-only permission set: object and field read on in-scope objects only; no create, edit, delete; API-enabled; Bulk API enabled; CDC subscription permission if phase 2. The "API Only User" permission is not set, because it blocks the one-time interactive consent the connector needs; login IP ranges and login hours are restricted instead Private key and consumer key in Key Vault; the connector's consent token lives in the Fabric connection (Fabric-managed, not exportable to Key Vault) Query /limits at the start of each run; abort if the remaining daily allocation is below the reserve; budget per object in the ledger
HubSpot Private app, standalone (not inside a project, so webhooks are available) Read scopes only (crm.objects.*.read, crm.schemas.*.read, marketing read scopes, webhooks for subscriptions) Access token in Key Vault; webhook client secret in Key Vault for v3 signature validation Respect per-10-second and daily limits with a paced per-caller limiter in the adapter (at most its share in any rolling 10 s, ADR 8); honour Retry-After on 429; search endpoint budget separate from CRUD
Google Ads Dedicated Google account with Read only access on the manager account; OAuth 2.0 refresh token; API access through a Google Cloud project at Basic access level (developer tokens were sunset on 2026-09-09); Standard only if operations exceed 15,000 a day Read-only at account level; login-customer-id set to the manager account Refresh token, client secret and, until the first live call shows whether the developer-token header is still required (Google's access-levels and REST pages disagree, WP0b finding C5), the developer token in Key Vault Track operations per day against the Google Cloud project's access level; back off on RESOURCE_EXHAUSTED; serialise report pulls per customer account
Azure and Fabric Managed identities for Functions; a service principal for CI/CD; Entra groups for workspace roles Functions identity: Key Vault secret get, Service Bus send and receive, Table Storage data contributor, Contributor on the restricted workspace (or OneLake-scoped role) for landing writes; restricted workspace identity: write on lh_gold, Key Vault get for the vault lookup key, db_datareader/db_datawriter on the vault's token_map through a PIM-eligible role; erasure role: PIM-eligible delete and reverse lookup on the vault, write on the evidence container Key Vault with RBAC, soft delete, purge protection; the vault's customer-managed key in a dedicated Key Vault; no secrets in Fabric variables or pipeline parameters Not applicable
Token vault Entra-only authentication; no SQL logins Gate identity: lookup-or-create only (stored procedure, no SELECT on identifier_enc); erasure role: delete and reverse lookup; both PIM-eligible with justification and audit TDE under the customer-managed key; identifier_enc encrypted at the application layer under the same key; auditing to Log Analytics Alerts on any reverse lookup outside an erasure run

Operational rules:


Considered Options

Option Summary Pros Cons
✅ Dedicated read-only integration identities, Key Vault, managed identities As above Least privilege; attributable; rotatable; sources untouched Setup on three admin consoles; coordination with source owners
Personal user credentials A marketer's login Zero setup Breaks on leave; audit trail points at a person; usually over-privileged. Rejected.
Shared vendor connector credentials (Fivetran-style) Vendor stores credentials Less for the team to manage Third party in the personal-data path; applies only if ADR 4 chooses buy

Consequences

Positive:

Negative / Trade-offs:

Risks: | Risk ID | Description | Impact (E/H/M/L) | Mitigation | |---------|-------------|------------------|------------| | R1 | Another integration shares the Salesforce or HubSpot daily allocation | M | Ask source owners for current consumers; reserve headroom; alert at 70% | | R2 | Refresh token revoked when the Google account's password changes | M | Dedicated account with no interactive use; monitoring on auth errors | | R3 | Salesforce consent held in the Fabric connection expires or breaks on a password or MFA policy change | M | Dedicated user excluded from routine password rotation by documented exception; connection health check in the Tier 1 pipeline; JWT path available as fallback by switching Salesforce extraction to a coded adapter |