Skip to content
AskFlorence
Main Navigation ArchitectureFlorence AIAgentsMembersAgent PlatformValidationInfrastructure

Appearance

Sidebar Navigation

Overview

Home

Glossary

System Architecture

Consumer & Agent Flow

Florence AI

Overview

Principles

Runtime

Tool surface

Adding a tool

Tool registry

Knowledge: SBC scenarios & CSR

Voice

Evals & observability

Provider risk & portability

Outage playbook

Roadmap

Build plan

Agents

Overview

Workflows & pain points

Members

Overview

Medicaid coverage gap

Carriers

Overview

Marketplaces

Overview

Agency

Overview

Regulations

Overview

Agent Platform

Overview

Auth Architecture

MongoDB Permissioning

Compliance Model

Data Models

Data Sources

Overview

CMS Marketplace API

CMS dependency map

PUF Data

State Subsidies

SBE Ingestion Playbook

SBE State Watchouts + Decisions

CA Phase C/D Playbook

NY Phase C/D Playbook

Validation

Overview

Methodology

APTC Formula

California 2026

New York 2026

CAPS Formula

Scenario Results

Infrastructure

Account Inventory

AWS Setup Runbook

AWS Organizations

CloudTrail

GuardDuty

Security Hub

Config

CloudFront + WAFv2

Data sources & ingest

Phase 4 DNS

Change Log

Vulnerability Management

MongoDB Setup

Access Control

Data Classification

Documentation Hosting

Post-deploy Smoke

Development

Preflight (local CI mirror)

Testing strategy

Compliance

Overview (auditor entry point)

SOC 2 Control Mapping

HIPAA Control Mapping

CMS EDE Appendix A Mapping

Risk Assessment

Encryption Policy

Data Retention Policy

Privacy Impact Assessment

Consent Capture & Versioning

Incident Response Plan

Access Control Policy

Marketing vs. Portal Analytics

Vendor / Subprocessor Register

Dependency Vulnerability Policy

BAA / Compliance Evidence

Compliance-Automation Integration

Compliance-Automation Vendor Evaluation

Penetration Test Reports

Architecture

Portal entry handoff

Mobile app strategy

Deferred architecture decisions

Session cookie architecture

Share flows

Decisions (ADRs)

Index

0001 — Atlas project isolation

0002 — Append-only audit log

0003 — Narrow-scoped Mongo users

0004 — Cross-cluster Atlas PrivateLink

0005 — Delayed-job architecture

0006 — Mongo user simplification

0007 — Terraform owns ECS task def

0008 — E2E testing strategy

0009 — Self-hosted analytics + observability (superseded)

0010 — PostHog HIPAA Cloud (supersedes 0009)

Runbooks

Security Incident Response

Break-Glass Root Login

Onboard Team Member

Offboard Team Member

Atlas user provisioning

Deploy via Terraform (ENG-277)

Rollback via Terraform (ENG-277)

S3 data bucket migration (planned Phase 11)

Access Reviews

2026-Q2 Review

Session log

Index

2026-04-23 — Phase 10 DNS cutover

2026-04-22 — Phase 8 prod AWS mirror

2026-04-22 — Phase 7 Atlas VPC peering

2026-04-22 — Phase 6 CloudFront + WAF

2026-04-21 — Phase 5 staging go-live

2026-04-17 — Atlas staging

Briefs

Index

Member portal plan (ENG-187)

2026-04-16/17 handoff

2026-04-17 Atlas handoff

System briefing (2026-04-17)

Creative AdBundance proposal brief

Creative AdBundance analytics brief

ElevenLabs RN integration research

Policies

Overview

On this page

Access Control Policy ​

Status: Active. Effective 2026-05-11. Owner: Taha Abbasi (technical implementation) + Asad Khalid (joiner / mover / leaver governance). Supersedes: the DB-focused docs/infrastructure/access-control.md (now a pointer stub to this policy + Atlas implementation detail). Reviewed: Quarterly via access reviews; annually for policy-level changes.

Purpose ​

Define how human and service principals authenticate, what they are authorized to do, and how that access is provisioned, reviewed, and revoked. Required artifact for:

  • HIPAA §164.308(a)(3) (workforce security), §164.308(a)(4) (information access management), §164.312(a)(1) (access control), §164.312(d) (person or entity authentication)
  • SOC 2 CC6.1 (logical access controls), CC6.2 (provisioning), CC6.3 (access removal), CC6.6 (boundary access), CC6.7 (transmission encryption — see encryption policy), CC6.8 (malware protection)
  • CMS EDE Phase 3 / MARS-E 2.2 AC-family controls; NIST 800-53 R4 Moderate AC controls
  • State law where applicable (NY SHIELD reasonable safeguards)

Principle of least privilege ​

Every account, user, and service credential is granted the minimum access necessary for its function. No shared credentials. No persistent admin sessions. Every privilege escalation is auditable.

Identity sources ​

Identity domainSource of truthMFANotes
AWS (all four org accounts)AWS IAM Identity Center (SSO) provisioned under the management accountRequired (TOTP today; hardware MFA tracked in #67)Permission sets: admin, power_user, billing_ro, security_audit. Pre-positioned but not yet in Terraform state (Phase 3b import pending — see infra/envs/management/outputs-reference.md).
Google Workspace (founder + ops email)Google Cloud IdentityRequired (TOTP today; YubiKey planned alongside AWS)Account owner = Taha; users today = founders + Asad
GitHubGitHub.com user accountsRequired for org membersSAML SSO via Google Workspace planned at next-tier paid plan
MongoDB AtlasAtlas organizationRequired for all org membersOrg Owner = Taha; per-project users follow least-privilege per ADR 0003
HubSpotHubSpot user accountsRequiredUsers: Taha + Asad + Ian + agent-relations
Vercel (legacy)Retired post Phase 10; org archived not deletedn/aVercel project retained for rollback safety only

AWS SSO permission sets ​

Permission setGranted toSession durationAWS managed policiesUse
adminTaha (today; Asad after hardware MFA)8hAdministratorAccessFull AWS access for infrastructure changes; should not be the daily-driver for routine work
power_userTaha (daily driver)8hPowerUserAccessDay-to-day engineering — read/write to most services, no IAM modification
billing_roAsad4hCustom billing-readonly policy + BillingCost monitoring, no write access
security_auditFuture SOC 2 auditor + compliance-automation vendor manual review4hSecurityAudit + ReadOnlyAccessRead-only security posture review; same policy shape as DrataAutopilotRole (see compliance automation integration)

Assignments live in the management account; replicated to each member account (mgmt / prod / staging / log-archive).

Database access (MongoDB Atlas) ​

Per ADR 0006 (supersedes ADR 0003 — ENG-279, 2026-05-12), the canonical model is 4 users per cluster at the Atlas layer. Pre-Phase-5 content (CMS marketplace data + agent waitlist PII) requires no row-level filtering at the DB layer; Phase 5 PHI evolution shifts the security boundary to JWT-in-middleware + MongoDB views rather than re-narrowing DB users.

UserRolePer clusterEnv varPurpose
app_readBuilt-in read@askflorencestaging + prodMONGODB_URI + MONGODB_REFERENCE_URI (cross-cluster)All reads at runtime + audit re-validation
app_writeBuilt-in readWrite@askflorencestaging + prodMONGODB_WRITE_URIAll runtime + ingest writes (ENG-236 LARK MRF refresh, HubSpot sync, etc.)
app_audit_writerCustom role_audit_writer (FIND + INSERT on agent_audit_log only)staging + prodMONGODB_AUDIT_WRITE_URIAppend-only at the DB permission layer per ADR 0002 — UPDATE / REMOVE return "not authorized" regardless of app code. Phase 5 audit writers consume via getAuditDb() in src/lib/db.ts (defensive fallback to MONGODB_WRITE_URI while no consumer exists).
app_admin_schemaCustom role_admin_schema (FIND + CREATE / LIST / DROP INDEX on agent_waitlist_submissions + agent_survey_responses + hubspot_sync_log only)staging + prodMONGODB_URI_ADMIN_SCHEMA (deploy-time ECS RunTask only — not bound to the runtime task role per ENG-266 Phase 3.5)scripts/db/ensure-indexes.ts
(legacy) app-writereadWrite@askflorenceprod(transition aliases until Phase G)Removal is the production exit criterion of Issue #56. See risk R-006.

Plus the 9 legacy narrow users (app_read_local_staging, app_read_staging, app_writer_survey, app_writer_plans, app_writer_waitlist, app_writer_hubspot_sync, app_writer_agents, app_admin_agents, audit_reader) and the prod app-read + app-write users which stay active until Phase G (tracked at ENG-282, due 2026-05-14, hard-gated on ≥ 24h soak from ENG-279's PR merge).

Phase 5 PHI evolution — security boundary shifts up the stack (no new DB users) ​

When PHI lands at Phase 5 (member intake + agent portal + admin dashboard), the 4-user model holds by:

  1. JWT identity (app middleware). Agent JWTs carry agent_id + agent_npn. Admin JWTs carry admin_id + admin_role. Middleware extracts these into a per-request context.
  2. MongoDB views, not per-tenant users. Per-tenant data isolation is enforced via views filtered on agent_id / member_id. Agent portal route handlers query the view, never the underlying collection. Views are created at agent provisioning time (scripts/db/setup-agent-views.ts — Phase 5 work). The DB grants on app_read / app_write stay unchanged.
  3. Admin tier reads through underlying collections with WHERE clauses derived from the JWT role. Every admin read of a member record is audit-logged via app_audit_writer insert.
  4. Audit-log writes continue to flow through app_audit_writer via MONGODB_AUDIT_WRITE_URI. Append-only property preserved across agent portal, admin dashboard, super-admin path.
  5. Super-admin uses the /sa-login break-glass flow (CLAUDE.md): password (argon2id) + TOTP + IP allowlist. Connects with an Atlas user not held by any task role.

ENG-279 acceptance criteria cap total users at ≤ 5 per cluster. A possible 5th app_admin_full at Phase 5 lands at the cap only if the admin dashboard needs writes that views cannot express. Any 6th user requires a follow-up ADR superseding ADR 0006.

Authoritative live state: docs/infrastructure/atlas-access-matrix.md (CI-synced from infra/atlas/access-matrix.ts).

Service principals (no human authentication) ​

PrincipalAuthenticated viaPermissionsUse
GitHubActionsDeployRole (in prod + staging accounts)GitHub OIDC, short-lived STSLeast-privilege inline policy: ECS task-def register, service update, ECR push, S3 deploy assets onlyCI/CD prod + staging deploys
DrataAutopilotRole (all four accounts)Assume-role with placeholder ExternalId — never activatedSecurityAudit + ReadOnlyAccess + DrataAutopilotExtras inlinePre-positioned for compliance automation vendor at signing — see compliance automation integration
ECS Fargate task roleInternal AWS STSRead specific Secrets Manager secrets; write CloudWatch Logs; read S3 deploy assets; SES send from askflorence.healthApp runtime
Atlas Programmatic Keys (for nightly drift check + Terraform Atlas provider)Atlas API keyProject Read Only for the drift-check key; Project Owner for Terraform-managed projectsCI workflows

Multi-factor authentication ​

SurfaceMFA todayMFA targetTracking
AWS SSO consoleTOTP enforcedHardware MFA (YubiKey) enrolled for admin + power_user; TOTP retained as backup#67
Google WorkspaceTOTP enforcedSame as AWS — YubiKey enrolled#67
Atlas org membersTOTP enforcedTOTP acceptable (Atlas does not yet support WebAuthn org-wide)Quarterly review verifies enrollment
GitHubTOTP enforcedSame as AtlasQuarterly review verifies enrollment
HubSpotTOTP enforcedSameQuarterly review
Agent portal (Phase 5)n/a yetTOTP via authenticator app (NIST 800-63B AAL2)agent platform compliance
Super-admin path (Phase 5+)n/a yetPassword (argon2id) + TOTP + IP allowlist (Tailscale / static VPN)agent platform compliance

Provisioning ​

Joiner (new team member) ​

  1. Manager (Taha or Asad) creates a Linear / GitHub issue with the joining-context (role, start date, what access they need).
  2. Run the Onboard Team Member runbook — checklist of identity-domain account creation + role assignment + MFA enrollment.
  3. Document the date + grant in docs/infrastructure/atlas-access-matrix.md (if Atlas access granted) AND in the current quarter's access review file at docs/infrastructure/access-reviews/.
  4. MFA enrollment is verified before any access is granted.

Mover (role change within the team) ​

  1. Document the role change + new access requirements (Linear / GitHub issue).
  2. Run the relevant additions per the onboard runbook + the relevant removals per the offboard runbook.
  3. The change is documented in the next access review.

Leaver (offboarding) ​

  1. Manager triggers the Offboard Team Member runbook — same-day access revocation across every identity domain.
  2. Credentials the person had direct access to (shared API keys, etc.) are rotated.
  3. Audit-log row written to agent_audit_log per offboarding event.
  4. The offboarding is documented in the next access review.

Quarterly access review ​

Triggered at the end of each calendar quarter. Documented in docs/infrastructure/access-reviews/<year>-Q<n>-review.md. The review confirms:

  1. SSO assignments are current — every assigned permission set still maps to a current employee + an in-scope role
  2. Atlas users are current — every user in the Atlas access matrix is in active use; deprecated users have been revoked
  3. MFA enrollment is verified — each user's MFA status confirmed per identity domain
  4. Vendor BAA + DPA status is current — no expired BAAs; new vendors have BAA in place
  5. Cross-cluster reader role is unchanged — staging-cluster-drift nightly check passing
  6. Allow-lists are current — STAGING_ALLOWED_COLLECTIONS matches actual usage
  7. Cost alarms + retention TTLs in place — verified per data retention policy

The first review is 2026-Q2 (July 2026) — see ../infrastructure/access-reviews/2026-Q2-review.md.

Break-glass access ​

When the standard SSO path is unavailable (account lockout, MFA device lost, AWS Console outage), the break-glass procedure documented in docs/runbooks/break-glass-root-login.md is the only authorized fallback. Break-glass access:

  • Is logged immediately (CloudTrail capture is automatic; the runbook adds an agent_audit_log entry for application-side actions)
  • Must be terminated as soon as the standard path is restored
  • Requires a post-event report at the next access review

Credential rotation ​

Credential typeRotation cadenceOwnerMechanism
AWS SSO passwordsAt login per Google Workspace policy (no AWS-side password)n/a (SSO)Google Cloud Identity
AWS Access Keys (long-lived)Forbidden for human users. CI uses OIDC STS only.n/an/a
Atlas user passwordsAnnual + on incidentTahaatlas dbusers update --password + Secrets Manager update-secret
Atlas Programmatic Keys (CI)AnnualTahaAtlas org settings + GitHub secrets gh secret set
HubSpot user passwordsPer HubSpot policy (90 days) + on incidentPer userHubSpot UI
Google Workspace passwordsPer Cloud Identity policy + on incidentPer userGoogle admin console
CMS Marketplace API keyAnnual + on incidentTahaCMS portal + Secrets Manager
SSH keys (if any)n/a — no SSH-accessible infrastructure todayn/an/a
TLS certsAuto-renewed by ACMn/aACM-managed
KMS CMKsAuto-rotation enabled (annual)n/aAWS-managed

Network access ​

SurfaceTodayFuture
AWS console + APIsSSO with MFA only+ Conditional access policy (Tailscale-based IP allowlist or geographic restriction) at scale
Atlas org + project UIAtlas user + MFA + IP allowlist (Taha's home IP + GitHub Actions runners)Tighten after AWS cutover — staging/prod Atlas accessible only from prod VPC PrivateLink + a single break-glass admin IP
Apex askflorence.healthPublic + CloudFront + AWS WAFSame
ECS task internal networkPrivate subnets only (no public IP)Same
Database direct connectionsTLS-only Atlas endpoints + IP allowlistPrivateLink-only (planned)

Account dormancy ​

Inactive identities are reviewed quarterly:

  • No human SSO login in 90 days → review at quarterly access review; remove unless explicit retain rationale documented
  • No Atlas user activity in 90 days → review at quarterly access review; revoke if not in use
  • Old SSH keys / personal access tokens — none today; future tokens get a 1-year max lifetime

Vendor + sub-processor access ​

Each vendor with access to AskFlorence data is documented in vendor / subprocessor register with BAA / DPA status. New vendor adoption requires:

  1. Compliance Liaison (Asad) reviews the vendor's BAA / DPA status BEFORE any production data flows
  2. New row added to vendor register before contract signed
  3. Vendor evidence (signed BAA PDF) filed at docs/infrastructure/evidence/<vendor>-<date>.pdf
  4. Listed in privacy notice by next privacy-policy version

Reference ​

  • Authoritative Atlas state: docs/infrastructure/atlas-access-matrix.md
  • Atlas user provisioning runbook: docs/runbooks/atlas-user-provisioning.md
  • Onboard / offboard runbooks: docs/runbooks/onboard-team-member.md, docs/runbooks/offboard-team-member.md
  • Break-glass runbook: docs/runbooks/break-glass-root-login.md
  • ADR 0003 — Narrow-scoped MongoDB users
  • Encryption Policy — credential storage at rest
  • Data Retention Policy — credential retention windows
  • SOC 2 Control Mapping — CC6.1, CC6.2, CC6.3, CC6.6, CC6.8 rows
  • HIPAA Control Mapping — §164.308(a)(3), (a)(4), §164.312(a)(1), (d) rows
  • CMS EDE Appendix A Mapping — §1 (identity proofing), §6 (NPN validation), §7 (session management), §8 (role-based access) rows
Pager
Previous pageIncident Response Plan
Next pageMarketing vs. Portal Analytics

AskFlorence Internal Documentation. Not for public distribution.

AskFlorence

Internal Documentation

Access restricted. Not for public distribution.