Skip to content

Phase 4: Mirror Workers secrets to SCCN account #325

Closed

Description

@neuromechanist

Parent Epic

#314

Goal

Re-create all Workers secrets on the SCCN Cloudflare account so the backend can function identically.

Secrets to Migrate

All set via npx cfman wrangler --account sccn secret put <NAME>:

Secret Purpose Notes
GITHUB_ADMIN_PAT GitHub API operations May need new PAT scoped to nemarDatasets
AWS_ACCESS_KEY_ID S3 bucket access Same credentials (bucket unchanged)
AWS_SECRET_ACCESS_KEY S3 bucket access Same credentials
ENCRYPTION_KEY AES-GCM for per-user AWS creds in D1 Must be identical to decrypt existing data
RESEND_API_KEY Email sending Same key (or new if domain changes)
GITHUB_WEBHOOK_SECRET Webhook verification Must match NEMAR_WEBHOOK_TOKEN org secret
EZID_USERNAME DOI minting Same credentials
EZID_PASSWORD DOI minting Same credentials
EZID_SANDBOX_USERNAME DOI testing Same credentials
EZID_SANDBOX_PASSWORD DOI testing Same credentials
OPENROUTER_API_KEY LLM enrichment Same key
NEMAR_USERNAME nemar.org sync Same credentials
NEMAR_PASSWORD nemar.org sync Same credentials
TEST_BYPASS_TOKEN E2E testing Can generate new

Tasks

  • Inventory all current secrets (verify list above is complete)
  • Set each secret on SCCN account worker
  • Verify ENCRYPTION_KEY is byte-identical (critical for decrypting stored credentials)
  • Test secret access from deployed worker

Depends On

Notes

  • ENCRYPTION_KEY is the most critical; if different, all stored per-user AWS credentials become unreadable
  • Consider whether GITHUB_ADMIN_PAT needs to be regenerated with different scopes

Activity

  1. neuromechanist commented on Mar 21, 2026

    @neuromechanist
    ContributorAuthor

    Status: Done

    All 16 secrets set on SCCN nemar-api worker via API:

    Secret Source Status
    GITHUB_ADMIN_PAT .dev.vars Set
    AWS_ACCESS_KEY_ID .dev.vars Set
    AWS_SECRET_ACCESS_KEY .dev.vars Set
    ENCRYPTION_KEY .dev.vars Set (byte-identical, critical for decryption)
    RESEND_API_KEY .dev.vars Set
    GITHUB_WEBHOOK_SECRET .dev.vars Set
    EZID_USERNAME .dev.vars Set
    EZID_PASSWORD .dev.vars Set
    EZID_SANDBOX_USERNAME Memory (EZID DOI entry) Set
    EZID_SANDBOX_PASSWORD Memory (EZID DOI entry) Set
    OPENROUTER_API_KEY .dev.vars Set
    NEMAR_USERNAME .dev.vars Set
    NEMAR_PASSWORD .dev.vars Set
    TEST_BYPASS_TOKEN test/.env.test Set
    ZENODO_API_KEY .dev.vars Set
    ZENODO_SANDBOX_API_KEY .dev.vars Set

    All secret values are identical to the personal account worker. ENCRYPTION_KEY is byte-identical (verified from .dev.vars), ensuring encrypted per-user AWS credentials in D1 remain readable after data migration.

  2. neuromechanist commented on Apr 18, 2026

    @neuromechanist
    ContributorAuthor

    Done. All 16 secrets mirrored to SCCN (prod + dev): GITHUB_ADMIN_PAT, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, ENCRYPTION_KEY, RESEND_API_KEY, TEST_BYPASS_TOKEN, GITHUB_WEBHOOK_SECRET, EZID_USERNAME/PASSWORD (+ sandbox), OPENROUTER_API_KEY, NEMAR_USERNAME/PASSWORD, ZENODO_API_KEY, ZENODO_SANDBOX_API_KEY. Verified via wrangler secret list.

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

    infrastructureInfrastructure and deployment

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions