Skip to content

SEC-001: replace recursive Firestore admin access - #123

Merged
daliu merged 1 commit into
mainfrom
codex/issue-100-firestore-boundaries
Jul 13, 2026
Merged

daliu merged 1 commit into
mainfrom
codex/issue-100-firestore-boundaries

Conversation

@daliu

@daliu daliu commented Jul 13, 2026 •

Copy link
Copy Markdown
Contributor

Outcome

Replaces the recursive browser-admin Firestore catch-all with explicit resource rules. Browser admins retain the minimum read access used by the current UI and may create only inert catalog drafts or change display-only catalog fields. Membership authority, event eligibility and capacity, prices, variants, waivers, payment state, audit state, secrets, operational collections, and unknown collections remain server-owned.

Fixes #100

Security invariants

  • A browser admin is not a trusted server boundary.
  • A member may edit only the approved fields on an existing profile document with the matching UID.
  • Public event access uses explicit published states; draft and unknown states fail closed.
  • Browser-created event and product drafts are inert and cannot become saleable or registrable through Rules alone.
  • Browser writes cannot choose price, capacity, eligibility, availability, variants, waiver/data collection, lifecycle, payment, audit, mail, OAuth, rate-limit, or Stripe state.
  • Protected collection-group queries and unknown collections are denied.

Compatibility and migration

This is a Rules-only boundary change with no data migration. Existing server-configured protected fields may be carried unchanged while display fields are edited. Current browser roster, order, registration, event, and product reads remain explicit transitional access pending the scoped server-admin work. Operational admin actions remain NOT AVAILABLE YET.

Verification

  • Node 20.20.2 + Java 17: Rules emulator suite — 4 suites, 295/295 tests passed.
  • ESLint — all four changed Rules test files passed.
  • Frontend Jest baseline — 2 suites, 16/16 tests passed.
  • git diff --check — clean.
  • Secret-pattern review — clean.
  • Two independent exact-commit security reviews approved with no P0/P1/P2 findings.
  • GitHub CI: frontend lint/build, Functions lint/tests, and Rules tests passed.
  • Netlify: deploy preview passed; header/pages contexts were skipped because this PR does not change those surfaces.
  • Runtime dependency audit reported 33 existing findings (1 low, 20 moderate, 9 high, 3 critical). No forced upgrade was applied; dependency remediation remains separate supply-chain work.

Officer impact

Officers still must not use the current Admin screens for production catalog or member changes. The guide now explains, in plain language, which display fields this source change allows and which operational or financial fields require a future reviewed server action.

Officer documentation

Updated docs/officers/EVENTS_SHOP_MEMBERS.md with a short status statement, field-ownership diagram, stop conditions, success proof, undo path, and escalation role.

Deployment evidence

A green source workflow is not evidence that Firebase Rules are live.

@netlify

netlify Bot commented Jul 13, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for luminous-fox-7c393f ready!

Name Link
🔨 Latest commit 044ae58
🔍 Latest deploy log https://app.netlify.com/projects/luminous-fox-7c393f/deploys/6a548f0b88b6ee000877a1bd
😎 Deploy Preview https://deploy-preview-123--luminous-fox-7c393f.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@daliu
daliu merged commit a7fc301 into main Jul 13, 2026
7 checks passed
@daliu
daliu deleted the codex/issue-100-firestore-boundaries branch July 13, 2026 07:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant