Title: Project Zero Trust accepts Access policies that let in anyone with a One-time PIN or public login · Issue #429 · voidzero-dev/void · GitHub
Open Graph Title: Project Zero Trust accepts Access policies that let in anyone with a One-time PIN or public login · Issue #429 · voidzero-dev/void
X Title: Project Zero Trust accepts Access policies that let in anyone with a One-time PIN or public login · Issue #429 · voidzero-dev/void
Description: Problem Project Zero Trust accepts an Access policy whose only identity check is a One-time PIN, a public login (GitHub, consumer Google, an unrestricted Cloudflare login), or a login added with the generic OpenID Connect or SAML connect...
Open Graph Description: Problem Project Zero Trust accepts an Access policy whose only identity check is a One-time PIN, a public login (GitHub, consumer Google, an unrestricted Cloudflare login), or a login added with th...
X Description: Problem Project Zero Trust accepts an Access policy whose only identity check is a One-time PIN, a public login (GitHub, consumer Google, an unrestricted Cloudflare login), or a login added with th...
Opengraph URL: https://github.com/voidzero-dev/void/issues/429
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Project Zero Trust accepts Access policies that let in anyone with a One-time PIN or public login","articleBody":"## Problem\n\nProject Zero Trust accepts an Access policy whose only identity check is a One-time PIN, a public login (GitHub, consumer Google, an unrestricted Cloudflare login), or a login added with the generic OpenID Connect or SAML connector. Such a policy lets in anyone who has an email address or such an account, so the \"protected\" apps are public. Cloudflare names `Include | Login Methods | One-time PIN` next to `Include | Everyone` as the two settings that let anyone access an application.\n\n```\ninstaller (platform protection, app access) ──▶ rejects OTP-only (#424)\nAdmin → Zero Trust \"Save and reconcile\" ──▶ accepts OTP-only\nvoid platform zero-trust configure ──▶ accepts OTP-only\nstatus --check / \"Check with Cloudflare\" ──▶ \"Healthy\", also after a policy is edited to Everyone\n```\n\n- The server passes an \"any login method\" rule to the shared check (`platform/packages/api/src/zero-trust/cloudflare.ts`). This has been the behavior since project Zero Trust shipped (#335).\n- Policy rejections are plain errors. The operator API maps them to `502 Cloudflare Zero Trust reconciliation failed`, and domain activation maps them to `503 Retry domain setup`. The operator never sees the reason.\n- Access apps reference policies by ID, and Cloudflare evaluates the live policy. A check passes only at the moment it runs. A later edit in Cloudflare is not reported.\n\nWhere a selection is checked today:\n\n| Path | Code |\n| --- | --- |\n| configure (Admin UI, CLI) | `zero-trust/installation.ts` `configurePlatformZeroTrust` → `validateSelection` |\n| reconcile, hourly resume, domain activation | `zero-trust/operation.ts` `runConfigureOperation` (from `installation.ts` reconcile, configure, domain) |\n| status --check | `zero-trust/status.ts` |\n| installer readiness | `platform-app-access.ts` (needs `live.present && !live.drifted`) |\n\n## Decision\n\nCheck strictly when someone submits settings. Stay lenient when the server re-checks saved settings. Report problems with saved settings as a warning.\n\n```\nsubmit (Admin Save, zero-trust configure, installer handoff) ─▶ STRICT → 409 + reason\n exception: only the token changes (same IdPs, policies, defaults) ─▶ lenient\nbackground re-check (reconcile, resume, domain activation) ─▶ LENIENT (unchanged)\nstatus --check / \"Check with Cloudflare\" ─▶ lenient + policyWarning (never changes live)\n```\n\nRejecting during background re-checks closes nothing, because Cloudflare keeps serving the live policy. It would only stop reconcile, domain changes and new protected projects. A strict check on submit costs an affected admin one policy edit, at a time when they are already changing the settings.\n\n## Design\n\n**`cloudflare.ts`**\n- `validateSelection(input, check: 'submit' | 'saved' | 'report' = 'saved')` returns `{ teamDomain, policyWarning? }`.\n - `submit`: a `login_method` rule counts only when `isPlatformAccessCompanyIdentityProvider(provider)` is true (the installer's rule). Since #424 this means an IdP type whose required settings name one tenant: Entra ID, Okta, OneLogin, PingOne, Centrify, Google Workspace, or Cloudflare with Restrict to account members. Generic `oidc` and `saml` do not count.\n - `saved`: today's behavior.\n - `report`: run `saved` (failures throw as today), then the strict rule on the policies already fetched. This pass is best effort: a policy rejection becomes `policyWarning`, and any other error (429, 5xx) is logged and gives no warning. It never reaches the status catch.\n- Provider lookup: seed a map with the selected IdPs that are already fetched. Fetch each other `login_method` IdP once by ID. A 404 means the IdP was deleted. A policy with no `login_method` rule makes no extra call. Share one group cache between the two passes.\n- Every policy-shape throw becomes `ZeroTrustPolicyRejectedError`. \"Cloudflare returned an invalid …\" stays a plain `Error`.\n\n**`errors.ts`**: `ZeroTrustPolicyRejectedError extends ZeroTrustUnavailableError` (409). It lives here to avoid an import cycle with `cloudflare.ts`.\n\n**`installation.ts`**: use `saved` only when the token is the only change: `(previous.enabled || previous.operation)` and the same IdP IDs, policy IDs, `protectNewProjects` and `publicAccess`, and no `existingProjects`. Otherwise use `submit`. In the claim callback, if the exception applied but the saved operation changed meanwhile, throw `ZeroTrustUnavailableError('The saved Zero Trust operation changed. Retry configuration.')`.\n\n**`status.ts`**: pass `report` and add `policyWarning: string | null`. In the existing catch, set `policyWarning` to the message when the error is a `ZeroTrustPolicyRejectedError` (a saved policy that was edited to Everyone or Bypass), and keep `live` exactly as it is today.\n\n**Messages**\n- `Access policy \"\u003cname>\" lets in anyone who can sign in with \u003cIdP name>. In Cloudflare, add a Require rule such as Emails ending in your company domain, or select another policy.` The text says Require, not Include: Include rules are OR, so an extra Include still lets in anyone with OTP.\n- For a group: `Access group \"\u003cname>\" lets in …` with the same ending.\n- Generic OIDC or SAML login: `Access policy \"\u003cname>\" relies only on \u003cIdP name>, a generic OIDC or SAML login, and Void cannot tell who can sign in with it. In Cloudflare, add a Require rule such as Emails ending in your company domain, or select another policy.`\n- Deleted IdP: `Access policy \"\u003cname>\" uses a login method whose identity provider no longer exists (\u003cid>). Fix the policy in Cloudflare, or select another policy.`\n- Cloudflare IdP without \"Restrict to account members\": end with `turn on Restrict to account members for that login method in Cloudflare, or select another policy.`\n\n**Surfaces**\n- Admin \"Save and reconcile\": the error page shows the message, and nothing is saved.\n- Admin \"Check with Cloudflare\": `\u003cBanner status=\"warning\" title=\"Access policy is too broad\" description={policyWarning} />`. \"Live application\" stays Healthy.\n- `zero-trust configure`: 409 with the message. `--plan` stays offline.\n- `zero-trust status --check`: prints `Policy warning: \u003ctext>`.\n- `zero-trust reconcile` and domain activation on a policy now rejected for its shape: 409 with the reason, instead of the generic 502 or 503.\n- No new flag and no new token permission (\"Identity Providers … Read\" is already required).\n\n**Docs**\n- `docs/guide/platform/administration/zero-trust.md`: list \"policies that rely only on One-time PIN, a public login such as GitHub, or a generic OIDC or SAML login\" among rejected policies, as `setup.md` does. Add a `Policy warning` bullet to the status section.\n- `docs/reference/cli/platform-zero-trust.md`: the same clause.\n\n## Effect on running installations\n\nServing, reconcile, resume and domain changes keep working. `status --check` and the Admin page show a warning until the policy is fixed. The next save of Zero Trust settings rejects the policy. Release note: \"If you chose Zero Trust policies in Admin or with `void platform zero-trust configure`, run `void platform zero-trust status --check` and fix any Policy warning.\"\n\n## Not doing\n\n- Reject during background re-checks: blocks operations and closes nothing.\n- Filter pickers: the Admin UI and the CLI take IDs, and the installer pickers already check on submit.\n- Migrate or turn off Zero Trust: Void never rewrites customer policies, and turning Zero Trust off makes apps public.\n- Fail closed for protected projects: an outage caused by a policy the admin chose.\n\n## Tests\n\n- configure with `include: [login_method OTP]` → 409 with the message, nothing saved. Fails today (200).\n- Cloudflare's recipe (`include email_domain`, `require login_method OTP`) → 200. `include [OTP, email_domain]` (OR) → 409.\n- Cloudflare IdP: `restrict_to_account_members` false → 409, true → 200. Okta login method → 200.\n- Generic OIDC or SAML login method alone → 409. Generic OIDC Include + `email_domain` Require → 200.\n- `login_method` IdP outside the selected IDs → fetched by ID; a 404 → 409 with the \"no longer exists\" text.\n- configure with an Everyone policy → 409 with the reason. Fails today (502).\n- Saved OTP-only policy: reconcile → 200; `status --check` → live unchanged and `policyWarning` set; a new configure with other settings → 409.\n- Token-only change with a saved OTP-only policy → 200, with or without a pending operation. Changing the IDs → 409.\n- A strict-pass 429 in `report` → no warning, live unchanged.\n- Domain activation with a saved policy edited to Everyone → 409 with the reason (was 503).\n- Admin page shows the banner when `policyWarning` is set.\n\n## Related, out of scope\n\n- Platform protection policies (`admission.access`) are checked only at install. A later OTP-only edit in Cloudflare can open company admission. This needs a separate check.\n- PingOne's Cloudflare doc example shows type `ping`, while the API enum says `pingone`. Confirm the live value. `duo` is not on the list on either side.\n- Cloudflare's \"Cloudflare Account Member\" selector is not on the company rule list on either side. Its API rule key is unverified.\n- `zero-trust configure --plan` could run the same read-only check, since the token is in the request.\n\nDepends on #424 (`isPlatformAccessCompanyIdentityProvider` in `packages/platform/src/access-policy.ts`).\n\n🤖 Generated with [Claude Code](https://claude.com/claude-code)\n\nhttps://claude.ai/code/session_0123r5HnanmW2VUrZ7VWDufH\n","author":{"url":"https://github.com/Brooooooklyn","@type":"Person","name":"Brooooooklyn"},"datePublished":"2026-10-14T15:53:31Z","url":"https://github.com/voidzero-dev/void/issues/429"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:172c1b00-0b7c-58f9-787e-dbf0e2eab277 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E8B6:357545:D789E:12D7DE:6AFBDA77 |
| html-safe-nonce | 7207ac0205cd598a2c5c5562d467dd6b86c7b89b4c1adac7719f36dc12846735 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFOEI2OjM1NzU0NTpENzg5RToxMkQ3REU6NkFGQkRBNzciLCJ2aXNpdG9yX2lkIjoiNTcwNzkyOTcyMzM0Njg2ODg1NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 624e12bec22b3992f24a29fae2fa743f97b73e97bad47b3d2d894ef62f380f32 |
| hovercard-subject-tag | issue:5851005182 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/voidzero-dev/void/429/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6db5ad25f0128072c91cb550fd97891e8c4e4170004d84f95e6369b0952c3b19/voidzero-dev/void/issues/429 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6db5ad25f0128072c91cb550fd97891e8c4e4170004d84f95e6369b0952c3b19/voidzero-dev/void/issues/429 |
| og:image:alt | Problem Project Zero Trust accepts an Access policy whose only identity check is a One-time PIN, a public login (GitHub, consumer Google, an unrestricted Cloudflare login), or a login added with th... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Brooooooklyn |
| hostname | github.com |
| expected-hostname | github.com |
| None | 18742cb872ec73544356e60359266b67aafece70c4ce008042e06227924cdd07 |
| turbo-cache-control | no-preview |
| go-import | github.com/voidzero-dev/void git https://github.com/voidzero-dev/void.git |
| octolytics-dimension-user_id | 149750581 |
| octolytics-dimension-user_login | voidzero-dev |
| octolytics-dimension-repository_id | 1164437080 |
| octolytics-dimension-repository_nwo | voidzero-dev/void |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1164437080 |
| octolytics-dimension-repository_network_root_nwo | voidzero-dev/void |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 820be804f18e1ef3940bd74a00d41d73d02e2b91 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width