Skip to content

Allow tenant-owned WebApps within their own namespace #4897

Description

@devantler

🤖 Generated by the Agentic Engineer

Summary

Let a tenant's own deployment artifact use WebApp without gaining authority over another tenant.

Motivation

The invitation-only business portal needs the accepted Tenant/WebApp deployment path. At platform source f3e2a23, the tenant reconciliation role has no WebApp grant; the existing WebApp pilot is platform-controlled. Adding a grant alone is not a complete tenant-ownership boundary.

Proposed Solution

Add the smallest explicit, opt-in tenant WebApp permission and corresponding namespace-bound admission. Preserve existing platform-controlled instances and unchanged omitted-capability behavior. Use the maintained tenant/controller identities and security checks, not a copied workload or broader edit grant. Re-read the current schema and admission contracts before implementation.

Acceptance Criteria

  • Document the exact tenant writer, generated-resource namespace and scoped platform-controller exception using current source and runtime metadata.
  • Default/omitted capability leaves existing tenant permissions and rendered instances unchanged.
  • The enabled tenant can reconcile its own WebApp through the actual signed tenant artifact; missing or foreign namespace targets are rejected by the actual admission path.
  • Negative controls cover cross-tenant targets and attempts to obtain broader workload, credential or execution authority. Preserve the existing image, graph-template, namespace and network controls.
  • Validate affected renders and security/admission tests, obtain current-head review, settle CI and complete the normal protected platform merge/deployment path. Record permitted live readback separately from static evidence.
  • Keep portal identity, private records, payments and worker execution disabled; this permission capability is not a customer release.

Alternatives Considered

A platform-owned pilot can remain supported, but it is not proof that the application's own tenant artifact can reconcile. A blanket grant, copied Deployment or downstream mutation of the graph does not preserve the accepted ownership/security boundary.

Part of devantler-tech/monorepo#3939. Related: platform#4854 (private runtime inputs) and #2523 (stateful workloads), which remain separate implementation concerns.

Priority: High — directly unlocks the requested unified portal deployment. Effort: Medium, including actual admission and deployment proof. Service class: Standard. No implementation has started; no current production fault or approval is inferred.

Activity

  1. moved this to 📥 Backlog in 🌊 Project Boardon Oct 14, 2026
  2. updated Priority High and Effort Medium on Oct 14, 2026
  3. devantler commented on Oct 19, 2026

    @devantler
    ContributorAuthor

    🤖 Generated by the Agentic Engineer

    Implementation refinement from current platform source bf1b90caddbfa67c8ef6bac6402d4079a376ae98; this is static investigation, not delivered permission or runtime proof.

    The existing boundary is still absent: the Tenant reconciliation account uses tenant-edit, which has no WebApp grant, while the WebApp graph derives child namespaces from spec.name. A bounded foundation can ship inactive before the application deployment:

    • Add an explicit Tenant capability defaulting false. Its enabled branch creates only a namespaced binding to a dedicated, nonaggregated WebApp-only role. Do not widen tenant-edit, the Tenant/RGD APIs, credential access, impersonation or execution permissions.
    • Pair the grant with admission binding tenant-authored WebApps to their requesting namespace. Cover missing targets, CREATE/UPDATE retargeting, cross-tenant targets and child-ownership collisions. Verify exact controller identity and status/finalizer behavior before defining the narrow platform exception.
    • Preserve the committed Docker pilot: its WebApp deliberately lives outside its generated workload's target namespace. A global equality rule would break that supported platform-managed case; the graph's illustrative header is not the actual instance.
    • Preserve existing route-hostname admission. KRO is not exempt from that policy, and an unlisted business tenant is currently denied. The staging change must introduce only its approved hostnames, with positive and foreign-host controls; a blanket KRO exception is not needed.

    Expected authoring surfaces are the Tenant graph and its controller bind grant, a dedicated role and their Kustomize registrations, the new admission policy/fixtures and policy-failure-action census, plus tenant documentation. Graph changes also require a reviewed static-scan baseline update without weakening discovery, placement, image or downstream-mutation controls. Verify omitted-capability render equivalence and enabled least-privilege behavior. Existing PR #5099 overlaps CI and graph-wiring guards, so coordinate those exact files if a new regression needs wiring.

    Keep implementation and final runtime verification distinct. Business-site #102 depends on these platform capabilities; its completion cannot also be their prerequisite. Review, merge and deploy the inactive foundation first, then retain the signed-tenant/admission proof as explicit remaining acceptance. Do not close this issue on static tests alone, or activate portal identity, intake, payments or workers.

    The separate private-input blocker #4854 also remains real. Its bounded projection must include the runtime's complete file-reading identity, not only UID/GID: current admission otherwise supplies a different fsGroup. Reuse the application's already-merged projection readers; do not add application Secret API permissions or a generic pod-template escape hatch.

  4. self-assigned this
    on Oct 20, 2026
  5. moved this from 📥 Backlog to 🫴 Ready in 🌊 Project Boardon Oct 20, 2026
  6. moved this from 🫴 Ready to 🏃🏻‍♂️ In Progress in 🌊 Project Boardon Oct 20, 2026
  7. added a commit that references this issue on Oct 20, 2026
  8. added 3 commits that reference this issue on Oct 21, 2026
  9. devantler commented on Oct 21, 2026

    @devantler
    ContributorAuthor

    🤖 Generated by the Agentic Engineer

    Protected delivery of #5153 is verified: reviewed source 3dc09223412b4e1d297410dc1faa53e023b64902 merged as ed020a8d5fd0e6d6ca22930be8ca7d8d186638ff. The merge-group run has a complete 23-job inventory with successful production deployment. The post-merge validation has all nine jobs settled successfully or intentionally skipped; its production observer reports convergence to that exact main revision.

    An independent read-only runtime observation at 2026-10-21T13:19Z matched the deployed artifact to the protected deployment and found its reconciled layers ready. Detailed runtime evidence stays private. The subsequent Go vulnerability scan also passed, including the admission driver and vulnerable negative control; #5164 now carries that recovery receipt.

    This issue remains open for an enabled tenant's actual signed artifact to reconcile its own WebApp, plus missing/foreign namespace and broader-authority rejection through the live admission path. Protected deployment and offline engine coverage do not satisfy those remaining acceptance criteria. Portal identity, private records, payments and worker execution remain outside this activation.

  10. devantler commented on Oct 28, 2026

    @devantler
    ContributorAuthor

    🤖 Generated by the Agentic Engineer

    Recorded the open dependency natively: this issue is now blocked by devantler-tech/business-site#102.

    The criteria still open here (the enabled tenant's own signed artifact reconciling its WebApp, plus rejection of missing or foreign namespaces and broader authority through the live admission path) need the signed tenant artifact that business-site#102 publishes. business-site#102 says it does not need this issue closed first, so the link only runs one way. Once #102 publishes a verified artifact, the runtime proof here can run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Fields

Priority

High

Start date

None yet

Target date

None yet

Effort

Medium

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions