Multi tenancy implementation - #98
Open
GokulVGAot wants to merge 12 commits into
Open
Conversation
Signed-off-by: gokul-aot <gokul.vg@aot-technologies.com>
Signed-off-by: gokul-aot <gokul.vg@aot-technologies.com>
Signed-off-by: gokul-aot <gokul.vg@aot-technologies.com>
Signed-off-by: gokul-aot <gokul.vg@aot-technologies.com>
GokulVGAot
force-pushed
the
multi-tenancy-implementation
branch
from
July 29, 2026 08:01
f8b5e9d to
0c9c5b6
Compare
Signed-off-by: gokul-aot <gokul.vg@aot-technologies.com>
Signed-off-by: gokul-aot <gokul.vg@aot-technologies.com>
Signed-off-by: gokul-aot <gokul.vg@aot-technologies.com>
Signed-off-by: gokul-aot <gokul.vg@aot-technologies.com>
Signed-off-by: gokul-aot <gokul.vg@aot-technologies.com>
Signed-off-by: gokul-aot <gokul.vg@aot-technologies.com>
Signed-off-by: gokul-aot <gokul.vg@aot-technologies.com>
| try: | ||
| for _ in range(40): | ||
| await factory.get("http_generic", tenant_id=DEFAULT_TENANT) | ||
| except BaseException as exc: # noqa: BLE001 |
| try: | ||
| for _ in range(40): | ||
| factory.invalidate_configs(DEFAULT_TENANT, "http_generic", ["default"]) | ||
| except BaseException as exc: # noqa: BLE001 |
| try: | ||
| for _ in range(40): | ||
| factory._default_instance("http_generic") | ||
| except BaseException as exc: # noqa: BLE001 |
Signed-off-by: gokul-aot <gokul.vg@aot-technologies.com>
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.
Description
Adds header-based multi-tenancy and a runtime in-memory connector config API while keeping the existing single-tenant YAML flow working.
Core
X-Tenant-ID/NW_TENANT_ID_HEADER(optional env pin, JWTtenant_idfallback, else__default__)ConnectorConfigStorewith named configs per(tenant, connector), default selection, redacted reads, and fail-closed lookups__default__on startup (NW_CONFIG_BOOTSTRAP_YAML)get(tenant_id, config_name)with a three-part cache key, invalidation on writes, config injection onBaseConnector, and tenant-scoped secrets (NW_{TENANT}_{CONNECTOR}_{KEY})Bindings
/v1/...config CRUD; invoke uses header tenant + optionalconfig_name; tenant prepended to the REST rate-limit keyconfig_nameonInvokeRequest; tenant from metadataNW_TENANT_IDtenant pin; optionalconfig_nametool argumentPlayground
Tests
tests/test_multitenancy.pycovering store lifecycle, identity, factory isolation/invalidation, fail-closed 403s, and direct integrationIntentionally deferred: gRPC streaming and
store.export().Related Issue
Type of Change
Checklist
ruff,mypy,bandit,pytest).git commit -s) per the DCO.