Repository navigation
feat(identity): cut the internal pool over from GoogleSAML to Google - #175
Merged
Merged
Conversation
Terraform Plan🚧 Changes detected — Plan: 0 to add, 2 to change, 0 to destroy. Plan outputLLM ReviewRisk: 🟢 LOW Plan updates two existing Lambda functions in place (0 to add, 2 to change, 0 to destroy), changing an identity provider environment variable from "GoogleSAML" to "Google" in each.
|
This was referenced Oct 30, 2026
Alexanderamiri
added a commit
that referenced
this pull request
Oct 30, 2026
… prompt (#176) ## Why The probe client (#174) showed that Cognito managed login forwards `prompt=select_account` to Google **only when the request also sends `identity_provider`**. `auth-doctor.py` always adds `identity_provider`, so an app that sends only `prompt` passed but would get no account chooser after the Google cutover (#175). ## What - New `chooser` check (WARN only): an app that renames auth variables via `auth.env` but doesn't alias `COGNITO_IDENTITY_PROVIDER` almost certainly doesn't send it. Apps that read the platform variables directly aren't flagged, since the doctor can't see their code. - The authorize warning and the docstring explain the `identity_provider` requirement. ## How verified - `python3 -m unittest discover -s scripts/tests`: 133 tests, OK. There are 4 new tests: aliased without IdP warns, aliased with IdP passes, no aliases passes, and the probe names the IdP. - `python3 -m unittest discover -s terraform/lambda-src/tests`: 219 tests, OK. - Live against the current pool: - frosting's `app.yaml` on main gets `WARN chooser`. - The `app.yaml` from javaBin/frosting#258, which aliases `COGNITO_IDENTITY_PROVIDER`, passes with no warning. ## Rollout Script only, with no Terraform changes. App deploys pick it up from platform `main`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
internal_identity_providers = ["Google"]: every internal app client and auth-claims' FEDERATED_IDENTITY_PROVIDERS move to the Google OIDC provider, which shows Google's account chooser on managed login. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Probe with platform-idp-probe: managed login forwards prompt=select_account to Google only when the request also has identity_provider=; on the single-IdP auto-redirect it drops it. ALB sign-in now sends the client's IdP (from cognito-client-identity-provider) with prompt, and the docs tell apps to send identity_provider=$COGNITO_IDENTITY_PROVIDER alongside COGNITO_EXTRA_AUTH_PARAMS. hd= is never forwarded. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Alexanderamiri
marked this pull request as ready for review
October 30, 2026 09:47
Alexanderamiri
force-pushed
the
feat/cognito-google-cutover
branch
from
October 30, 2026 09:47
b60f790 to
32487b0
Compare
Terraform Plan🚧 Changes detected — Plan: 0 to add, 2 to change, 0 to destroy. Plan outputLLM ReviewRisk: 🟢 LOW Plan updates two existing Lambda functions in place (0 to add, 2 to change, 0 to destroy), changing the identity provider environment variable from "GoogleSAML" to "Google" in each.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces #172 (auto-closed when its base branch was deleted). Rebased onto main: #170, #173 (managed login) and #174 (IdP probe client) are merged and applied.
Why
GoogleSAML has no account chooser. A browser signed in to a personal Google account hits a dead-end
403 app_not_configured_for_user(#157). The Google provider on managed login can show Google's account chooser, but only ifprompt=select_accountreaches Google. DRAFT: do not merge until the checklist below is done.Probe result (2026-10-30,
platform-idp-probe, client75ejr2cdi133ictvip1mc32nr3, lists onlyGoogle)Each request got a 302 straight to
accounts.google.com/o/oauth2/v2/auth. Results were the same on repeated runs:/oauth2/authorizeextra paramspromptin Google URLhdin Google URLprompt=select_accountprompt=select_account&identity_provider=Googleprompt=select_accountidentity_provider=Googleprompt=select_account&identity_provider=Google&hd=java.noprompt=select_accountManaged login forwards
promptonly when the request names the IdP. On the single-IdP auto-redirect it drops it.hdis never forwarded. Domain enforcement relies on the Internal consent screen and auth-claims, as designed. The generic OIDC IdP fallback is not needed: the Google-type IdP does getprompt, the request just has to includeidentity_provider. So this PR adds that fix instead of the fallback.What
internal_identity_providersdefault changes from["GoogleSAML"]to["Google"]. One list feeds every internal app client (app-auth-sync) and auth-claims'FEDERATED_IDENTITY_PROVIDERS.terraform/modules/service-routing): internal-pool rules now sendidentity_provider=<client's IdP>next toprompt=select_account. The IdP is read from the client'scognito-client-identity-providerparameter, which app-auth-sync writes, so it is never hardcoded and follows the cutover. Adds aidentity_provider_parameter_nameoutput tocognito-app-client.docs/app-yaml-reference.md"Account chooser" now says to sendidentity_provider=$COGNITO_IDENTITY_PROVIDERtogether withCOGNITO_EXTRA_AUTH_PARAMS. The generate-modules comment anddocs/cognito-google-setup.mdstep 3 record the probe result.How verified
python3 -m unittest discover -s scripts/tests: OK.python3 -m unittest discover -s terraform/lambda-src/tests: 219 OK.terraform fmt -check -recursive terraformandterraform validateonservice-routing.Googleand rewritescognito-client-identity-provider, which restarts each auth app (app-secret-rollout).identity_provider=GoogleSAML, which matches today's auto-redirect.Rollout: pre-cutover checklist
REQUIRED_EMAIL_DOMAIN, no self sign-up, noCOGNITOon internal clients/javabin/platform/google-oauth/internal/{client-id,client-secret}exist (theGoogleIdP is in the pool)identity_provideris sent (table above)prompt=select_accountandidentity_provider=$COGNITO_IDENTITY_PROVIDER.promptalone is droppedsub(check cupcake/frosting) can handle a newsubper user. Google users areGoogle_<sub>with a newsub. The platform keys on emailRollout: after merge
python3 scripts/auth-doctor.py --app-yaml <app>/app.yamlfor each auth app. Expect a redirect toaccounts.google.comwithprompt=select_account. auth-doctor sendsidentity_providerlike a correct app, so also check that the app itself sends it.GoogleSAML_*users, theGoogleSAMLprovider and the Google Admin SAML app (docs/cognito-google-setup.md, "Decommission").Rollback: revert to
["GoogleSAML"](GoogleSAML still exists until decommission).🤖 Generated with Claude Code