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. Data Platform audiences only |
VD_CREDENTIAL_CONFIGURATION_REVISION |
configuration_revision |
Non-negative Domain configuration revision pinned into the intent bearer. Data Platform audiences only |
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, and only for a Data Platform audience — the broker resolves a
Secret Store audience (azure_key_vault, aws_secrets_manager) to a different
scope and never reads either value, so those mints are not gated on them. A missing
or invalid value raises before the broker is contacted.
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.
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())
Metadata
Release files for vibedata-studio-azure-cred-broker 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| vibedata_studio_azure_cred_broker-0.1.3.tar.gz | 5.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| vibedata_studio_azure_cred_broker-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.5 kB
Release files / vibedata_studio_azure_cred_broker-0.1.3.tar.gz
| Download URL | vibedata_studio_azure_cred_broker-0.1.3.tar.gz |
|---|---|
| Size | 5.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2547b2ab2e569e2bd233a1be27bc8c0edb3b83a856032b1a4f840db99eaf51cd
|
|
BLAKE2b-256 checksum How to use checksums |
c46130ddccb27ae37dd61a19ef0edcb810a0ee1ce4b89a1dd9be63faa3c321b3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.16
|
Release files / vibedata_studio_azure_cred_broker-0.1.3-py3-none-any.whl
| Download URL | vibedata_studio_azure_cred_broker-0.1.3-py3-none-any.whl |
|---|---|
| Size | 5.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1cd6317e84f1b2aa7049e71cf4c6edbf871d4adeaa637d7532faa4687c6a5f2b
|
|
BLAKE2b-256 checksum How to use checksums |
6e1a4581e21baf89c5462617b276b7ad4eb6d23a6ae57a8b8500b8baee0b224c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.16
|