<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Accessing secret scope keys from Unity Catalog SQL UDFs without granting users READ permission in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/accessing-secret-scope-keys-from-unity-catalog-sql-udfs-without/m-p/177582#M57331</link>
    <description>&lt;P&gt;&lt;SPAN&gt;We are implementing a dynamic data masking solution on Azure Databricks using Unity Catalog ABAC policies and SQL UDFs for deterministic masking.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Our masking functions retrieve a secret key from a Databricks-backed secret scope using the &lt;/SPAN&gt;&lt;SPAN&gt;secret()&lt;/SPAN&gt;&lt;SPAN&gt; function.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The issue is that when users query a masked table, they appear to require READ permission on the secret scope, even though they are not the owners of the masking UDF.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Granting users READ permission defeats our security objective, as users who should only see masked data would also be able to retrieve the masking key.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;My questions are:&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;&lt;SPAN&gt;Is this the expected behavior of &lt;/SPAN&gt;&lt;SPAN&gt;secret()&lt;/SPAN&gt;&lt;SPAN&gt; within Unity Catalog SQL UDFs?&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;SPAN&gt;Is there a supported way for a masking UDF to access a secret without granting the querying user direct access to it?&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;SPAN&gt;Would Unity Catalog Secrets or Unity Catalog External Secrets address this limitation?&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN&gt;Has anyone encountered a similar issue or found a recommended solution?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Any guidance would be greatly appreciated. Thanks!&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 25 Nov 2026 14:28:08 GMT</pubDate>
    <dc:creator>pxs132</dc:creator>
    <dc:date>2026-11-25T14:28:08Z</dc:date>
    <item>
      <title>Accessing secret scope keys from Unity Catalog SQL UDFs without granting users READ permission</title>
      <link>https://community.databricks.com/t5/data-engineering/accessing-secret-scope-keys-from-unity-catalog-sql-udfs-without/m-p/177582#M57331</link>
      <description>&lt;P&gt;&lt;SPAN&gt;We are implementing a dynamic data masking solution on Azure Databricks using Unity Catalog ABAC policies and SQL UDFs for deterministic masking.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Our masking functions retrieve a secret key from a Databricks-backed secret scope using the &lt;/SPAN&gt;&lt;SPAN&gt;secret()&lt;/SPAN&gt;&lt;SPAN&gt; function.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The issue is that when users query a masked table, they appear to require READ permission on the secret scope, even though they are not the owners of the masking UDF.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Granting users READ permission defeats our security objective, as users who should only see masked data would also be able to retrieve the masking key.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;My questions are:&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;&lt;SPAN&gt;Is this the expected behavior of &lt;/SPAN&gt;&lt;SPAN&gt;secret()&lt;/SPAN&gt;&lt;SPAN&gt; within Unity Catalog SQL UDFs?&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;SPAN&gt;Is there a supported way for a masking UDF to access a secret without granting the querying user direct access to it?&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;SPAN&gt;Would Unity Catalog Secrets or Unity Catalog External Secrets address this limitation?&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN&gt;Has anyone encountered a similar issue or found a recommended solution?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Any guidance would be greatly appreciated. Thanks!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2026 14:28:08 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/accessing-secret-scope-keys-from-unity-catalog-sql-udfs-without/m-p/177582#M57331</guid>
      <dc:creator>pxs132</dc:creator>
      <dc:date>2026-11-25T14:28:08Z</dc:date>
    </item>
  </channel>
</rss>

