Repository navigation
feat(scaffold): a --claimable project's prod lets visitors sign up, so the unclaimed app is usable - #2791
feat(scaffold): a --claimable project's prod lets visitors sign up, so the unclaimed app is usable#2791reliant-01 wants to merge 1 commit into
Conversation
…o the unclaimed app is usable
There was a problem hiding this comment.
review:changes
Lane: MEDIUM (one pass on gpt-6-luna@codex).
MEDIUM: deploy (internal/templates/deploy/kcl/cloud/main.k.tmpl)
The diff is readable, but it makes all claimable templates depend on a control-plane behavior that is present only in an unmerged sibling change. The corresponding test demonstrates the proposed exception, not production availability, so the generated config can be refused against the current server.
- blocker [B1]
internal/templates/deploy/kcl/cloud/main.k.tmpl:228— Claimable renders now unconditionally declare open signup, but the currently deployed control plane may refuse that declaration when identity mail is unavailable. The exception that admits this case exists only in the cited unmerged change, reliant-labs/control-plane:internal/identityreconcile/signin_v2.go:99@bbf3319b8fce; its test at reliant-labs/control-plane:internal/identityreconcile/signin_v2_test.go:448@bbf3319b8fce confirms behavior in that change, not availability in production. Until control-plane#3658 is merged and deployed, the generated identity declaration can be refused and claimable deployment won't converge, an RC-11 server-before-client incompatibility. Fix: Gate generation of this override on the control plane advertising the required unclaimed-signup behavior, with the previous invite-only output as fallback; otherwise wait until the server support has landed and is available before emitting it.
Fix the blockers and push: the push is reviewed again. (pr-fix takes over if nobody does.)
Reviewed 1633665f40d8d57ea401b8d007d1606da52a7c93.
Posted by Reliant for PR pipeline · pr-review · opened, an automation of @reliant-01.
|
[B1] I agree with the ordering finding. This PR must not ship in a forge release before control-plane#3658 (which admits |
pr-sweep: this hold needs a reason
After 72h a hold is listed on the pipeline health issue and its owner (and @reliant-01) are pinged once. A held PR is never merged or closed automatically. Posted by Reliant for PR pipeline · pr-sweep · hourly, an automation of @reliant-01. |
Part of making the DEFAULT
forge project new x --service a --frontend web --claimableapp work on its unclaimed URL with its native sign-in (owner decision 2026-11-25; new.txt §1 #3).Problem
The scaffolded identity (
deploy/kcl/identity.k) declares only roles, so itssignupis"invite". On Reliant hosting, that means only owners, declared members and invitees can have an account. An anonymous deploy has none of these, so nobody can ever sign in to it. The broker also mounts/auth/registeronly when the declaration delivers a login policy that allows sign-up (kcl/render.k_idn_declares_login_policy).Change
--claimableproject'sdeploy/kcl/prod/main.kdeclaresidentity = idn.IDENTITY | {signup = "open"}, with a comment saying why and what to do once the deploy is claimed.claimable = True.--claimableproject changes. Every other env, and every project made without--claimable, renders exactly as before: invite-only.project new --claimableproject:forge env kcl eval deploy/kcl/prod/main.krendersidentity.signup = {mode: "open"}, and the delivered managed secrets include…_LOGIN_POLICY, so the broker gets the login policy and serves/auth/register;forge lintpasses on that project (35 gating linters;forgeconv-unproven-signupdoes not fire onsignup = "open").Depends on (control-plane)
An unclaimed org's identity sends no mail. control-plane#3658 makes the platform admit
signup = "open"for an UNCLAIMED org with no mail relay, and publishmail: "none", so sign-up creates the account with its password and signs in without a verification email.Without #3658, the platform refuses this declaration ("open or domain signup are emails…"). That would block the anonymous deploy at the identity step, so this PR must not ship in a forge release before control-plane#3658 is live in prod. The other prerequisites for sign-in on the preview are control-plane#3643 (identity DNS), #3650 (a real origin for preview pages) and #3642 (the content scan admits sign-in pages).
Security trade-off (owner-accepted 2026-11-25)
While a deploy is unclaimed, anyone can create an account on it, with an email address nobody verified. The app's author can't bind anything to that address safely. The deploy expires in 72h unless claimed, and the comment tells the claimer to drop the override (or keep it once their organization delivers mail, which then verifies new addresses).
Tests
env_cloud_prod_claimable.k.goldenis updated.task test:short -- ./internal/templates/... ./internal/generator/...passes.project new --claimable→scaffold→env kcl eval→forge lintby hand (above).Post-merge check
After the next forge release, and after control-plane#3658 is live:
forge project new x --service a --frontend web --claimable, thenforge env deploy prod --claimable.GET /_api/auth/optionsreturnsselfSignup: true.Rollback
Revert this PR. New
--claimableprojects are invite-only again. Projects already scaffolded keep the line, which their authors own.