Skip to content

ABUSE-001A1 — Use reCAPTCHA Enterprise for browser App Check #159

Closed

Description

@daliu

Officer impact: No current officer screen or procedure changes. This source-only slice aligns the browser App Check provider with the approved reCAPTCHA Enterprise design so a later protected release can use the correct public site key.

Officer documentation: None — no officer action is usable after this slice. Provider creation, allowed domains, protected configuration, staged metrics, enforcement, deployment, and live verification remain owner/operations work under #113, #133, #136, ABUSE-001A2, and ABUSE-001C.

Deployment evidence: None at issue creation. Closure proves source, tests, review, merge, and exact-commit CI only. It must not claim a site key, provider-console configuration, callable enforcement, website/Firebase publication, or live App Check behavior.

Parent and dependencies

Atomic source child of catalogued ABUSE-001 / ABUSE-001A.

This child only corrects the browser provider class. Native callable enforcement must be a separate ABUSE-001A2 slice after safe callback handoffs.

Problem

The browser source imports and instantiates the v3 provider. The approved security architecture and planned provider configuration require reCAPTCHA Enterprise. Supplying an Enterprise key to the v3 provider would be a configuration mismatch and could make a protected release fail or silently lack the intended control.

Atomic outcome

  • Replace the browser App Check v3 provider import/constructor with ReCaptchaEnterpriseProvider.
  • Preserve local/test shutdown, capability-callback shutdown, missing-key fixed diagnostic, token auto-refresh, and generic initialization failure behavior.
  • Add focused tests proving Enterprise is used exactly once for an ordinary production page with a configured synthetic public key and v3 is absent/not called.
  • Keep every provider key, console/IAM setting, enforcement choice, and deployment outside this pull request.
  • Update only the minimum authoritative security/operations/status documentation.

Security invariants

  • Never add, request, print, commit, or invent a real site key, debug token, service credential, or provider response.
  • App Check does not replace Auth, verified membership, capability checks, Rules, strict schemas, rate limits, or fraud controls.
  • Development/test must not initialize App Check or exchange a debug token.
  • Initial Stripe/Strava/capability callback URLs must not initialize App Check or outside telemetry.
  • Missing key and initialization failure use existing fixed diagnostics without provider details or tokens.
  • Only an ordinary production page with a configured synthetic key may construct the Enterprise provider in tests.
  • A source import/constructor change does not prove provider configuration, enforcement, token acceptance, or deployment.

Exact source boundary

  • src/services/firebase/FirebaseResources.ts
  • src/services/firebase/FirebaseResources.test.ts
  • Minimum exact status/design hunks only in:
    • SECURITY.md
    • OPERATIONS_RUNBOOK.md
    • GITHUB_ISSUES.md
    • GITHUB_ISSUE_SLICES.md

Post a scope amendment before editing Functions, workflows, environment files, package/lockfiles, Firebase configuration values, provider settings, Rules, client screens, officer guides, or production data.

Acceptance criteria

  • Production with a configured synthetic public key constructs ReCaptchaEnterpriseProvider and passes it to initializeAppCheck with token auto-refresh unchanged.
  • No production source import or constructor reference to ReCaptchaV3Provider remains.
  • Development and test construct neither Enterprise nor v3 providers and retain demo-only Auth/Firestore/Functions emulators.
  • Every existing capability callback variant constructs neither provider and does not initialize App Check or Analytics.
  • Missing-key and initialization-failure tests retain fixed redacted diagnostics and no hostile canary.
  • No real key, debug token, credential, private locator, provider response, or production data appears in source, tests, docs, logs, issue, or PR.
  • Node 20 focused FirebaseResources tests, full frontend Jest, standalone SPA callback tests, changed-file lint, diagnostic build, hosted CI, diff/sensitive-pattern review, and independent review pass.
  • Root docs distinguish source changed, merged, provider configured, website published, callable enforcement enabled, and live behavior verified.
  • No workflow, package/lock, Function, Rule, environment, provider, or production setting changes.

Excluded

Claim protocol

Creation is not a claim. Before editing: confirm exact current main, assign the issue, post CLAIMED by /root at <UTC>; branch codex/issue-<number>-app-check-enterprise, apply status:in-progress, and use an isolated worktree.

Activity

  1. added
    priority:P0Launch blocker or urgent security risk
    type:securitySecurity or privacy boundary
    area:firebaseFirebase services and data
    area:webWeb application and hosting
    size:SSmall focused issue
    status:readyDependencies complete and ready to claim
    status:in-progressClaimed and actively being implemented
    and removed
    status:readyDependencies complete and ready to claim
    on Jul 13, 2026
  2. self-assigned this
    on Jul 13, 2026
  3. daliu commented on Jul 13, 2026

    @daliu
    ContributorAuthor

    CLAIMED by /root at 2026-07-13T14:34:45Z; branch codex/issue-159-app-check-enterprise; exact base e5a0390f8c1c9dc9a51f83457cd3623ea0bc9723.

    Active ownership is exactly the two FirebaseResources source/test files plus minimum status/design hunks in SECURITY.md, OPERATIONS_RUNBOOK.md, GITHUB_ISSUES.md, and GITHUB_ISSUE_SLICES.md. Functions, workflows, packages/lockfiles, environment files, provider settings, Rules, screens, officer guides, and production data are immutable. No real key or provider configuration will be used.

  4. daliu commented on Jul 13, 2026

    @daliu
    ContributorAuthor

    EXTRACTION FINISHED by /root at 2026-07-13T14:42:35Z.

    Exact staged diff hash: 525928f78fa8ade111b3317190b57db1f515aed1

    Owned paths: exactly the six paths declared in the issue. No workflow, package/lockfile, environment, Function, Rule, provider-console, key, enforcement, or production change.

    Verification on Node v20.20.2:

    • focused FirebaseResources suite: 23/23
    • full frontend Jest: 9 suites / 132 tests
    • standalone SPA callback suite: 10/10
    • changed-file ESLint: passed
    • diagnostic production build: passed; not published
    • staged diff check and sensitive-pattern review: passed
    • three independent exact-hash reviews: approved with no findings

    Deployment truth: source and tests only at this point. No Enterprise key, allowed-domain policy, protected build variable, website/Firebase publication, callable enforcement, provider readback, token exchange, or live behavior is configured or proven.

  5. daliu commented on Jul 13, 2026

    @daliu
    ContributorAuthor

    COMPLETE by /root at 2026-07-13T14:48:02Z.

    • PR ABUSE-001A1: use reCAPTCHA Enterprise for browser App Check #160 exact reviewed head: 14a333bdbf5d09b9dffc34339150fcb4497ec330
    • Squash merge on main: 317b800cd39af136828de0d4eb23fbef66c2b390
    • PR CI 29259142366: frontend, Functions, and Rules passed
    • Post-merge CI 29259342966: frontend 132/132 plus SPA 10/10 and release-workflow 13/13; Functions 457 passed/1 intentional skip; Rules 305/305
    • Netlify PR preview 6a54f97f7e026c000828d663: ready; preview only
    • Netlify production attempt 6a54fa22230b8000085802ec for the exact merge: error with published_at empty; nothing published
    • runmprc.com remains on verified deploy 6a54a3c93db9d300082e1f5f at older commit e86a0f702cff6495f50630c5de3337290db8b8cb
    • No protected release, Firebase deployment, GitHub Pages run, or GitHub deployment exists for the merged commit
    • Three independent exact-diff reviews: approved with no findings
    • Acceptance checkboxes are complete and the in-progress claim is released

    Deployment evidence: the source/test/merge outcome is complete, but #159 is not live in production. No Enterprise key/domain configuration, protected variable, callable enforcement, provider readback, token exchange, or live App Check behavior is claimed. The protected release remains unable to build without the owner-configured public site-key variable, and ABUSE-001A2/#113/#133/#136 retain the external and enforcement work.

  6. daliu commented on Jul 13, 2026

    @daliu
    ContributorAuthor

    A fresh read-only release audit is recorded on #136. The exact-main release still fails closed because no configured public App Check Enterprise site key is available from GitHub variables or any safe authorized/public source. Provider creation/binding and approved-domain verification remain owner actions; no key or provider setting was created or copied.

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

Metadata

Metadata

Assignees

Labels

area:firebaseFirebase services and dataarea:webWeb application and hostingpriority:P0Launch blocker or urgent security risksize:SSmall focused issuetype:securitySecurity or privacy boundary

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions