File tree Expand file tree Collapse file tree
src/databricks/sql/backend/kernel Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -270,6 +270,24 @@ def kernel_auth_kwargs(
270270 "auth_type='azure-sp-m2m' requires azure_client_id and "
271271 "azure_client_secret."
272272 )
273+ # azure-sp-m2m carries its credentials in the azure_* namespace, so a
274+ # conflicting OAuth signal is not a routing collision and does not fail
275+ # loudly the way the other flows do (see the routing note above). Still,
276+ # leave a breadcrumb: a caller who paired azure-sp-m2m with an
277+ # oauth_*/credentials_provider value likely misunderstood the routing,
278+ # and those values are silently ignored here.
279+ ignored_signals = [
280+ name
281+ for name in ("oauth_client_secret" , "oauth_jwt_key_file" , "credentials_provider" )
282+ if opts .get (name ) is not None
283+ ]
284+ if ignored_signals :
285+ logger .debug (
286+ "auth_type='azure-sp-m2m' selected; ignoring conflicting "
287+ "credential signal(s) %s (Azure SP credentials in the azure_* "
288+ "namespace take precedence on the kernel path)." ,
289+ ", " .join (ignored_signals ),
290+ )
273291 kwargs = {
274292 "auth_type" : "azure-sp-m2m" ,
275293 "azure_client_id" : azure_client_id ,
You can’t perform that action at this time.
0 commit comments