Databricks-GenAI-Assoc Application Development Practice Question
An AI engineer is developing a real-time customer service chatbot application using Databricks Model Serving and needs to securely store API keys and database credentials without hardcoding them into the application code or notebook. Which approach should the engineer use?
⚠ Common exam trap
Candidates often suggest using environment variables directly or manual file uploads, overlooking that dbutils.secrets is the standard, secure, and platform-native way to retrieve sensitive values within Databricks.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Utilize Databricks Secrets to create a secret scope and retrieve values securely using dbutils.secrets.get during application execution.
Databricks Secrets provide a secure mechanism for managing credentials and sensitive configuration parameters. By leveraging secret scopes and the dbutils.secrets utility within notebooks or environment variables mapped to serving endpoints, developers ensure that sensitive tokens never leak into version control systems, adhering to strict enterprise security and compliance standards for production application deployments.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Store the credentials in a plain-text JSON file located in the workspace root directory and read it programmatically at runtime.
Why it's wrong here
Storing credentials in plain text within the workspace root exposes sensitive information to any user with workspace read permissions. This approach violates fundamental security best practices and compliance standards, as files in the workspace can be easily accessed, downloaded, or accidentally committed to external repositories.
- ✗
Hardcode the credentials directly into the scoring script deployed to the Databricks Model Serving endpoint.
Why it's wrong here
Hardcoding credentials directly into model serving scripts or application code introduces severe security vulnerabilities. Anyone with access to the model artifact or source code can extract the secrets, potentially leading to unauthorized data access, resource hijacking, and severe security breaches across connected cloud services.
- ✓
Utilize Databricks Secrets to create a secret scope and retrieve values securely using dbutils.secrets.get during application execution.
Why this is correct
Databricks Secrets encrypt credentials at rest and in transit, integrating seamlessly with Unity Catalog and workspace access controls. Using dbutils.secrets ensures that sensitive tokens are masked in logs and only exposed dynamically to authorized execution contexts, safeguarding production environments effectively.
- ✗
Pass the credentials as plain-text arguments in the command-line interface when triggering the job cluster.
Why it's wrong here
Passing credentials via command-line arguments makes them visible in cluster job history logs, Spark UI environment tabs, and process lists. This exposes sensitive strings to anyone with view permissions on the cluster or job, creating a significant security vulnerability that compromises enterprise data protection.
About these practice questions
This Databricks-GenAI-Assoc question is part of Courseiva's 330-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Databricks exam blueprint
This Databricks-GenAI-Assoc practice question is part of Courseiva's free Databricks certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the Databricks-GenAI-Assoc exam.