<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Databricks Knowledge Transfer]]></title><description><![CDATA[Databricks Knowledge Transfer]]></description><link>https://muqtadirmalik.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Mon, 26 Oct 2026 14:44:29 GMT</lastBuildDate><atom:link href="https://muqtadirmalik.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Databricks now deletes unused OAuth secrets after 90 days]]></title><description><![CDATA[Since September 2026, Azure Databricks deletes a service principal's OAuth secret after 90 days without use. Daily jobs won't notice.]]></description><link>https://muqtadirmalik.hashnode.dev/databricks-now-deletes-unused-oauth-secrets-after-90-days</link><guid isPermaLink="true">https://muqtadirmalik.hashnode.dev/databricks-now-deletes-unused-oauth-secrets-after-90-days</guid><category><![CDATA[Databricks]]></category><category><![CDATA[Azure]]></category><category><![CDATA[Security]]></category><category><![CDATA[Devops]]></category><category><![CDATA[Cloud Computing]]></category><dc:creator><![CDATA[MUQTADIRMALIK QUAZI]]></dc:creator><pubDate>Sun, 25 Oct 2026 18:18:19 GMT</pubDate><content:encoded><![CDATA[<p>Picture this. It's quarter-end. The finance team's reporting job, untouched since the last quarter-end, kicks off at 2 AM and fails with an authentication error. Nobody changed the code. Nobody changed permissions. The network is fine.</p>
<p>The cause: the job's credential was quietly deleted weeks ago, because it hadn't been used in 90 days.</p>
<p>Since <strong>16 September 2026</strong>, that's how Azure Databricks works. It's a good security change, but it breaks exactly the jobs you think about least.</p>
<h2>Service principals and secrets, in plain language</h2>
<p>A <strong>service principal</strong> is a robot account. People log in as themselves, but a scheduled job, a Terraform pipeline or a GitHub Actions workflow needs its own identity. That's the service principal.</p>
<p>An <strong>OAuth secret</strong> is the robot's password. The robot shows its ID and secret to Databricks and gets back an access token valid for one hour. When the token expires, it asks for a new one.</p>
<p>Think of a contractor's office badge. The badge gets them through the gate, where they collect a day pass to work inside. The badge is the secret; the day pass is the token.</p>
<h2>What changed</h2>
<p>Azure Databricks now <strong>automatically deletes a service principal's OAuth secret after 90 days without use</strong>. It already did the same for unused personal access tokens; OAuth secrets now follow the same rule.</p>
<p>In badge terms: if a contractor's badge isn't swiped for 90 days, security deactivates it.</p>
<p>Two details that trip people up:</p>
<ul>
<li><strong>This is separate from the secret's expiry date.</strong> You set a lifetime of up to 2 years when you create a secret. Even a 2-year secret is deleted if it sits unused for 90 days.</li>
<li><strong>The failure doesn't explain itself.</strong> Nothing breaks on the day the secret is deleted. The job fails weeks later, on its next run, with an authentication error — so teams often check permissions and networking before thinking of a missing secret.</li>
</ul>
<h2>Who gets hit</h2>
<p>Daily and weekly jobs use their secret constantly, so they never reach 90 days. The risk is the automation that runs <strong>rarely</strong>:</p>
<ul>
<li><strong>Quarterly or yearly jobs</strong>, like quarter-end finance reports. Ninety-one days between runs is enough to lose the secret.</li>
<li><strong>Disaster recovery pipelines.</strong> Built, tested once, then left alone until an emergency — the worst moment to find a dead credential.</li>
<li><strong>Terraform pipelines for stable infrastructure.</strong> If nobody changes that workspace for three months, its pipeline's secret disappears.</li>
<li><strong>Old test or migration setups</strong> that someone revives later.</li>
</ul>
<h3><strong>A quarterly job loses its secret before its next run</strong></h3>
<p>Illustrative: a job that runs every quarter-end, roughly every 91 days</p>
<img src="https://cdn.hashnode.com/uploads/covers/6adadb730f036ba695b0c57d/81ea72b5-8144-44d1-ab57-f4c79f1e2493.png" alt="" style="display:block;margin:0 auto" />

<h2>How to protect yourself</h2>
<h3>1. Find the rare-use automation</h3>
<p>List every service principal behind quarterly, yearly, disaster recovery or rarely changed Terraform jobs. Anything that authenticates <strong>less often than every 90 days</strong> is on your risk list.</p>
<h3>2. Go secretless where you can (best fix)</h3>
<p>A secret that doesn't exist can't be deleted.</p>
<ul>
<li><strong>GitHub Actions:</strong> use <strong>workload identity federation</strong>. GitHub proves the workflow's identity directly to Databricks through a federation policy. There's no secret to store in GitHub, rotate or lose.</li>
<li><strong>Azure-hosted automation:</strong> use <strong>Microsoft Entra service principals or managed identities</strong>, so Azure handles the credential.</li>
</ul>
<h3>3. If you must keep secrets</h3>
<ul>
<li>Store them in <strong>Azure Key Vault</strong>, never in code or a pipeline variable.</li>
<li>Give each one an <strong>owner</strong> and a documented rotation date.</li>
<li>Add a <strong>"can we log in?" check</strong> to your DR drills and quarterly runbooks, a week before the real run.</li>
<li>Remember a service principal can hold <strong>up to five secrets</strong>, and each is shown <strong>only once</strong> when created.</li>
</ul>
<h3>4. Know the recovery</h3>
<p>If it does happen, the fix is simple: generate a new secret for the service principal and update it wherever it's stored. The hard part is recognising the cause — so when a rarely run job suddenly fails to authenticate, <strong>check the secret first</strong>.</p>
<h2>The bottom line</h2>
<p>Deleting forgotten credentials is the right call for security. But it shifts the risk onto the jobs you think about least. Treat it as a nudge: find your rare-use automation now, and move it to secretless authentication before the next quarter-end does it for you.</p>
<p><em>Do you know which of your pipelines run less than once every 90 days? Tell me in the comments.</em></p>
<p>=========================================================</p>
<p><em>Muqtadirmalik Quazi (Malik) is a Platform Engineer who administers Azure Databricks at enterprise scale. He writes about Azure Databricks administration, AI governance and platform engineering for data and AI. Connect with Muqtadirmalik Quazi on LinkedIn, or follow @m.malikquazi on Medium and X.</em></p>
<p>=========================================================</p>
<p><strong>References</strong></p>
<ul>
<li><a href="https://learn.microsoft.com/en-us/azure/databricks/release-notes/product/2026/september">Azure Databricks September 2026 release notes (Microsoft Learn)</a></li>
<li><a href="https://learn.microsoft.com/en-us/azure/databricks/dev-tools/auth/oauth-m2m">Authorize service principal access with OAuth M2M (Microsoft Learn)</a></li>
<li><a href="https://learn.microsoft.com/azure/databricks/dev-tools/auth/oauth-federation-policy">Configure a federation policy (Microsoft Learn)</a></li>
</ul>
]]></content:encoded></item><item><title><![CDATA[Unity Gateway: how Azure Databricks Admins control AI access and spend]]></title><description><![CDATA[How Azure Databricks admins control AI model access and spend with Unity Gateway: permissions, rate limits, budgets and inference tables.]]></description><link>https://muqtadirmalik.hashnode.dev/unity-gateway-how-azure-databricks-admins-control-ai-access-and-spend</link><guid isPermaLink="true">https://muqtadirmalik.hashnode.dev/unity-gateway-how-azure-databricks-admins-control-ai-access-and-spend</guid><category><![CDATA[Databricks]]></category><category><![CDATA[Azure]]></category><category><![CDATA[AI]]></category><category><![CDATA[Governance]]></category><category><![CDATA[Cloud Computing]]></category><category><![CDATA[generative ai]]></category><category><![CDATA[Platform Engineering ]]></category><dc:creator><![CDATA[MUQTADIRMALIK QUAZI]]></dc:creator><pubDate>Fri, 23 Oct 2026 04:13:02 GMT</pubDate><content:encoded><![CDATA[<p>On 15 October 2026, a quiet change landed in Azure Databricks. Users with the <strong>consumer access</strong> entitlement can now query the AI models shared with them, without an account admin first enabling a preview.</p>
<p>Databricks’ own release note carries the <strong>warning</strong> admins should read twice: this can increase model traffic, including to <strong>external providers</strong> like OpenAI or Anthropic. External traffic means a second invoice you don’t see inside Databricks.</p>
<p>Think of it like a company handing fuel cards to every employee. That’s great for productivity, but only if the card system has per-person limits, a monthly budget and receipts. In Azure Databricks, that card system is <strong>Unity Gateway</strong>.</p>
<h2><strong>What Unity Gateway is</strong></h2>
<p>Unity Gateway is Databricks’ control plane for AI traffic, built on Unity Catalog. Every call from a user, a job or an AI agent to a model or tool goes through it. It governs three kinds of objects:</p>
<ul>
<li><strong>Model services</strong> — Databricks-hosted foundation models in <a href="http://system.ai"><code>system.ai</code></a>, such as GPT, Claude and Gemini, billed pay-per-token.</li>
<li><strong>Model provider services</strong> — your own OpenAI or Anthropic accounts, connected with your own keys (BYOK).</li>
<li><strong>MCP services</strong> — the tools AI agents call.</li>
</ul>
<p>The admin-friendly part: you grant access to these with the same Unity Catalog privileges you already use for tables.</p>
<p>How AI traffic flows through Unity Gateway in Azure Databricks:</p>
<img src="https://cdn.hashnode.com/uploads/covers/6adadb730f036ba695b0c57d/df589be6-ca1e-44ec-95a1-acdce5af1d4c.png" alt="" style="display:block;margin:0 auto" />

<h2>The four controls every admin should know</h2>
<ol>
<li><strong>Permissions:</strong> who can use which model Grant or revoke access to model services, provider services and MCP services like any Unity Catalog object. You can also restrict which Databricks-hosted foundation models the whole organisation, or a single group, can use. Start here: not every team needs the most expensive model.</li>
<li><strong>Rate limits:</strong> how fast Rate limits cap traffic in requests per minute (QPM) and, for model services, tokens per minute (TPM). You set them at three levels:</li>
</ol>
<blockquote>
<p>Service — a ceiling for all traffic. Hit it and everyone is blocked.</p>
<p>User (default) — the limit every user gets.</p>
<p>Custom — overrides for specific users, service principals or groups.</p>
</blockquote>
<p>Things worth knowing: there are no limits by default. Blocked callers get an HTTP 429, so apps need retry with backoff. Short bursts above the limit can slip through. And you get a maximum of 20 limits per service, only 5 of them group-based.</p>
<ol start="3">
<li><strong>Budgets how much:</strong> Budgets scoped to Unity Gateway track monthly spend in near real time. You can set a shared threshold for everyone, a per-user threshold, and overrides for power users. At each threshold you choose to send an alert or block usage until the budget resets.</li>
</ol>
<p>Two caveats: blocking is approximate, so spend can run slightly over before it kicks in. And budgets don’t cover provisioned throughput or traffic that bypasses the gateway. External provider spend can be included, but that option is still in Beta.</p>
<p><strong>4. Visibility: what actually happened</strong></p>
<ul>
<li><strong>Usage system tables</strong> show who called which model, tokens used and latency. Use them for cost attribution and chargeback.</li>
<li><strong>Inference tables</strong> log the <strong>full request and response</strong> of a model service into a Unity Catalog Delta table. Great for debugging and audit but they’re a billed feature, rows can take up to an hour to arrive, and payloads above 10 MiB aren’t logged.</li>
</ul>
<h2><strong>Week-one admin checklist</strong></h2>
<ul>
<li>List who has the <strong>consumer access</strong> entitlement today.</li>
<li>Restrict expensive models to the groups that need them.</li>
<li>Set a <strong>default per-user rate limit</strong> on each model service, plus a service-wide ceiling.</li>
<li>Create a <strong>Unity Gateway budget</strong> with an alert at 80% and a block at 100%.</li>
<li>Decide whether external provider spend belongs in the budget.</li>
<li>Build a weekly chargeback view from the usage tables.</li>
<li>Turn on inference tables only where you truly need full payloads.</li>
</ul>
<h2><strong>My honest concerns as an operator</strong></h2>
<ul>
<li><strong>Inference tables store raw prompts.</strong> If users paste customer data into a chat, it now lives in a Delta table. Lock down that schema like any table holding sensitive data.</li>
<li><strong>Budgets are not a hard financial cap.</strong> Databricks itself says not to treat them as an absolute spend limit. Your external provider invoice remains the real number.</li>
<li><strong>429s look like outages to users.</strong> A tight rate limit without retry logic in apps becomes a support ticket. Tell teams before you enforce limits.</li>
<li><strong>Default is wide open.</strong> No rate limits are set out of the box. If you do nothing, your first control is the monthly bill.</li>
</ul>
<h2><strong>The bottom line</strong></h2>
<p>AI in the data platform is no longer a data science side project; it’s a shared utility, like compute. And like compute, it needs a platform admin to decide who gets it, how much and at what cost. Unity Gateway gives you those levers — but none of them are switched on by default.</p>
<p><em>Have you set rate limits or budgets on your AI models yet, or are you waiting for the first surprise bill? Tell me in the comments.</em></p>
<p><em>Muqtadir Malik Quazi is a Platform Engineer who administers Azure Databricks at enterprise scale. He writes about Azure Databricks administration, AI governance and platform engineering for data and AI. Connect with Muqtadir Malik Quazi on LinkedIn:</em> <a href="https://www.linkedin.com/in/muqtadirmalik"><u>https://www.linkedin.com/in/muqtadirmalik</u></a><em>, or follow</em> <a href="https://medium.com/@m.malikquazi"><em><u>@m.malikquazi</u></em></a> <em>on Medium and X.</em></p>
<p><strong>References</strong></p>
<ul>
<li><a href="https://learn.microsoft.com/en-us/azure/databricks/ai-gateway/"><u>AI governance with Unity Gateway (Microsoft Learn)</u></a></li>
<li><a href="https://learn.microsoft.com/en-us/azure/databricks/ai-gateway/rate-limits"><u>Apply rate limits to model and MCP services (Microsoft Learn)</u></a></li>
<li><a href="https://learn.microsoft.com/en-us/azure/databricks/ai-gateway/budgets"><u>Manage budgets for Unity Gateway (Microsoft Learn)</u></a></li>
<li><a href="https://learn.microsoft.com/en-us/azure/databricks/ai-gateway/inference-tables"><u>Log requests and responses to inference tables (Microsoft Learn)</u></a></li>
<li><a href="https://learn.microsoft.com/en-us/azure/databricks/release-notes/product/2026/october"><u>Azure Databricks October 2026 release notes (Microsoft Learn)</u></a></li>
</ul>
]]></content:encoded></item></channel></rss>