A scenario for a platform engineer · Junior and up
A password is in the repo
Vault · Security
Friday, 12:00
During a review you spot a production database password, in plain text, in a Databricks notebook that was committed to git last month.
What do you do?
Tap the one you would do. The answer opens below.
Show the best callThe best call
Change the password now, store the new one in a secret scope, and read it from there in the notebook.
The leaked password is worthless, and the new one never appears in code.
Why
A secret that reached a repository has to be treated as leaked, so it is changed first. Secret scopes hold credentials outside the code, and notebooks read them at run time with dbutils.secrets.get.
Read it in the Databricks docs (opens in a new tab)The other two
- Works, at a price. Move the password to a secret scope and delete it from the notebook.
- The notebook is clean. The old password still works and still sits in the git history.
- A poor call. Delete the line and commit.
- It is one click away in the history, and it still opens the database.
The words in this scenario
- Secret scope.
- A named store for passwords and keys. Code asks for a secret by name, so the value never has to be written in a notebook or a repo. In the docs (opens in a new tab)
Go deeper on brickster.ai
- Follow jobs and workflowsNews, releases, videos and questions on it, gathered daily.
More scenarios
- Forty jobs failed at once · platform engineer
- One upgrade broke everyone's notebooks · platform engineer
- The orders table is gone · platform engineer
- All 47 scenarios
Had one like this at work? Send it to us: the best tickets come from real incidents.
Checked against the Databricks documentation on . brickster.ai is independent and is not affiliated with Databricks.