Skip to content

Commit 210e31a

Browse files
docs: remove example code snippets from user guides for multi-tenancy
1 parent c402f34 commit 210e31a

5 files changed

Lines changed: 1 addition & 65 deletions

File tree

‎src/sap_cloud_sdk/agent_memory/user-guide.md‎

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -179,22 +179,6 @@ across create, read, and search calls is the implementer's responsibility.
179179

180180
> [!WARNING]
181181
> `PROVIDER` strategy provides **no tenant isolation**, the provider token grants access to data in the provider subaccount. Only use this strategy for provider-owned operations (e.g., admin tasks, shared datasets). Never use it to serve subscriber-specific data.
182-
183-
```python
184-
from sap_cloud_sdk.agent_memory import create_client, AccessStrategy
185-
186-
# Subscriber context — all calls use the tenant set here
187-
client = create_client(
188-
access_strategy=AccessStrategy.SUBSCRIBER,
189-
tenant="acme-corp",
190-
)
191-
memories = client.list_memories(agent_id="some-assistant", invoker_id="user-42")
192-
193-
# Provider context — no tenant isolation
194-
client = create_client(access_strategy=AccessStrategy.PROVIDER)
195-
memories = client.list_memories(agent_id="some-assistant", invoker_id="user-42")
196-
```
197-
198182
- **Further reading:** N/A
199183

200184

‎src/sap_cloud_sdk/agentgateway/user-guide.md‎

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -162,16 +162,7 @@ The SDK discovers resources via BTP Destination Service fragments filtered by th
162162
- **Authentication:** IAS (IAS via Destination Service for LoB flow; mTLS for Customer flow)
163163
- **How to use:**
164164
- **LoB flow:** Pass `tenant_subdomain` to `create_client()`. All subsequent calls on that client instance use the subscriber tenant context.
165-
166-
```python
167-
from sap_cloud_sdk.agentgateway import create_client
168-
169-
client = create_client(tenant_subdomain="my-subscriber")
170-
agent_cards = client.list_agent_cards()
171-
```
172-
173165
- **Customer flow:** N/A
174-
175166
- **Further reading:** N/A
176167

177168
## API

‎src/sap_cloud_sdk/core/auditlog/user-guide.md‎

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -332,17 +332,7 @@ client.log(security_event)
332332

333333
- **Supported:** N/A at auth level
334334
- **Authentication:** XSUAA
335-
- **How to use:** Tenant identity is expressed as an event-level field inside each logged event, not at the authentication layer. The provider always authenticates with its own XSUAA token. Pass `Tenant.SUBSCRIBER` or `Tenant.PROVIDER` when constructing events:
336-
337-
```python
338-
from sap_cloud_sdk.core.auditlog import Tenant
339-
340-
event = client.data_modification_event(tenant=Tenant.SUBSCRIBER)
341-
```
342-
343-
> [!NOTE]
344-
> This module (auditlog v2) is deprecated. Use `core/auditlog_ng` for new integrations.
345-
335+
- **How to use:** Tenant identity is expressed as an event-level field inside each logged event, not at the authentication layer. The provider always authenticates with its own XSUAA token. Pass `Tenant.SUBSCRIBER` or `Tenant.PROVIDER` when constructing events.
346336
- **Further reading:**
347337
- [SAP Audit Log Service — SAP Help Portal](https://help.sap.com/docs/btp/sap-business-technology-platform/audit-log-service)
348338

‎src/sap_cloud_sdk/destination/user-guide.md‎

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -689,26 +689,6 @@ Entries with a `"tenant"` field are treated as subscriber-specific. Entries with
689689
- **Supported:** Yes
690690
- **Authentication:** XSUAA
691691
- **How to use:** Pass `access_strategy` and `tenant` to the methods. The `AccessStrategy` enum controls whether the SDK fetches a subscriber-scoped or provider-scoped token by replacing the `identityzone` subdomain in the token URL.
692-
693-
```python
694-
from sap_cloud_sdk.destination import create_client, AccessStrategy
695-
696-
client = create_client()
697-
698-
# Subscriber-first (tries subscriber, falls back to provider)
699-
destinations = client.list_subaccount_destinations(
700-
access_strategy=AccessStrategy.SUBSCRIBER_FIRST,
701-
tenant="my-subscriber",
702-
)
703-
704-
# Provider only
705-
destinations = client.list_subaccount_destinations(
706-
access_strategy=AccessStrategy.PROVIDER_ONLY,
707-
)
708-
```
709-
710-
Available strategies: `SUBSCRIBER_ONLY`, `PROVIDER_ONLY`, `SUBSCRIBER_FIRST`, `PROVIDER_FIRST`.
711-
712692
- **Further reading:**
713693
- [Multitenancy in the Destination Service — SAP Help Portal](https://help.sap.com/docs/CP_CONNECTIVITY/cca91383641e40ffbe03bdc78f00f681/4e07f250fe5d441cab09f69e22909198.html)
714694

‎src/sap_cloud_sdk/dms/user-guide.md‎

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -472,15 +472,6 @@ while True:
472472
- **Supported:** Yes
473473
- **Authentication:** XSUAA
474474
- **How to use:** Pass an optional `tenant` parameter to any operation. The SDK resolves a subscriber-scoped XSUAA token by replacing the provider's `identityzone` subdomain in the token URL. Omitting `tenant` uses the provider token (default).
475-
476-
```python
477-
# Provider context (default)
478-
repos = client.get_all_repositories()
479-
480-
# Subscriber context
481-
repos = client.get_all_repositories(tenant="subscriber-subdomain")
482-
```
483-
484475
- **Further reading:**
485476
- [Multitenancy with SAP Document Management Service — SAP Help Portal](https://help.sap.com/docs/DOCUMENT_MANAGEMENT/f6e70dd4bffa4b65965b43feed4c9429/0f6dd1bbaca342ee9177b9ece3fcaaa3.html)
486477

0 commit comments

Comments
 (0)