cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Accessing secret scope keys from Unity Catalog SQL UDFs without granting users READ permission

pxs132
Visitor

We are implementing a dynamic data masking solution on Azure Databricks using Unity Catalog ABAC policies and SQL UDFs for deterministic masking.

Our masking functions retrieve a secret key from a Databricks-backed secret scope using the secret() function.

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.

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.

My questions are:

  • Is this the expected behavior of secret() within Unity Catalog SQL UDFs?

  • Is there a supported way for a masking UDF to access a secret without granting the querying user direct access to it?

  • Would Unity Catalog Secrets or Unity Catalog External Secrets address this limitation?

Has anyone encountered a similar issue or found a recommended solution?

Any guidance would be greatly appreciated. Thanks!

0 REPLIES 0