Skip to content

Deploy prerequisites for PR #234 security hardening (breaking without config) #235

Description

@4444J99

main is live-deployed, and PR #234 is breaking unless these are in place first. This issue is the merge/deploy gate.

Must be done before merging/deploying #234

  • Auth0: issue an org_id claim (and optionally tier) on access tokens. The multi-tenant IDOR fix derives org from this claim; without it, /api/deals and /api/contacts return 403 for every user (fail-closed by design). Namespaced custom claims (https://…/org_id) are supported.
  • Set webhook secrets in prod: STRIPE_WEBHOOK_SECRET, TWILIO_AUTH_TOKEN, SENDGRID_WEBHOOK_VERIFICATION_KEY, PLAID_WEBHOOK_SECRET. Verifiers now fail closed (401) when unset (previously fail-open).
  • Ensure JWT_SECRET is set in every environmentvalidateConfig() now throws on boot if missing (insecure fallback removed).
  • Run the app under a non-owner DB role so RLS (migration 018) actually enforces — the table owner bypasses non-FORCEd policies. The per-request app.current_org_id GUC is wired via orgContextMiddleware.
  • Coordinate migrations 014019 rollout014 sets prospects.org_id NOT NULL and backfills existing rows to a default "Unassigned" org.
  • Confirm organizations.subscription_tier → data-tier mapping matches product intent (dataTier entitlement now reads this column; the x-data-tier header is ignored).

Ref: PR #234, docs/logos/praxis.md §C.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions