fix(rest-api): allow tenants to use provider templated OSes - #4489
fix(rest-api): allow tenants to use provider templated OSes#4489pbreton wants to merge 1 commit into
Conversation
Signed-off-by: Patrice Breton <pbreton@nvidia.com>
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (3)
Summary by CodeRabbit
WalkthroughThe change adds shared authorization for tenant-owned and eligible provider-owned Templated iPXE Operating Systems. Instance creation, updates, and batch creation use this validation. Tests cover synchronized Site associations and ID-based configurations. ChangesOperating System authorization
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
🔐 TruffleHog Secret Scan✅ No secrets or credentials found! Your code has been scanned for 700+ types of secrets and credentials. All clear! 🎉 🕐 Last updated: 2026-08-03 17:17:05 UTC | Commit: 28975e4 |
What changed
Syncedassociation with the Instance siteRoot cause
Provider-managed templated Operating Systems intentionally have no
tenant_id. The Instance OS ownership checks calledString()on that nil value and required every selected OS to be tenant-owned, even though the Operating System list API intentionally exposes provider-managed definitions to tenants at associated sites.Impact
Tenants can now use provider-managed templated iPXE definitions that are synchronized to their Instance site. Cross-tenant definitions and provider definitions unavailable at that site remain rejected.
Validation
tenant_idgo test ./api/pkg/api/handler -run '^TestBuildInstanceOsConfig_TemplatedIPXE$' -count=1go test ./api/pkg/api/handler -count=1make testfromrest-api/git diff --checkFixes #4486