# Databricks Databricks is the online notebook environment for analyzing data or quick experimenting. The environment is available [here](https://tinka-universe.cloud.databricks.com) and through your Okta dashboard. This guide will show you how to create a scope and a secret key. Requirements: * the `databricks-cli` as described [here](https://docs.databricks.com/en/dev-tools/cli/databricks-cli-ref.html#set-up-the-cli) Upstream documentation: * available [here](https://docs.databricks.com/en/security/secrets/secrets.html) ## Secrets Secrets are stored in scopes, and groups are granted access to scopes. Execute the following command to get a list of available scopes: ``` databricks secrets list-scopes ``` Start with creating a scope for your specific project: ``` databricks secrets create-scope fruit-salad ``` Let's manage access to keys in this scope. Make sure to allow `MANAGE` permissions to your group, in this example that will be `DB_Tech_Team_Engineering`: ``` databricks secrets put-acl fruit-salad DB_Tech_Team_Engineering MANAGE ``` And now list the Access Control Lists associated with your new scope: ``` databricks secrets list-acls fruit-salad [ { "permission":"MANAGE", "principal":"DB_Tech_Team_Engineering" } ] ``` Add a secret to the scope: ``` databricks secrets put-secret fruit-salad best-fruit-in-town --string-value bananas ``` Execute the following command to get a list of secrets that exist within a certain scope: ``` databricks secrets list-secrets fruit-salad ``` Which could return something like this: ``` [ { "key":"best-fruit-in-town", "last_updated_timestamp":1678797076764 } ] ``` Use the following snippet in your notebook to access the secret value: ```python fruit = dbutils.secrets.get(scope="fruitsalad", key="best-fruit-in-town") ```