Courseiva
Model Deployment →easyMultiple Choice

Databricks-ML-Assoc Model Deployment Practice Question

When deploying a model to Databricks Model Serving, what is the recommended way to handle sensitive credentials like database connection strings?

⚠ Common exam trap

Candidates frequently choose environment variables or hardcoded strings for credentials, overlooking the security risks and the native Databricks Secrets utility designed for this.

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

✓

Use Databricks Secrets to reference credentials within the serving environment.

Using Databricks Secrets is the industry standard for managing sensitive information securely. By decoupling credentials from the model code or deployment configuration, you prevent hard-coding secrets which could be inadvertently exposed. This practice is vital for maintaining security compliance and protecting proprietary data access, as it enables centralized management, auditing, and rotation of keys without necessitating code changes in the model repository.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    Include credentials as environment variables in the model's conda.yaml file.

    Why it's wrong here

    Hard-coding credentials in configuration files like conda.yaml exposes them to anyone with access to the model artifact. This violates basic security principles, as sensitive keys should be stored in secure vaults and accessed at runtime using secure APIs rather than stored in plain-text configuration files.

  • ✗

    Store the credentials in an encrypted text file inside the model package.

    Why it's wrong here

    Storing credentials inside the model artifact, even if encrypted, is insecure because the keys to decrypt them must also be present. Databricks Secrets provide a dedicated, secure mechanism for managing credentials that is integrated with identity and access management, offering a much safer alternative to local file encryption.

  • ✓

    Use Databricks Secrets to reference credentials within the serving environment.

    Why this is correct

    Databricks Secrets allow you to reference sensitive information securely during deployment. This approach ensures that credentials remain encrypted at rest and in transit, and are only accessible by authorized users or service principals, aligning with enterprise security standards for cloud-based machine learning deployment workflows and infrastructure.

  • ✗

    Use a global variable within the model inference script.

    Why it's wrong here

    Global variables within a script offer no security and are easily compromised if the code is inspected. Secrets management must be handled by the platform infrastructure to ensure that keys are injected at runtime, protecting the information from being leaked in logs or source control repositories.

About these practice questions

Courseiva writes every Databricks-ML-Assoc question from scratch — 319 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

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-ML-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-ML-Assoc exam.