最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

function access without giving access of secret in databricks - Stack Overflow

programmeradmin2浏览0评论

I've created a function in Databricks to anonymize PII data using a secret. I want to grant other users access to execute this function, but I absolutely must not give them direct access to the secret itself.

I've tested granting USAGE on the function, but it appears users can't execute it without also having permission to access the secret. This makes sense, as the function itself needs to retrieve the secret.

Is there a secure way to allow users to call the function without exposing the secret to them? I'm looking for the best practice approach. Any suggestions would be greatly appreciated!

I've created a function in Databricks to anonymize PII data using a secret. I want to grant other users access to execute this function, but I absolutely must not give them direct access to the secret itself.

I've tested granting USAGE on the function, but it appears users can't execute it without also having permission to access the secret. This makes sense, as the function itself needs to retrieve the secret.

Is there a secure way to allow users to call the function without exposing the secret to them? I'm looking for the best practice approach. Any suggestions would be greatly appreciated!

Share Improve this question asked Feb 14 at 21:33 NRLVNRLV 111 bronze badge 2
  • Can you provide your code example? Also, what are you trying to achieve? I mean why use a secret? What hashing algorithm are you using? And why not something like md5 or SHA? And how are the users accessing this? Have you thought of doing some hard coded masking or do downstream need to see unique values depending on the original value? You can refer to a simple encryption function like shown here immuta/guides/partner-blueprints/… and see if it helps. – Anupam Chand Commented Feb 16 at 10:12
  • Are you trying to mask on read? Are you using Unity Catalog? It has built-in support for column masking. – Andrew Commented Feb 17 at 16:30
Add a comment  | 

1 Answer 1

Reset to default -2

One way is we can set up the function to use a secure credential passthrough mechanism to retrieve the secret at runtime. This way, the function itself does not store or expose the secret directly, but rather retrieves it securely when needed.

发布评论

评论列表(0)

  1. 暂无评论