A Databricks Model Serving endpoint, supporting a Retrieval Augmented Generation (RAG) system, needs to interact with both a Vector Search index and a Unity Catalog table during its operational lifecycle. Given corporate security guidelines that enforce the principle of least privilege for all resource access and explicitly forbid hardcoding personal access tokens (PATs) within the model's codebase, what is the optimal authentication method for a production-ready Databricks Model Serving endpoint?
Answer & explanation
Correct answer: C
WHY C is correct: Databricks recommends automatic authentication passthrough for production model serving. When logging the agent, you declare Databricks-managed resources (Vector Search index, serving endpoints) in the resources parameter. At deployment, the serving endpoint is granted a service principal that has exactly the permissions needed for those declared resources — no PATs are embedded and no over-privileged tokens are used.
WHY NOT A: Hard-coding a developer's PAT as an environment variable violates the minimum-privilege and separation-of-credentials principles. PATs are user-scoped credentials that expire and should not be used as machine credentials in production.
WHY NOT B: Embedding a shared admin token in the model artifact grants the serving endpoint admin-level access to the entire workspace — a severe over-privilege violation. It is also a security risk because the token is baked into the artifact.
WHY NOT D: Granting the endpoint anonymous public access removes all access control, exposing Unity Catalog data to unauthenticated callers. This is a critical security failure and is not supported for Unity Catalog resources.