Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
0258847
feat(cbc): add CBC (Central Business Configuration) client module
soumyadey Sep 13, 2026
9fd1898
feat(cbc): support PEM cert values via env vars and cert_path/key_pat…
soumyadey Sep 14, 2026
5cd7765
fix(cbc): address CI failures — ruff format, ty errors, telemetry cou…
soumyadey Sep 14, 2026
67590da
fix(cbc): clean up DefaultClient docstring and gitignore
soumyadey Sep 16, 2026
59969a6
refactor(cbc): remove local-mode auto-detection
soumyadey Sep 18, 2026
841a550
fix(cbc): bump telemetry module count to 17 after upstream addition
soumyadey Sep 18, 2026
26b80a9
feat(cbc): move tenant_context to client level
soumyadey Sep 18, 2026
5fe5d9a
refactor(cbc): two-layer client contract — thin core + platform adapter
soumyadey Oct 3, 2026
21dd267
perf(cbc): resolve base_url once per get_configuration call
soumyadey Oct 3, 2026
6bff82f
fix(cbc): wrap destination errors as CBCConfigError in adapter
soumyadey Oct 3, 2026
e33070f
feat(cbc): reload rotated mTLS certificate on TLS handshake failure
soumyadey Oct 4, 2026
541f615
test(cbc): fix ty type errors in rotation and adapter tests
soumyadey Oct 4, 2026
da4b9c3
feat(cbc): add CBCDestinationConfig for the platform adapter
soumyadey Oct 4, 2026
3ea7b3c
refactor(cbc): rename EntityContent/EntityData → EntityData/ConfigEntity
soumyadey Oct 6, 2026
d68fbc5
fix(cbc): align with confirmed API contract for entity data response
soumyadey Oct 6, 2026
efff5b8
chore(cbc): fix ty annotation after ConfigEntity rename; bump version…
soumyadey Oct 6, 2026
eb24156
feat(cbc): add get_entity_data for targeted single-entity fetch
soumyadey Oct 7, 2026
19c959c
test(cbc): fix GUIDELINES violations found in code review
soumyadey Oct 7, 2026
0542e12
feat(cbc): adapt resolve_base_url to direct fragment lookup after PR #82
soumyadey Oct 7, 2026
1bacd8b
refactor(cbc): collapse to single create_client mirroring agentgateway
soumyadey Oct 14, 2026
08ce6b9
test(cbc): drive integration tests through the default provisioning path
soumyadey Oct 14, 2026
fa0e013
refactor(cbc): rename config→configuration in public API; drop unused…
soumyadey Oct 14, 2026
118e6a4
fix(cbc): sort Module.CBC into alphabetical position in telemetry enum
soumyadey Oct 15, 2026
004d264
docs(cbc): add Multi-tenancy section to the user guide
soumyadey Oct 15, 2026
22e0dc6
test(cbc): document CBC integration env vars in .env_integration_test…
soumyadey Oct 15, 2026
9ce7eec
style(cbc): apply ruff format to test_models.py
soumyadey Oct 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .env_integration_tests.example
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,16 @@ AICORE_FILTER_TEST_SELF_HARM_PROMPT=
CLOUD_SDK_CFG_AUDITLOG_DEFAULT_URL=https://your-auditlog-api-url-here
CLOUD_SDK_CFG_AUDITLOG_DEFAULT_UAA='{"url":"https://your-auth-url","clientid":"your-client-id","clientsecret":"your-client-secret"}'

# CBC (Central Business Configuration)
# Resolves the CBC URL from the tenant-mapping Destination Fragment and the mTLS
# certificate from the Destination Service, so it also needs the DESTINATION
# binding vars below. The three CLOUD_SDK_CFG_CBC_DEFAULT_* values seed the SDK
# runtime context (app tenant id, subscriber subdomain) and derive the
# certificate name from the landscape.
CLOUD_SDK_CFG_CBC_DEFAULT_APP_TENANT_ID=your-app-tenant-id-here
CLOUD_SDK_CFG_CBC_DEFAULT_TENANT_SUBDOMAIN=your-subscriber-tenant-subdomain-here
CLOUD_SDK_CFG_CBC_DEFAULT_LANDSCAPE=your-landscape-here

# DATA ANONYMIZATION
CLOUD_SDK_CFG_DATA_ANONYMIZATION_DEFAULT_URL=https://your-data-anonymization-api-url-here
CLOUD_SDK_CFG_DATA_ANONYMIZATION_DEFAULT_CERT=your-base64-encoded-client-certificate-pem
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ env.bak/
venv.bak/
piperBuild-env/

# Local scratch
tmp/

# IDEs
.vscode/
.idea/
Expand Down
85 changes: 85 additions & 0 deletions src/sap_cloud_sdk/cbc/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
"""SAP Cloud SDK for Python — CBC (Central Business Configuration) module.

Provides a typed Python client for reading tenant-specific business configuration
from SAP Central Business Configuration (CBC).

CBC is an SAP service that manages tenant-specific business configuration for
SAP cloud applications and AI agents.

Quick start::

from sap_cloud_sdk import cbc

# Infers everything from provisioning: the app tenant id and subdomain come
# from the SDK runtime context (wire bootstrap(app) once at startup), the CBC
# URL from the tenant-mapping Destination Fragment, and the mTLS certificate
# from the Destination Service.
cbc_client = cbc.create_client()
config = cbc_client.get_configuration()

# Access entity data
payment = config.get_configuration_object("payment-config")
if payment:
for row in payment.get_entity_data("payment-mode").as_list():
print(row)

To override any individual piece (e.g. for local development or tests), pass a
:class:`~sap_cloud_sdk.cbc.config.CBCConfig` — see the CBC user guide.
"""

from __future__ import annotations

from sap_cloud_sdk.cbc.client import (
CBCClient,
create_client,
)
from sap_cloud_sdk.cbc.config import (
CBCConfig,
)
from sap_cloud_sdk.cbc.exceptions import (
CBCError,
CBCClientError,
CBCConfigError,
CBCHttpError,
CBCNetworkError,
CBCServerError,
HttpContext,
)
from sap_cloud_sdk.cbc._models import (
ApiError,
ConfigurationData,
ConfigurationEntity,
ConfigurationObject,
ConsumptionVersion,
ConsumptionVersions,
EntityData,
)


__all__ = [
# factory
"create_client",
# client
"CBCClient",
# configuration
"CBCConfig",
# exceptions
"CBCError",
"CBCClientError",
"CBCConfigError",
"CBCHttpError",
"CBCNetworkError",
"CBCServerError",
"HttpContext",
# models — consumption versions
"ConsumptionVersion",
"ConsumptionVersions",
# models — entities
"EntityData",
"ConfigurationEntity",
"ConfigurationObject",
# models — configuration
"ConfigurationData",
# models — api error
"ApiError",
]
Loading
Loading