marketplace belongs in the shc tenant: 2026-08-16
Owner ruling 2026-08-16: “SHC’s own products leave the corp tenant”;
license-broker → an shc tenant; marketplace → establish whether it
belongs in shc too. It is the public storefront on
marketplace.selfhostedcloud.org. Argue it.”
This document is that argument, the measurement behind it, and the one real obstacle in the way of acting on it.
Verdict: yes, marketplace belongs in the shc tenant, on the class
criterion, and it is by a wide margin the cheapest of the three tenant
moves. But the thing that put it in corp is not a decision recorded
anywhere in this repo; it is a protected CI/CD variable. Fix that first,
or the move is undone by the next pipeline.
| # | ruling | consequence |
|---|---|---|
| M1 | marketplace is the same CLASS as license-broker: vendor-deployed SHC infra, never installed by a customer. Its own package says so. | The criterion that sends license-broker to shc sends marketplace there too. There is no third category. |
| M2 | The realm-separation benefit is nil TODAY, and that is not a reason to refuse. marketplace federates no identity: zero integration edges, access: open by design. | The purchase is ownership + blast radius for the future write surfaces, not a separation it is currently using. Say so rather than overselling it. |
| M3 | SHC_TENANT is the actual decision-maker, and it is invisible. One protected CI variable on this project, value corp, applied to every deploy/*.shc.yaml. | The move is a variable flip, which is exactly the problem. The tenant belongs in the deployfile, per stack. |
| M4 | The deployfile schema has no tenant: key. | The blocking gap. Until it exists, marketplace and portal cannot sit in different tenants, and neither one’s tenant is reviewable in an MR. |
| M5 | Do not flip the variable without a plan for the bench. A tenant change is a fresh install, not a relocation; the catalog bench’s data does not travel, and two stacks would claim the same host. | Reproducible (the seeder), unlike keygen-db, but not automatic. |
1. The class argument: marketplace is license-broker’s sibling, and its own package says so
Section titled “1. The class argument: marketplace is license-broker’s sibling, and its own package says so”The strongest evidence is not an inference. deploy/shc/marketplace/app.yaml
carries an essay titled “WHY THIS PACKAGE LIVES HERE AND NOT UNDER apps/”,
and it closes with this, verbatim:
The nearest sibling in shape is
license-broker/app/, the other SHC-infra package that sits outsideapps/because the vendor deploys it rather than shipping it.
and, one paragraph earlier:
It is not a product anyone installs. The estate catalogue is the set of apps a TENANT installs on THEIR cluster; the marketplace is the vendor’s own storefront, deployed once, by us, on our estate. Publishing it into the index would list the shop inside the shop.
Its tags: block ends with shc-infra. The owner’s rationale for sending
license-broker to shc is license-broker/README.md’s
“a vendor / SHC-infra component … never installed by customers”. These are
two statements of the same sentence about two packages. Whatever criterion
moves one moves the other.
Measured corroboration: the estate agrees that marketplace is not a catalogue product:
$ shc show marketplace -t corp -e prodshc: [X404960CATNOF] catalog application marketplace not foundThe deployment exists; the catalogue entry does not. That is the shape of a vendor component.
The naming system agrees too. deploy/marketplace.shc.yaml sets out the
estate’s two disjoint host namespaces and picks deliberately:
*.corp.bitspur.com: BITSPUR’S INTERNAL TOOLS, named for the ROLE they play in the company…*.selfhostedcloud.org: THE PRODUCT’S OWN PUBLIC SERVICES. Exactly one today (license.selfhostedcloud.org, the license-broker) and it is the precedent that matters here… The marketplace is the second member of that second set.
Live ingress, read 2026-08-16:
license.selfhostedcloud.org -> corp_prod_license_brokermarketplace.selfhostedcloud.org -> corp_prod_marketplace_0api.marketplace.selfhostedcloud.org -> corp_prod_marketplace_1vpn.corp.bitspur.com -> corp_prod_netbird_0vpn-api.corp.bitspur.com -> corp_prod_netbird_1The selfhostedcloud.org set is exactly {license-broker, marketplace}. The
host namespace already draws the line the tenant should draw. The tenant is
the one axis still filing the product’s shopfront under BitSpur’s internal
tooling.
2. The counter-argument, and why it loses
Section titled “2. The counter-argument, and why it loses”“It is the PUBLIC storefront. A tenant is an identity boundary; marketplace has no identity to separate, so the move buys nothing.”
Half true, and worth stating in full rather than waving away.
- Measured:
shc integration ls -t corp -e prod -s marketplacereturns no edges at all. Nooidc, nopostgres, nothing. Contrast netbird, which hasoidc → keycloakandpostgres → netbird-db. app.yamlis emphatic that this is deliberate: “ACCESS: OPEN. An app store you must log in to browse is not an app store.”- So marketplace holds no Keycloak clients, mints no realm roles, and federates no users. Moving it to a new realm moves an empty set.
It loses for three reasons.
- The criterion is class, not current coupling. M1 does not say “move
things that use a realm”; the ruling says SHC’s own products leave the
corp tenant. Coupling is what makes a move expensive (see
license-broker, where it makes the move impossible today). Its absence is what makes this one cheap. Absence of coupling is an argument for moving now, not for never moving. - The write surfaces are real and growing.
app.yamlnames them: the stack now carries its own Frappe catalog bench, with/apibehind a frappe login and the desk behind the site Administrator. Those are Frappe’s own auth today, not the deployment-wide SSO axis, but a storefront with a bench is exactly the thing that acquires vendor operators, and the first one should be created in SHC’s realm, not BitSpur’s staff realm. - Ownership and blast radius. An RBAC grant scoped to
corptoday reaches the public storefront of the product. That is wrong on its own terms, independent of whether the storefront currently checks it.
3. ★ The thing actually holding marketplace in corp is a CI variable
Section titled “3. ★ The thing actually holding marketplace in corp is a CI variable”This is the finding that changes what the lane is.
deploy/marketplace.shc.yaml has no tenant in it. Neither does the
generator’s schema. The tenant comes from the pipeline. Read from this
project’s CI/CD settings, 2026-08-16:
| variable | value | protected |
|---|---|---|
SHC_DEPLOY_ENABLED | true | yes |
SHC_TENANT | corp | yes |
SHC_HOST | 37.27.215.210 | yes |
MARKETPLACE_SEED_ENABLED | true | yes |
That variable is the whole of the tenant mechanism:
cicd@c144110b templates/shc-base.yml:
TENANT_FLAG=""[ -n "${SHC_TENANT:-}" ] && TENANT_FLAG="-t $SHC_TENANT"Three consequences.
(a) The deployfile pipeline is ARMED. The .gitlab-ci.yml essay above the
include still reads ”★ INERT UNTIL SOMEONE ARMS IT … not set in this file;
so merging this changes no pipeline until the cluster wiring
(SHC_DEPLOY_ENABLED, SHC_HOST, SHC_SSH_KEY) exists in Settings >
CI/CD.” That wiring now exists. The comment is stale and should be corrected
when this lane lands.
(b) corp/prod/marketplace is NOT out-of-band drift. The live row reads
app = /home/admin/shc-apps/marketplace-prod (a local path, not a catalogue
name), which looks like a hand install and is not one. From
cicd@c144110b templates/shc-base.yml:
REMOTE_DIR="/home/$SHC_SSH_USER/shc-apps/$SHC_STACK-$SHC_ENV"rsync -az --delete -e "ssh $SSH_OPTS" "$SHC_APP_DIR/" "$SHC_SSH_USER@$SHC_HOST:$REMOTE_DIR/"With SHC_SSH_USER=admin, SHC_STACK=marketplace, SHC_ENV=prod that is
exactly /home/admin/shc-apps/marketplace-prod. The deployment is precisely
what the declared source of truth produces.
(c) …except for its tenant, which the declared source of truth does not
mention. corp was never chosen for marketplace. It was chosen once, for
the pipeline, and every deployfile inherits it. deploy/ already holds a
second one (portal.shc.yaml, my.selfhostedcloud.org, not yet deployed),
which is also an SHC product and will also silently land in corp.
So the honest form of this ruling is not “move marketplace”. It is “stop deciding tenancy in a variable nobody can see in an MR.”
4. The blocking gap: the deployfile schema has no tenant:
Section titled “4. The blocking gap: the deployfile schema has no tenant:”From the pinned generator (cicd@c144110b, shc-deployfile/generate.sh),
the complete schema:
stack: myapp # required; SHC stack name [a-z0-9-]app: deploy/shc/myapp # required; app package dir in-repopublic: true # optional (default true) -> --publicdomain: myapp.example.com # required; environment host fan-out basevars: # optional; --var key=value on install AND updatesurfaces: # optional; --expose bindingsenvironments: # review / dev / test / prodNo tenant. The template’s own header lists optional SHC_TENANT among the
pipeline variables, which is the whole of the tenant story: one value for
every deployfile in the repo.
The fix is a schema addition in cicd, not a change here: a per-deployfile
tenant: key that renders -t <tenant> on install and update, defaulting to
$SHC_TENANT so no existing consumer changes behaviour. Then
marketplace.shc.yaml and portal.shc.yaml each declare tenant: shc in the
file, in the diff, in code review, which is where a tenant assignment
belongs. Track it as the follow-on to this ruling.
Flipping SHC_TENANT to shc without that change would work, and is a
legitimate interim step, but it moves every deployfile at once and leaves
the tenant exactly as invisible as it is now.
5. What the move costs: read this before flipping anything
Section titled “5. What the move costs: read this before flipping anything”A tenant change is a fresh install, not a relocation, on every path:
- terraform’s
shc_deployment.tenantisRequiresReplace(marketplace is not in terraform, but the semantics are the platform’s, not the provider’s); - the deployfile path simply installs
shc/prod/marketplace, which does not exist yet, so it installs empty.
Therefore:
-
The bench data does not travel. The catalog bench is MariaDB-backed. Unlike
keygen-db(the licence ledger, and the reason lane A stops), this data is reproducible:MARKETPLACE_SEED_ENABLED=trueand the release-tag seeder (scripts/import_catalog.py) repopulates the catalogue. Reproducible is not the same as automatic. Confirm a seed run before retiring the old stack. -
Two stacks would claim the same hostnames, and the pipeline is designed to make that happen.
cicd@c144110b templates/shc-base.yml, verbatim:The existence check matches the tenant too when
SHC_TENANTis set:shc lslists every tenant’s stacks, and a same-named stack in a NEIGHBOUR tenant must route this run to install, not to an update that the tenant flag would then point at the wrong deployment.So a
SHC_TENANT=shcrun takes the install branch by design.corp/prod/marketplacekeepsmarketplace.selfhostedcloud.organdapi.marketplace.…until it is uninstalled. Uninstall the corp stack in the same window, or the new one installs into a host collision. -
bench.adminPasswordisref+vault://marketplace_admin_password?autogen, and vault refs are TENANT-SCOPED. In tenantshcthe autogen mints a new password. Anything holding the old one (including the seeder path) must be re-pointed. (Contrast lane A, where the three broker secrets are required, not autogen, and a missing one fails closed withX404905SECREQ. Autogen fails silently different, which is worse.) -
shc_tenant.shcmust exist first.X404973TNTNXS: the daemon refuses a tenant it has never seen. That resource is proposed inbitspur/ops(hetzner/hel1/deployments/shc.tf). -
deploy_prodis a MANUAL job on default-branch and tag pipelines, by deliberate design inmarketplace.shc.yaml. Nothing fires on merge. Good.
6. ★ What the move buys, and what it does not
Section titled “6. ★ What the move buys, and what it does not”A Keycloak realm for SHC’s own plane, and an ownership boundary that stops at the product.
It does not buy network separation, and nobody should read it as if it
did. Networking on this estate is per-stack. Measured, docker network ls
on bitspur 2026-08-16:
corp_prod_keygen_public corp_prod_netbird_publiccorp_prod_keygen_db_public corp_prod_netbird_db_publiccorp_prod_license_broker_default corp_prod_marketplace_publicmaster_default_traefik_public master_default_traefik_defaultThe shape is <tenant>_<env>_<stack>_public. There is no corp_* tenant-wide
network for a stack to be inside of, so there is none for a tenant move to
take it out of. And every public deployment in every tenant joins the one
shared ingress master_default_traefik_public, measured on the license-broker
container, attached to exactly corp_prod_keygen_public,
corp_prod_license_broker_default, master_default_traefik_public. After the
move, shc_prod_marketplace sits on that same shared network beside every
public corp stack, exactly as it does now.
shc tenant --help calls a tenant owner of “its own stacks, overlay network,
and Keycloak realm”. The middle term is loose, and the same help text corrects
itself two lines later: “the network separation is a firewall policy rather
than a security boundary.” Read the firewall policy.
7. Order of operations
Section titled “7. Order of operations”shc_tenant.shc:bitspur/opsMR (lane A). Nothing else in it.tenant:key in thecicddeployfile schema, defaulting to$SHC_TENANT.tenant: shcindeploy/marketplace.shc.yaml(and decideportal.shc.yamlat the same time; it is the same class and the same question).- Bump the pinned
cicdref here (all three refs together, per the essay in.gitlab-ci.yml), and correct the stale “INERT UNTIL SOMEONE ARMS IT” paragraph. - Click
deploy_prod. Confirm the seed. Uninstallcorp/prod/marketplacein the same window.
None of steps 2–5 is in this MR; this MR is the argument and the measurement that make them safe to plan.