feat: multi-tenant deployment support#2138
Open
alexm-redhat wants to merge 1 commit into
Open
Conversation
Add tenant-scoped sandbox and provider ownership enforcement to the OpenShell gateway, porting the multi-tenant deployment pattern from Kagenti's per-tenant gateway architecture. Changes across 20 files in openshell-core and openshell-server: - Tenant extraction from OIDC subject claims - Tenant-scoped sandbox CRUD (create, list, get, delete) - Tenant-scoped provider CRUD with ownership enforcement - CLI --namespace flag for tenant selection - Compute driver tenant labels on sandbox containers - Config structs for multi-tenant mode Build: PASS | Tests: 3,072 passed, 0 failed Closes NVIDIA#1722
|
All contributors have signed the DCO ✍️ ✅ |
Author
|
I have read the DCO document and I hereby sign the DCO. |
Author
|
recheck |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds tenant-scoped ownership enforcement to the OpenShell gateway, enabling multi-tenant sandbox and provider isolation.
Core ownership engine (
auth/ownership.rs, 448 lines):OwnershipGuardtrait withcheck_owner()andstamp_owner()methodssubclaims with configurable claim field(owner, name)uniquenessGateway integration:
auth/oidc.rsauth/authz.rsgrpc/sandbox.rsgrpc/provider.rs--multi-tenantflag andmulti_tenant.enabledconfig toggle (off by default)21 files changed, +825/-17 lines across
openshell-coreandopenshell-server.Test plan
cargo build— all crates compilecargo test— 3,072 passed, 0 failed, 10 ignoredmulti_tenant.enabled: true, create sandboxes as two different OIDC users, verify isolationAddresses #1722