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).
All four values are required — the credential raises before contacting the broker
when any value is missing or invalid.
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())
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vibedata_studio_azure_cred_broker-0.1.2.tar.gz.
File metadata
- Download URL: vibedata_studio_azure_cred_broker-0.1.2.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.11.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f7962d6e1bfcbd23ef925a68cbc5952d160b5b7706f502e54a8bf2d8688429a6
|
|
| MD5 |
e3501cf41e54e19f9f27712a42d211dd
|
|
| BLAKE2b-256 |
112152ca98708640954acaf621e4fa0ad4e680321df9d707a3e52718f68d1ea4
|
File details
Details for the file vibedata_studio_azure_cred_broker-0.1.2-py3-none-any.whl.
File metadata
- Download URL: vibedata_studio_azure_cred_broker-0.1.2-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.11.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c538bacbd1cb65c2325b65aaa8f44766b2c2d0f1e826ec27768b22995ec870c4
|
|
| MD5 |
b6f65891afd5f2bd1a14cb417d91100e
|
|
| BLAKE2b-256 |
3668631b7c9f15bc1103211079194e73b4202ad83a6bd57fab802bd5b3a07697
|