Skip to content

CI-001C1 — Configure protected staging-only keyless Firebase authority #667

Closed

Description

@daliu

Outcome

Configure a staging-only GitHub Actions OpenID Connect path into the club-owned run-mprc-staging Google Cloud project, using a dedicated service account and no downloaded key. Add one manual protected read-only verification workflow and prove exact repository/environment/ref restrictions before any backend deployment.

This is the dependency-ready staging child of #133 and #105. It configures release identity and its no-op proof only; it does not deploy application code or close #133 production authority.

Invariants

  • Trust only the immutable Run-MPRC organization/repository IDs, refs/heads/main, the staging environment, and the reviewed verification workflow.
  • Use one provider in one staging pool and one dedicated staging deploy principal.
  • Store provider and service-account locators as protected environment secrets; never store or create a JSON key or Firebase token.
  • Require the protected staging environment and two named existing individual organization administrators as reviewers.
  • Grant no project Owner/Editor role and no runtime identity role to the deploy principal.
  • The verification workflow may authenticate and read the exact project identity only. It must not enable APIs, create resources, deploy, write data, inspect data, or call outside providers.
  • Missing/wrong environment, project, ref, repository, provider, or service account fails before authentication or mutation.

Acceptance criteria

  • staging environment exists with exact-main branch policy and two individual reviewers.
  • IAM, STS, and Service Account Credentials APIs needed for WIF are enabled in staging only.
  • Dedicated pool/provider uses an exact numeric owner/repository admission condition plus main/staging restrictions.
  • Dedicated service account has no key and is impersonable only by the exact admitted staging principal set.
  • Protected environment contains the exact Firebase project variable and two locator secrets, with no long-lived credential.
  • Source tests prove the verification workflow is manual, read-only, pinned, protected, and fail-closed.
  • One protected read-only GitHub run succeeds and records no sensitive provider identifier in public logs.
  • Wrong-ref and missing-authority behavior is evidenced without attempting a deployment.
  • Revocation and backup-officer steps are documented.

Officer impact: Two named officers can approve a staging identity check without handling a cloud key. This does not yet provide an officer backend publish button.

Officer documentation: Update docs/officers/ACCESS_CONTINUITY.md, docs/officers/PUBLISH_AND_CHECK.md, OPERATIONS_RUNBOOK.md, SECURITY.md, and the #133/#105 status evidence.

Deployment evidence: Record source, tests, merge, environment policy, WIF readback, protected no-op run, and absence of backend/provider/production changes separately.

Stop conditions

Stop if configuration needs billing, a JSON key, a Firebase token, broad Owner/Editor access, production mutation, real data, an unnamed reviewer, or an unbounded repository/ref trust rule.

Claim protocol

Assign one agent and post CLAIMED by <canonical agent> at <UTC>; branch <branch> before source or provider mutation.

Activity

  1. added
    priority:P0Launch blocker or urgent security risk
    type:securitySecurity or privacy boundary
    area:firebaseFirebase services and data
    area:ciContinuous integration and deployment
    size:MMedium multi-file issue
    needs-external-configRequires provider console or external configuration
    on Aug 26, 2026
  2. self-assigned this
    on Aug 26, 2026
  3. daliu commented on Aug 26, 2026

    @daliu
    ContributorAuthor

    CLAIMED by Codex at 2026-08-26T19:20:46Z; branch codex/issue-667-staging-wif

  4. daliu commented on Aug 26, 2026

    @daliu
    ContributorAuthor

    Completion evidence — 2026-08-26

    • Source: PR CI-001C1: add protected staging-only keyless authority proof #668 merged as ee16bd16220ab58bd3a2add80dd2f39a1d514dd7.
    • Pull-request CI: run 33006444724; all five required jobs passed.
    • Post-merge CI: run 33006701237; all five required jobs passed for the exact merge.
    • Staging cloud readback: IAM, STS, and Service Account Credentials APIs enabled; one active exact-condition WIF provider; one dedicated service account; zero user-managed keys; one custom role containing only resourcemanager.projects.get; one exact numeric-repository impersonation binding; no Owner, Editor, Firebase deploy, or runtime role.
    • GitHub environment readback: staging, exact main custom branch policy, reviewers daliu and jeffchang5, exact project variable, and only the two locator-secret names.
    • Protected success: run 33006732455 on exact merge ee16bd16220ab58bd3a2add80dd2f39a1d514dd7, approved by daliu, succeeded after one project-identity read.
    • Public-log review: both fixed success markers appeared once; provider locator, service-account locator, project number, bearer/token shapes, authorization header, and raw project response fields were absent.
    • Wrong-ref proof: run 33006901957 from temporary ref codex/issue-667-wrong-ref-proof failed before approval/authentication with zero steps and no pending deployment. The temporary ref was deleted and verified absent.
    • Missing locator proof: committed source tests remove each locator independently and verify one fixed failure before OIDC.

    Officer impact: Dave Liu or Jeff Chang can approve the staging identity check without handling a cloud key.

    Officer documentation: OFFICER_START_HERE.md, docs/officers/README.md, docs/officers/ACCESS_CONTINUITY.md, docs/officers/PUBLISH_AND_CHECK.md, and matching root design/runbook records.

    Deployment evidence: source changed, tests passed, code merged, staging IAM/WIF and GitHub environment configured, and the protected read-only run verified. Website not published; Firebase Hosting unchanged; Auth/Firestore/Rules/indexes/Functions/App Check not deployed; outside providers not configured; billing unchanged; production unchanged.

    Residual scope: #133 remains open for reviewed Firebase deployment roles and production protection. This issue grants no backend deployment authority.

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

Metadata

Metadata

Assignees

Labels

area:ciContinuous integration and deploymentarea:firebaseFirebase services and dataneeds-external-configRequires provider console or external configurationpriority:P0Launch blocker or urgent security risksize:MMedium multi-file issuetype:operationsOperational setup or runbooktype:securitySecurity or privacy boundary

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions