Let me put an example to make it more clear.
We have a user, let's say Bob Rando, and he wants to store user and password in databricks secrets in order to use them later on the notebooks.
Using the CLI Bob does the following:
- databricks secrets create-scope bob-rando-creds
- databricks secrets put-secret --json '{"scope": "bob-rando-creds", "key": "username", "string_value": "bobRando"}'
- databricks secrets put-secret --json '{"scope": "bob-rando-creds", "key": "password", "string_value": "b0bR4ndoS3cretP4ssword"}'
- The he goes to the Notebooks and can access those secrets via dbutils.secrets.get method.
So far so good. The problem here is that we want complete isolation from those secrets, meaning that only the persons Bob has given access to can see tose secrets. Including the admins.
Following the example and admin can use dbutils.secrets.get to access Bob's secrets as well.