Title: feat(server): createTenantStore — opinionated multi-tenant AccountStore with fail-closed isolation · Issue #457 · adcontextprotocol/adcp-client-python · GitHub
Open Graph Title: feat(server): createTenantStore — opinionated multi-tenant AccountStore with fail-closed isolation · Issue #457 · adcontextprotocol/adcp-client-python
X Title: feat(server): createTenantStore — opinionated multi-tenant AccountStore with fail-closed isolation · Issue #457 · adcontextprotocol/adcp-client-python
Description: Parent: #452 Depends on: #456 (AccountStore.sync_governance typed surface) JS source .changeset/create-tenant-store.md (6.7) — the headline 6.7 helper. Problem solved Resolves the class of bug "adopters routing by wire-supplied operator ...
Open Graph Description: Parent: #452 Depends on: #456 (AccountStore.sync_governance typed surface) JS source .changeset/create-tenant-store.md (6.7) — the headline 6.7 helper. Problem solved Resolves the class of bug "ado...
X Description: Parent: #452 Depends on: #456 (AccountStore.sync_governance typed surface) JS source .changeset/create-tenant-store.md (6.7) — the headline 6.7 helper. Problem solved Resolves the class of bug &quo...
Opengraph URL: https://github.com/adcontextprotocol/adcp-client-python/issues/457
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"feat(server): createTenantStore — opinionated multi-tenant AccountStore with fail-closed isolation","articleBody":"Parent: #452\nDepends on: #456 (AccountStore.sync_governance typed surface)\n\n## JS source\n\n`.changeset/create-tenant-store.md` (6.7) — the headline 6.7 helper.\n\n## Problem solved\n\nResolves the class of bug \"adopters routing by wire-supplied operator without cross-checking the auth principal could write across tenants.\" This is solved by baking the per-entry tenant gate INTO the framework — cross-tenant entries never reach adopter code.\n\n## Proposed API\n\n```python\nfrom adcp.decisioning import create_tenant_store\n\nstore = create_tenant_store(\n resolve_by_ref=lambda ref: ..., # AccountStore.resolve\n resolve_from_auth=lambda ctx: tenant_id_or_none, # tenant from auth principal\n tenant_id=lambda account: account.tenant_id, # extract tenant from Account\n tenant_to_account=lambda tenant_id: account_or_none,\n upsert_row=lambda row, ctx: ..., # optional adapter hook\n sync_governance_row=lambda row, ctx: ..., # optional adapter hook\n)\n```\n\n## Fail-closed semantics\n\n- If `resolve_from_auth(ctx)` returns `None`, every entry fails `PERMISSION_DENIED` regardless of operator.\n- `accounts.upsert` and `accounts.sync_governance` on the returned store are immutable (Python equivalent of JS's `writable: false`) so adopters can't override and bypass the gate.\n- Adopters with genuine custom needs use composition or write a plain `AccountStore`.\n\n## Acceptance criteria\n\n- `create_tenant_store` exported from `adcp.decisioning`.\n- Fail-closed test: `resolve_from_auth` returns `None` → every entry rejected with `PERMISSION_DENIED`.\n- Cross-tenant test: principal's tenant != entry's tenant → rejected before reaching `upsert_row`/`sync_governance_row`.\n- Immutability test: attempting to override `accounts.upsert` on the returned store raises.","author":{"url":"https://github.com/bokelley","@type":"Person","name":"bokelley"},"datePublished":"2026-05-03T11:29:01Z","url":"https://github.com/adcontextprotocol/adcp-client-python/issues/457"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:439aa7bd-8226-795c-2cf1-f8c9b163a745 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 94F8:2DBB21:B8C875:F798E5:6B00F6C1 |
| html-safe-nonce | 69fac6ea4bccb833e60d5ee2680953bf0a27e888f8c2627e5c951b5e9f362058 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NEY4OjJEQkIyMTpCOEM4NzU6Rjc5OEU1OjZCMDBGNkMxIiwidmlzaXRvcl9pZCI6IjI1NjU1MzI1ODY0NDkzNjg3NzAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | bf409ef122c15da5eb8052d09c0f198fa971a8a168a8417f8e0251acfa33a8de |
| hovercard-subject-tag | issue:4371631910 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/adcontextprotocol/adcp-client-python/457/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9f1fdfb838a59a9b73cc34b014b5f2cd9d89cff6af07c7bc378c2584a9c8ccb7/adcontextprotocol/adcp-client-python/issues/457 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9f1fdfb838a59a9b73cc34b014b5f2cd9d89cff6af07c7bc378c2584a9c8ccb7/adcontextprotocol/adcp-client-python/issues/457 |
| og:image:alt | Parent: #452 Depends on: #456 (AccountStore.sync_governance typed surface) JS source .changeset/create-tenant-store.md (6.7) — the headline 6.7 helper. Problem solved Resolves the class of bug "ado... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | bokelley |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4ef498cbabcbe3c50befc7a5b743e7072ee770b4daf0e15e54801180d1fa91fc |
| turbo-cache-control | no-preview |
| go-import | github.com/adcontextprotocol/adcp-client-python git https://github.com/adcontextprotocol/adcp-client-python.git |
| octolytics-dimension-user_id | 221690821 |
| octolytics-dimension-user_login | adcontextprotocol |
| octolytics-dimension-repository_id | 1090305973 |
| octolytics-dimension-repository_nwo | adcontextprotocol/adcp-client-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1090305973 |
| octolytics-dimension-repository_network_root_nwo | adcontextprotocol/adcp-client-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9983dd5da06943f833c971dd5b6bc988e2858be5 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width