feat(tenants): provision the product tenant with the registry UUID on create (#21)
ci / shared (push) Successful in 12s
ci / test (push) Failing after 16m8s
ci / image (push) Skipped

This commit was merged in pull request #21.
This commit is contained in:
2026-09-01 21:20:03 +00:00
parent 80565fdbf2
commit a048d47959
6 changed files with 255 additions and 3 deletions
+11
View File
@@ -27,6 +27,13 @@ type Config struct {
// contains AuthAudience.
AuthEnabled bool
AuthAudience string
// Downstream product provisioning. When ProductAPIURL is set, tenant
// creation also provisions the tenant in the product's own database with
// the SAME registry UUID, so both anchors agree. Empty ⇒ no-op adapter.
ProductAPIURL string
ProductAPIPath string
ProductTimeout time.Duration
}
func Load() (*Config, error) {
@@ -49,6 +56,10 @@ func Load() (*Config, error) {
AuthEnabled: getenv("AUTH_ENABLED", "false") == "true",
AuthAudience: getenv("AUTH_EXPECTED_AUDIENCE", "tenant-registry"),
ProductAPIURL: os.Getenv("PRODUCT_API_URL"),
ProductAPIPath: getenv("PRODUCT_API_TENANTS_PATH", "/sdk/v1/tenants"),
ProductTimeout: 10 * time.Second,
}, nil
}