Repository navigation
feat(business-site): let the tenant read its billing keys and resolve their APIs - #6339
Conversation
… their APIs Extend app-business-site-disclosure-readonly with read on exactly secret/data/apps/business-site/numina and secret/data/apps/business-site/stripe. It gets no wildcard, metadata, list or write capability. The payload checker, its rendered-payload contract (now 29 invalid-payload controls) and the docs that describe the role match. Add a platform-owned business-site-dns-visibility CiliumNetworkPolicy. It gives the business-site pods L7 DNS visibility to kube-dns, so the tenant's toFQDNs rules for api.numina.app and api.stripe.com can match. The generated allow-dns policy is L4-only, and the tenant cannot name kube-system itself. The policy opens no new peer or port. Both portal billing flags stay off, and no value is created. Refs #6337 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codex review for least-privilege OpenBao policy (exact read-only entries, no wildcard/metadata/list/write) and whether the platform-owned DNS-visibility CiliumNetworkPolicy opens anything new for business-site pods |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Exercised at
|
|
Codex Review: Didn't find any major issues. Chef's kiss. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
✅
|
✅
|
Code coverage overviewLanguages: Go Go / code-coverage/go
Line coverage data for the main branch is not yet available. View coverage of the 10 most covered files.
ℹ️ Calculations represent line coverage. Results may change as calculations are updated. Updated |

Summary
These are the platform-side prerequisites for the business-site portal's Numina invoices and Stripe card payments (devantler-tech/business-site#587, #588, #590). Both portal flags,
portal-invoice-billingandportal-card-billing, stay off, and nothing here creates or reads a secret value.k8s/bases/infrastructure/vault-config/job.yaml):app-business-site-disclosure-readonly, the only policy of thebusiness-siteKubernetes auth role, now also grantsreadon exactlysecret/data/apps/business-site/numinaandsecret/data/apps/business-site/stripe. These are written in the same style as the existingsmtpentry. No wildcard, metadata, list or write capability is added, and the role binding is unchanged.k8s/providers/hetzner/apps/business-site/cilium-network-policy-dns-visibility.yaml): the tenant will allow HTTPS egress toapi.numina.appandapi.stripe.comwithtoFQDNs(Prepare the tenant package for the portal's Numina and Stripe billing business-site#597). Cilium enforcestoFQDNsonly for names its DNS proxy has seen, and the proxy sees a lookup only when an L7rules.dnsrule covers it.allow-dnspolicy (add-default-deny.yaml) is L4-only.restrict-tenant-network-policiesrefuses a tenant selector that nameskube-system, so the tenant cannot add the rule itself.business-sitepods. It addsrules.dnswithmatchPattern: "*"to the same kube-dns port 53 thatallow-dnsalready allows, so it opens no new peer or port, and resolution stays unrestricted.scripts/check-business-disclosure-readerexpects the two new entries.scripts/tests/test-business-disclosure-reader.shadds five widened-policy controls:updateon Numina,createon Stripe, a Stripe metadatalist, and each new entry removed. That makes 29 invalid-payload controls.docs/tenant-abstraction.mdand the SES relay ADR now describe the role's four exact entries.After it deploys (maintainer)
Store the two values in OpenBao's KV-v2
secretmount, without printing them, as business-siteserver/BILLING.mddescribes:apps/business-site/numina, propertyapi-key;apps/business-site/stripe, propertiesapi-keyandwebhook-secret.The tenant's ExternalSecrets (devantler-tech/business-site#597) can sync only after this PR is deployed and both entries exist.
Validation
bash scripts/tests/test-business-disclosure-reader.sh:PASS: rendered business disclosure identity and 29 invalid-payload controls.go test ./scripts/check-business-disclosure-reader: 15 passed.ksail --config ksail.prod.yaml workload validate: 911 files validated, includingbases/infrastructure/vault-config/job.yamlandproviders/hetzner/apps/business-site/cilium-network-policy-dns-visibility.yaml.kubectl kustomize k8s/providers/hetzner/apps/rendersbusiness-site-dns-visibilitybesidebusiness-site-customer-identity-hold.kubectl kustomize k8s/providers/hetzner/infrastructure/renders thevault-configJob.applywithrestrict-tenant-network-policiesand amanaged-by: krobusiness-site namespace:kustomize-controller, is skipped by the platform carve-out.yamllint,shellcheck,gofmtand markdownlint (MegaLinter's config) are clean for the changed files.git merge-treeagainst feat(customer-identity): run ZITADEL for the business-site portal's customer sign-in #6313's head (which also editsjob.yaml) shows no conflict.Fixes #6337
🤖 Generated with Claude Code