vibedata-studio-azure-cred-broker
An Azure TokenCredential
that mints downstream Azure / Microsoft Fabric tokens through the VibeData Studio
credential broker.
Inside a Studio agent container the backend writes an intent-scoped bearer
(vd_iat_*) to a tmpfs file. StudioAzureCredBroker reads that bearer and
exchanges it at the broker's POST /token endpoint for a short-lived,
audience-bound Azure access token (Fabric SQL, OneLake storage, Key Vault,
Fabric API, ARM). The downstream credential is only ever minted by Studio.
Works with anything that speaks the azure-core TokenCredential protocol:
- dbt-fabricspark (
authentication: token_credential) - dlt destinations (OneLake / ADLS)
- Key Vault
SecretClient
How it resolves the broker
Broker context comes from the environment and is overridable via constructor kwargs:
| Env var | Kwarg | Meaning |
|---|---|---|
VD_CREDENTIAL_BROKER_URL |
broker_url |
Broker base URL (e.g. http://host.docker.internal:<port>/api/v1/credential-broker) |
VD_CREDENTIAL_FILE |
credential_file |
tmpfs path holding the vd_iat_* bearer (/run/vd/credential) |
VD_CREDENTIAL_LANE |
lane |
Credential lane: user or service |
VD_CREDENTIAL_CONFIGURATION_REVISION |
configuration_revision |
Non-negative Domain configuration revision pinned into the intent bearer |
The bearer is re-read on every get_token call (the backend rotates it).
The broker URL and credential file are always required and are checked when the credential is constructed. The lane and configuration revision are checked when a token is requested. Every persisted Data Platform or Secret Store mint sends its explicit scope, lane, and pinned revision; a missing or invalid value raises before the broker is contacted.
Credential source: Studio or a CI runner
studio_azure_credential(**broker_kwargs) returns the credential a Studio
execution unit signs in with. Inside Studio it is StudioAzureCredBroker
(broker_kwargs pass through), exactly as before.
A CI runner (domain-cicd's dlt-gate) has no broker. It opts in explicitly with
VD_DLT_CREDENTIAL_SOURCE=ci-azure, and then the credential is
ChainedTokenCredential(EnvironmentCredential(), AzureCliCredential()): a
service principal in AZURE_CLIENT_ID/AZURE_CLIENT_SECRET/AZURE_TENANT_ID, or
the az login that azure/login leaves. DefaultAzureCredential is never used.
VD_DLT_CREDENTIAL_SOURCE |
Studio config present | Result |
|---|---|---|
| unset | yes | StudioAzureCredBroker |
| unset | no / partial | today's broker error — no fallback |
ci-azure |
no | runner identity |
ci-azure |
any (broker URL, credential file, or runtime-access helper) | CredentialSourceError |
| anything else | — | CredentialSourceError |
The switch is per cloud (ci-aws, ci-gcp would be added beside it); there is
no generic ci value. The Agent Container never sets it.
Scope → audience map
get_token(scope) maps the requested Azure scope to a broker audience:
| Azure scope | Audience |
|---|---|
https://database.windows.net/.default |
sql |
https://storage.azure.com/.default |
storage |
https://vault.azure.net/.default |
vault |
https://api.fabric.microsoft.com/.default |
fabric_api |
https://analysis.windows.net/powerbi/api/.default |
fabric_cli |
https://management.azure.com/.default |
arm |
An unmapped scope raises ScopeNotAllowedError. Override or extend via the
audience_map kwarg. The dlt Key Vault provider overrides the vault resource with
the Secret Store capability key_vault_data_plane; the default vault mapping is
the Data Platform capability and is not a compatibility alias.
dbt usage (profiles.yml)
my_project:
outputs:
ephemeral_dev:
type: fabricspark
method: livy
authentication: token_credential
credential_class: "vibedata_studio_azure_cred_broker.StudioAzureCredBroker"
# No credential_kwargs needed — Studio injects the broker context.
endpoint: https://api.fabric.microsoft.com/v1
workspaceid: "{{ env_var('EPHEMERAL_WORKSPACE_ID') }}"
lakehouseid: "{{ env_var('EPHEMERAL_LAKEHOUSE_ID') }}"
lakehouse: "{{ env_var('EPHEMERAL_LAKEHOUSE_NAME') }}"
schema: "{{ env_var('EPHEMERAL_SCHEMA') }}"
target: ephemeral_dev
dlt / Key Vault usage
from azure.keyvault.secrets import SecretClient
from vibedata_studio_azure_cred_broker import StudioAzureCredBroker
client = SecretClient(
vault_url=vault_url,
credential=StudioAzureCredBroker(
audience_map={"https://vault.azure.net": "key_vault_data_plane"}
),
)
Metadata
Release files for vibedata-studio-azure-cred-broker 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| vibedata_studio_azure_cred_broker-0.4.0.tar.gz | 13.0 kB | With provenance | Details for vibedata_studio_azure_cred_broker-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| vibedata_studio_azure_cred_broker-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for vibedata_studio_azure_cred_broker-0.4.0-py3-none-any.whl |
Total release size: 22.8 kB
Release files / vibedata_studio_azure_cred_broker-0.4.0.tar.gz
| Download URL | vibedata_studio_azure_cred_broker-0.4.0.tar.gz |
|---|---|
| Size | 13.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4b741c0df92761ab8594ebe3dd86c009f730b136f0edb3dd960c810bec7cd287
|
|
BLAKE2b-256 checksum How to use checksums |
e6f7b088d7f5ba7aedded518198ab48cc33629b5e78bc1038a42a9768ace2d6e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.
Transparency logRelease files / vibedata_studio_azure_cred_broker-0.4.0-py3-none-any.whl
| Download URL | vibedata_studio_azure_cred_broker-0.4.0-py3-none-any.whl |
|---|---|
| Size | 9.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1ff81c29abbe1d84149124687eb9fea694d46c322e4e27d24caece629d7b8082
|
|
BLAKE2b-256 checksum How to use checksums |
5c74db4e4bd52541399617f3a67c4de87408a7229782b891fccb9cf00b8afa3e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.
Transparency logSecurity for vibedata-studio-azure-cred-broker 0.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for vibedata_studio_azure_cred_broker-0.4.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.