Repository navigation
Description
Why
Google sign-in needs a registered OAuth client before any code can be tested against Google. Registering it takes human lead time: consent-screen branding has to be reviewed. Start this first.
There is also a second gap. Production never sets ERWEB_PUBLIC_BASE_URL, because deployment-web-api.yaml:183 only sets it when ingress is enabled, and prod has no ingress. An OIDC redirect URI has to match exactly, so the app needs to know its own absolute origin.
What the user sees
Nothing yet. This ticket is the plumbing everything else in the epic depends on.
How
-
Owner (human step): create the Google Cloud project.
-
Create a project named "DupeZero".
-
Configure an External OAuth consent screen with:
- the app name, the logo, and the support email at dupezero.com;
- the privacy URL and terms URL on dupezero.com (pages must exist; if they don't yet, file it as a blocker);
- the authorized domain
dupezero.com; - scopes only
openid,emailandprofile.
These scopes are non-sensitive, so Google's security assessment is not needed. Branding verification is still needed before the "unverified app" interstitial goes away.
-
Publish the app to "In production".
-
-
Create a Web application OAuth client. Register these redirect URIs exactly:
https://dupezero.com/api/auth/sso/google/callback- each dev hostname currently in use, one URI each, because Google does not accept wildcards
http://localhost:3000/api/auth/sso/google/callback
Use a separate client for dev and prod, so that rotating the dev secret can never break prod.
-
Store the secrets. Add
ERWEB_OIDC_GOOGLE_CLIENT_IDandERWEB_OIDC_GOOGLE_CLIENT_SECRETto the existinger/<env>/<ns>/erwebSecrets Manager secret.- Use
aws secretsmanager put-secret-value, merging into the existing JSON.infra/terraform/envs/prod/secrets.tf:146-178hasignore_changes = [secret_string], so Terraform will not do this, and that file already carries a comment saying the OIDC pairs belong there. - The External Secrets
dataFrom.extractturns every key into an env var automatically, so no chart change is needed for the secrets.
- Use
-
Declare the variables in
frontend/src/lib/env.ts, the zod schema:- the two OIDC variables, as optional, so a deploy without them still boots with SSO off;
ERWEB_STAFF_GOOGLE_DOMAIN, defaulting todupezero.com.
Never use a
NEXT_PUBLIC_prefix; the semgrep rule enforces this. -
Set the public origin in prod. In
infra/k8s/charts/er-platform/templates/deployment-web-api.yaml, takeERWEB_PUBLIC_BASE_URLout from underingress.enabledand drive it from a value. Set that value tohttps://dupezero.cominvalues-prod.yaml, and to each dev namespace's hostname in its values file.- Side effect, and an intended one: invite and reset links become absolute instead of relative.
-
Write the runbook. Add a short section to
.claude/skills/infra-platform/references/infrastructure.md, next to:554, covering where the client lives, who owns the Google Cloud project, and how to rotate the secret.
Acceptance criteria
- The consent screen is published, and branding verification is submitted or passed. A screenshot of the status goes in the ticket.
- In the dev and prod web containers, both
ERWEB_OIDC_GOOGLE_*variables are present. Check this by name only, for example withprintenv | cut -d= -f1, and never print the values. -
ERWEB_PUBLIC_BASE_URLishttps://dupezero.comin prod, and a newly created invite link in prod is absolute. - With the variables removed, the app still boots, and SSO stays off.
- The client secret exists only in Secrets Manager: not in git, not in values files, and not in CI.
- The runbook section has been merged.
Out of scope
- Any route or UI for signing in (Sign in with Google: the core OIDC flow (start, callback, linking, mock IdP) #1399).
- Microsoft or Salesforce identity providers.
Depends on
Nothing. This ticket blocks #1399.
Where to start
infra/terraform/envs/prod/secrets.tf:146-178infra/k8s/charts/er-platform/templates/deployment-web-api.yaml:178-194frontend/src/lib/env.ts- Earlier design:
.claude/skills/frontend-design-system/references/frontend-design.md§2.4;plan-to-aws.mdTrack S, S.1. SSO provider registrations #559 is superseded by this ticket.
Estimate: 0.5 engineer-weeks, plus Google's review time, which runs in the background.
Part of the E31 epic (#1396) (linked as parent). Decisions recorded 2026-11-28 with the owner.
Activity