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:ย 

Global ini file to reference Databricks-backed secrets (not Azure)

brian999
Contributor

Is there a way to create a global ini file that will reference databricks-backed secrets? Not from Azure, we use databricks on AWS.

1 REPLY 1

Kaniz_Fatma
Community Manager
Community Manager

Hi @brian999When working with Databricks on AWS, you can create a global initialization script that references Databricks-backed secrets.

Letโ€™s break down the steps:

  1. Create a Secret in a Databricks-Backed Scope:

  2. List Secrets:

    • To view existing secrets within a scope, use the following command:
      databricks secrets list-secrets <scope-name>
      
  3. Read a Secret:

    • While you create secrets using the REST API or CLI, you must use the Secrets utility (dbutils.secrets) in a notebook or job to read a secret.
  4. Use Secrets in Spark Configuration Properties or Environment Variables:

    • You can reference a secret in a Spark configuration property or environment variable. Retrieved secrets are redacted from notebook output and Spark driver and executor logs.
    • Keep in mind the security implications:
      • If table access control is not enabled on a cluster, any user with appropriate permissions can read Spark configuration properties from within a notebook.
      • Databricks recommends enabling table access control or managing access to secrets using secret scopes.
      • Even when table access control is enabled, users with certain permissions can still read cluster environment variables from within a notebook.
      • Secrets are not redacted from the Spark driver log stdout and stderr streams1.

If you need further assistance, feel free to ask! ๐Ÿš€

 

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group