feat(onprem): refuse unknown product keys, no trials in the catalog, tighter tests

- Start fails when PRODUCTS or a URL override names no catalog product.
- The on-prem catalog sets supports_trial=false (the portal hides the button).
- Test that seeded cloud provision URLs are never called on-prem, with a
  cloud control; the outbox test gets its cloud control too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 3e42b1ceb8)
This commit is contained in:
Sharang Parnerkar committed 2026-11-20 17:08:48 +01:00
1 parent a4fb318773
commit b30b5e3f1c
6 files changed
+196 -5

No files matched your search

+11 -1
View File
@@ -84,9 +84,19 @@ func main() {
defer s.Close()
kind := storeKind(s)
// PRODUCTS / PRODUCT_*_URLS (on-prem: the only source of product URLs).
if err := store.CheckProductKeys(bootCtx, s, cfg.Products, cfg.LaunchURLs, cfg.ProvisionURLs); err != nil {
slog.Error("product overrides invalid", "err", err)
os.Exit(1)
}
s = store.WithProductOverrides(s, cfg.CatalogEnv(), cfg.Products, cfg.LaunchURLs, cfg.ProvisionURLs)
if cfg.OnPrem() {
slog.Info("on-prem mode: no ERP, no trial ladder, no sign-up", "products", cfg.Products)
var noProvision []string
for _, k := range cfg.Products {
if cfg.ProvisionURLs[k] == "" {
noProvision = append(noProvision, k)
}
}
slog.Info("on-prem mode: no ERP, no trial ladder, no sign-up", "products", cfg.Products, "without_provisioning", noProvision)
}
var kc keycloak.Adapter